#19214 - rossjp - Wed Apr 14, 2004 3:18 am
I'm having a small problem using krawall with my project:
At the start of my game there is a main menu screen, which is created from the main while loop in main.cpp, and then run using main_menu.run();
Inside the run function is a while loop that polls for user input, and changes the game state when needed. The run function worked perfectly before I started integrating Krawall, so the problem doesn't lie there.
The problem I'm having is this: at the start of the main_menu.run() function I call krapPlay(myMod, KRAP LOOP MODE (or whatever), 1) and the song plays just fine. Immediately when the game state changes (i.e. the user selects to start the game), I make a call to krapStop() to stop playing the music, but it doesn't exactly stop. Instead, my game goes to the first level, and the music is still "skipping" in the background. Has anyone had a similar problem, and/or have any suggestions for solving this?
By the way, I've initialized Krawall in stereo mode and tied the kradInterrupt to Timer1 before any of that happens. The kramWorker() function is called in a VBL interrupt which is also where objects are copied into OAM. It seems weird that the game plays the music but has trouble stopping it.
Ross
At the start of my game there is a main menu screen, which is created from the main while loop in main.cpp, and then run using main_menu.run();
Inside the run function is a while loop that polls for user input, and changes the game state when needed. The run function worked perfectly before I started integrating Krawall, so the problem doesn't lie there.
The problem I'm having is this: at the start of the main_menu.run() function I call krapPlay(myMod, KRAP LOOP MODE (or whatever), 1) and the song plays just fine. Immediately when the game state changes (i.e. the user selects to start the game), I make a call to krapStop() to stop playing the music, but it doesn't exactly stop. Instead, my game goes to the first level, and the music is still "skipping" in the background. Has anyone had a similar problem, and/or have any suggestions for solving this?
By the way, I've initialized Krawall in stereo mode and tied the kradInterrupt to Timer1 before any of that happens. The kramWorker() function is called in a VBL interrupt which is also where objects are copied into OAM. It seems weird that the game plays the music but has trouble stopping it.
Ross