Jump to content
IGNORED

Trouble using player0pointerlo


jrok

Recommended Posts

Hi everyone.

 

I'm trying to program a player graphic that animates in 8 directional orientations using batariBasic and the multisprite kernel.

 

The human player controls the player0 sprite, which uses odd and even frames to display two

graphics, where one portion is the head and arms of a flying superhero and the other portion is his flowing red cape. The sprite is animated using temp1 to produce a value between 0 and 3 and jump to the correct frame of 4-frame animation.

 

I am attempting to use long sprites in my animation routine to account for the 5 possible orientations of the sprite (REFPO is used for left, left-up and left-down sprites.) I've been trying to use player0pointerlo to display the correct directional frame during the animation routine. Basically, I made a var called playerDir that changes when the player moves the joystick, and then have tried:

 

player0pointerlo = playerDir

 

... where playerDir is a integer of the first line of a graphic in the long sprite. But instead I've just been getting a garbage sprite where the cape should be, and I honestly have no clue what I'm doing wrong. I've posted my .BAS file with the above line commented out in the main loop, and when compiled it displays the correct sprite set.

 

If there is anyone out there who has created a similar sprite and could help me figure out what I'm doing wrong, I'd greatly appreciate it.

 

Thanks in advance!

 

animated_8direction_sprite.bas

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...