Jump to content
IGNORED

noscore include mods


CurtisP

Recommended Posts

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.

Link to comment
Share on other sites

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 by CurtisP
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...