Looking to generate random sprite colours

Sylus101
Posts: 179
Joined: Wed Dec 24, 2008 5:08 am

Re: Looking to generate random sprite colours

Post by Sylus101 » Sat Jul 18, 2009 11:38 pm

vuurrobin wrote:AFAIK, there aren't many differences between them when just using 2d, and it makes things harder to follow (at least, it does for me), which means it is easier to make mistakes.
From what I can tell, the only difference is that you can allocate more VRAM for BGs (up to 512KB) and Sprites (up to 256KB) on the Main Engine. Sub Engine only allows 128KB max for both Sprites and Backgrounds.
-Sylus "Not Stylus..." McFrederickson

Come visit my web site.

hassifa
Posts: 15
Joined: Thu Jul 16, 2009 2:22 am

Re: Looking to generate random sprite colours

Post by hassifa » Sat Jul 18, 2009 11:44 pm

vuurrobin wrote: the balloon pops on the bottom screen, but you allocate vram for the main engine (while the main engine defaults to the top screen). is there any reason why you switched the engines around? AFAIK, there aren't many differences between them when just using 2d, and it makes things harder to follow (at least, it does for me), which means it is easier to make mistakes.
Oiriginally i just used the consoleDemoInit() to get text onto the top screen, which is why i had to swap the screens around, and i havent bothered to switch them back now that i am using the proper consoleInit methods().
vuurrobin wrote: have you made sure that the function enters the cases? try placing a few printf() in it. also, you might want to either use constants/defines instead of 1,6 and 12, or place some comments with it.
I hope this helps
I am sure that those switch statements are being processed as the paletteAlpha points to different colours, and when i 'pop' the balloon, is does change colours at the correct time. It just doesnt change the graphic for some reason due to defaulting to the filled in sprite. As for the defines/constants, this is the only place where the poping is required, and i dont feel that it would be required.

hassifa
Posts: 15
Joined: Thu Jul 16, 2009 2:22 am

Re: Looking to generate random sprite colours

Post by hassifa » Sun Jul 19, 2009 12:24 am

OK, i found out why i had the problem. It was because i was mis-using the static keyword in the header file, thus giving each file their own value for the memory location. I have fixed that now and my sprite animation is now working. (Stupid memory and forgetfulness)

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests