#3580 - misehert - Fri Feb 28, 2003 11:00 am
I'm having trouble getting a mode 1, BG # 2, ROTBG_SIZE_256x256 to wraparound. Displays, scrolls, rotates and zoom are all working fine. I'm using the pern/gbajunkie tutorials - I assume I assign the bg.wraparound = 1; ? I'm also confused because PERN in his bg.h defines wraparound as 0x2000 where as gbajunkie uses 0x1 - I think it's supposed to be bit 13 (so I would guess the 0x2000 is right), but I've tried both and still no wraparound.
_________________
Sorry, I'm just a Stoopid Noobie...
thank god for video x 4 - i can see again
#3583 - Probably Bob - Fri Feb 28, 2003 2:26 pm
There is a bug in the pern project headers in backgrounds.h
In the typedef for the Bg struct, change :
Code: |
u8 wraparound; //wraparound flag
|
to
Code: |
u16 wraparound; //wraparound flag
|
as a u8 is not big enough to hold the value 0x2000.
Then you can use bg2->wraparound = WRAPAROUND;
#3584 - Probably Bob - Fri Feb 28, 2003 2:27 pm
Sorry, should say : bg.wraparound = WRAPAROUND;
#3586 - Daikath - Fri Feb 28, 2003 5:33 pm
You know, they have this neato invention lately called the "edit button" :P ;)
_________________
?There are no stupid questions but there are a LOT of inquisitive idiots.?
#3603 - misehert - Fri Feb 28, 2003 11:41 pm
Wraparound is now working - thanks Probably Bob.
Now I'm sorry to be such a loser, but I can't get my recently learned collision detection to work beyond the original background map. If I scroll beyond the base map into the wrapped map, my collision detection based on tile# goes to hell, and the sprites walking through walls and falling into the water...
Is there a way to control this? I'm guessing somehow I have to keep recentering the screen when he goes off the edge, but it seems beyond my grasp.
_________________
Sorry, I'm just a Stoopid Noobie...
thank god for video x 4 - i can see again
#3605 - Probably Bob - Sat Mar 01, 2003 12:43 am
Daikath wrote: |
You know, they have this neato invention lately called the "edit button" :P ;) |
I really, honestly did not notice that until you pointed it out :)
D'oh!