Nesting functions now works. In TGRK we can have functions chain off each other up to 8 times. For example, F1 calls F2, which calls F3, which calls F4... This could be useful for writing multiple small functions that do a task.
I found the source of a lot if the bugs that was happening, and it was pretty simple.
To get the index of a register keyword, or fuction keywords address, I was originally adding the positive equivelant of the first function or registers keyword. This results in the index value in array these are stored 0-7.
But when I switched out all magic numbers that I was using for keywords in my code, I was then adding the exact negative value, which was resulting in some strange behavior.
I typed this up with some nice code examples earlier but then closed browser on my phone to look at calculator and when I reopened browser it refreshed and entire log was lost so I am not remaking those examples.
There were a few other bugs that I worked out and still cleaning up code and polishing some things before finishing the last couple features to be added. Once the code is complete and cleaned/commented best i know how it is going on my github and ill link it here.
Have been pretty busy with other projects and work so haven't had as much time to work on this as I'd like but I imagine it will be complete by the time Tiny Games Contest is over.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.