From: troy silvey (tbsilvey_at_juno.com)
Date: 2001-02-25 01:17:17
I have a small function that waits for user input
to move a sprite down a menu in my c64 prog.
The sprite moves and all works well, but.....
Here is a bit of the function.
if (more==60) // keyboard input
{
if (VIC.spr0_y>162) // sprite location upper limit
{
VIC.spr0_y=106; // limit reached, reset sprite
menupointer=0; // reset the position counter
}
VIC.spr0_y=VIC.spr0_y+4; // sprite menu move
VIC.spr0_y=VIC.spr0_y+4; // THIS IS MY PROB FIX
++menupointer; // inc position counter
if (menupointer>7) // end of menu?, then reset
{menupointer=0;}
}
If I use VIC.spr0_y=VIC.spr0_y+8; the sprite disapears from
the screen never to be seen again. If I split the movement
into two 4 pixel moves, then it works fine. My fix works ok,
but I thought this might be an interesting problem
to think about.
troy
________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today! For your FREE software, visit:
http://dl.www.juno.com/get/tagj.
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2001-12-14 22:05:39 CET