#337 - notron - Mon Jan 06, 2003 5:32 pm
Well, as a newbie here, I was just programming a simple little test program to test out things. Very simple, I just want to set the mode to 3 ( I know, single bitmap mode) and paint a single color into the bg and then display it. That works just fine ( using Devkitadv and Boycottadvance).
Then, wait for an input keystroke and then repaint the background to a different color! Wow, cannot find anyway to do that? Can anybody help me?
Here is my code:
WaitForInput(); // This code works just fine.
WaitForVsync(); // probably don't need this at startup
SetMode(MODE_3 | BG2_ENABLE); // Works just fine
SetBgColor(0,0,31); //! start with blue just so I know that it started
// At this point all is fine, screen display goes from black to blue after the first keypress. Now comes prob!
WaitForInput();
WaitForVsync();
SetBgColor(31,0,0); //! go to red so I know it worked.
WaitForInput();
// Nothing happens when I keypress,i.e. the screen doesn't change color.
//----------------------------------------------------------------------------------
Is there something I am missing here? I expected the display controller to be continuously displaying the blue color ( which it did) while my code waits for the next keypress. However, the next keypress does not change the bg color to red, it stays blue. I have tried Forced_Blank, disabling the BG, etc. Nothing seems to work. THe screen is always blue!
It acts like there is not a way to ever change the background in mode 3. I know I can change it in mode 4 ( done that already), but wanted to use mode 3 just to display a sequence of still bitmaps with a pause between each one.[/code]
Any help would be much appreciated.
_________________
MysticX is The Defender
Then, wait for an input keystroke and then repaint the background to a different color! Wow, cannot find anyway to do that? Can anybody help me?
Here is my code:
WaitForInput(); // This code works just fine.
WaitForVsync(); // probably don't need this at startup
SetMode(MODE_3 | BG2_ENABLE); // Works just fine
SetBgColor(0,0,31); //! start with blue just so I know that it started
// At this point all is fine, screen display goes from black to blue after the first keypress. Now comes prob!
WaitForInput();
WaitForVsync();
SetBgColor(31,0,0); //! go to red so I know it worked.
WaitForInput();
// Nothing happens when I keypress,i.e. the screen doesn't change color.
//----------------------------------------------------------------------------------
Is there something I am missing here? I expected the display controller to be continuously displaying the blue color ( which it did) while my code waits for the next keypress. However, the next keypress does not change the bg color to red, it stays blue. I have tried Forced_Blank, disabling the BG, etc. Nothing seems to work. THe screen is always blue!
It acts like there is not a way to ever change the background in mode 3. I know I can change it in mode 4 ( done that already), but wanted to use mode 3 just to display a sequence of still bitmaps with a pause between each one.[/code]
Any help would be much appreciated.
_________________
MysticX is The Defender