Jump to content
IGNORED

Using Score Digits as Sprites


Gemintronic

Recommended Posts

So, using Al_Nafurs technique I was able to use 0, 4, 8 and C as sprite data.  But, since I no not what I be do, I can't figure out how to set the pointers for the other digits.  So far this is what I got:

 

 When a is 0/$00 then I get sprite data for "0"
 When a is 32/$20 then I get sprite data for "4"
 When a is 64/$40 then I get sprite data for "8"
 When a is 96/$60 then I get sprite data for "C"

 

 const _Pxhi_ScrSprite = >scoretable
 const _Pxlo_ScrSprite = <scoretable

 

 player1pointerlo = _Pxlo_ScrSprite + a
 player1pointerhi = _Pxhi_ScrSprite + a

 

scoresprite001.bas

 

scoresprite001_bas.thumb.png.f3bec9af5101b76dba2509e2cd5a1af1.png

 

Link to comment
Share on other sites

scoretable is where the score digit data starts, starting at digit 0. Each digit is 8 lines long, one byte per line, so each digit after 0 is 8 bytes more, up to adding 72 for digit 9. Anything after 9 depends on what you have defined, e.g. hex digits or symbols.

 

You should have to only add a to player1pointerlo and not player1pointerlo as the scoretable data is page-aligned, and the high byte wouldn't increment within the range of the score digits.

  • Thanks 1
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...