CurtisP Posted July 21, 2009 Share Posted July 21, 2009 (edited) Last night, I discovered that some code that manipulates score and scorepointers was still being compiled into the code even though the constant noscore was set. I modified the offending include files appropriately. noscore.zip Edited July 21, 2009 by CurtisP Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted July 21, 2009 Share Posted July 21, 2009 Thanks. Quote Link to comment Share on other sites More sharing options...
CurtisP Posted July 23, 2009 Author Share Posted July 23, 2009 Not only does this save a few bytes of code. It also stops the 3 score and 6 scorepointers from being overwritten, so you can now use them for your own purposes. (9 more variables, yay!) Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted July 23, 2009 Share Posted July 23, 2009 Not only does this save a few bytes of code. It also stops the 3 score and 6 scorepointers from being overwritten, so you can now use them for your own purposes. (9 more variables, yay!) Can you remind newbies how they can use those? Thanks. Quote Link to comment Share on other sites More sharing options...
CurtisP Posted July 23, 2009 Author Share Posted July 23, 2009 (edited) Can you remind newbies how they can use those? If these includes make it into the standard package, then you can include this in the manual... When the noscore constant is set, six additional variables are freed up, these may be addressed using dim statements referencing the variables score and scorepointers. For example, dim foo = score dim bar = score + 1 dim baz = score + 2 dim inky = scorepointers + 1 dim pinky = scorepointers + 2 ... dim blinky = scorepointers + 5 Advanced: In 2600basic.h the scorepointers memory immediately follows the score area, giving you a 9 byte array. dim arr = score for i = 1 to 9 arr[i] = i next And, if you do don't otherwise use variables temp1 through temp6, you can have a 15 byte array. Note, however that the temp variables are destroyed every time you drawscreen and may also be overwritten during function calls (like rnd). Edited July 23, 2009 by CurtisP Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted July 23, 2009 Share Posted July 23, 2009 Thanks. Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted July 30, 2009 Share Posted July 30, 2009 I forgot to ask. The files that you modified, were they from this thread: http://www.atariage.com/forums/index.php?showtopic=133529 The files in that thread are supposedly the latest. I want to make sure you modified the latest versions before I update that thread. Thanks. Quote Link to comment Share on other sites More sharing options...
CurtisP Posted July 30, 2009 Author Share Posted July 30, 2009 I forgot to ask. The files that you modified, were they from this thread: http://www.atariage.com/forums/index.php?showtopic=133529 The files in that thread are supposedly the latest. I want to make sure you modified the latest versions before I update that thread. Thanks. That's where I got them. Keep in mind that while I have been using these includes in my own projects, I haven't otherwise tested them. Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted July 30, 2009 Share Posted July 30, 2009 That's where I got them. Keep in mind that while I have been using these includes in my own projects, I haven't otherwise tested them. Thanks. Maybe I should just link to this thread from that thread then and let people decide if they want to try your modified version of the files. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.