Search the web
Sign In
New User? Sign Up
vmu-dev · The VMU Development list
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Re: [vmu] Simple stuff   Message List  
Reply | Forward Message #453 of 1156 |
Re: Simple stuff

On 25 Jul 00, rednuht@... (rednuht) wrote:

> this is what i my sprite routine does (trys).
>
> 1: take Y coord for sprite and find correct offset to 1st byte of that
> row in LCD memory. $80 + offset
> 2: take the X coord and by dividing by 8 find how many bytes should be
> added to the offset and the subtracting that value from the original X
> coord get how mang Bits need to be shifted.
> 3: shift the byte the correct number bits and as it is shifted take the
> shifted bits into another location.
> 4: output shifted data to the LCD memory.

IMHO shifting a sprite image is way too time-consuming to be efficient.
Better create eight different images, each showing the sprite one more
pixel to the right, and then use step 2. to determine which of the eight
images you have to copy to the LCD screen (that's also how I did it in
"Pacman")...

Also, don't forget to AND / OR the sprite data with the LCD background
data (to blend out the bits where the sprite will be placed / keep the
bits where the sprite won't be), otherwise movement over a background
image might look a bit strange. ;)

Bye


Alessandro
---
You get what anyone gets. You get a lifetime.



Sun Aug 6, 2000 9:23 am

tyro@...
Send Email Send Email

Forward
Message #453 of 1156 |
Expand Messages Author Sort by Date

i think this is common question (not asked). this is what i my sprite routine does (trys). 1: take Y coord for sprite and find correct offset to 1st byte of...
rednuht
rednuht@...
Send Email
Jul 25, 2000
11:10 am

... IMHO shifting a sprite image is way too time-consuming to be efficient. Better create eight different images, each showing the sprite one more pixel to the...
tyro@...
Send Email
Aug 8, 2000
1:31 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help