So I noticed I was having problems with the Start button. It liked to sometimes have a mind of its own when the game ended. I would press Start (Enter on the emulator), and, while I was still pressing start, it would turn back to the title screen, something I did not want it to do. This would happen so fast I was unsure what was causing it. So I tried some different stuff, and I think I might have fixed it, it only happened once, but I noticed I wasn't still pressing start when it happened. But still, it seems kind of odd that it would happen in the first place. I added another variable, a char called startpressed. Here's what I did, both at game over and end of game.
key = joypad(); if ((startpressed==0) && (key & (J_START))) startpressed=1; if ((startpressed==1) && (!(key & (J_START)))) startpressed=0, gameinprocess=8;
In this example, gameinprocess=8 would make the gameinprocess variable be 8 and go to reset a few variables and start it over again. And I don't know whether I fixed it or not. This code sure seems like it would fix it, but you know my experience with computers, they like to hate and disobey me.
0 Comments
Recommended Comments
There are no comments to display.