ROM Hack Another Simple C/C++ Q

.::5pYd3r::.

Viva La Pizza
Member
Joined
Jun 2, 2007
Messages
765
Reaction score
1
Trophies
1
Age
32
Location
The GREAT Southern Land :D
Website
Visit site
XP
333
Country
Ok well this time it doesn't do anything when i press and release start
CODE// PALib Template Application

// Includes
#include    // Include for PA_Lib

#include "gfx/all_gfx.c"
#include "gfx/all_gfx.h"

int main()
{
ÂÂÂÂPA_Init(); Â Â// Initializes PA_Lib
ÂÂÂÂPA_InitVBL(); // Initializes a standard VBL
ÂÂÂÂPA_InitText(0, 3); //Initializes text
ÂÂÂÂ
ÂÂÂÂPA_EasyBgLoad(1, 3, Pong_Menu); //Screen, Priority 0-3, Name
ÂÂÂÂPA_OutputSimpleText(0,11,11,"Press Start"); // Screen, tile x, y, "text"

ÂÂÂÂif(Pad.Released.Start)
ÂÂÂÂ{
ÂPA_EasyBgLoad(1, 2, Court)
ÂÂÂÂ}

ÂÂÂÂreturn 0;
}
all help appreciated
biggrin.gif
 
thats hell funny
laugh.gif
i was just about to post the same thing, and then you figured it out. If you ever need any more help i will be happy to help you
 
CODE// PALib Template Application

// Includes
#include    // Include for PA_Lib

#include "gfx/all_gfx.c"
#include "gfx/all_gfx.h"

int gameStart = 0;

int main()
{
PA_Init(); Â Â// Initializes PA_Lib
PA_InitVBL(); // Initializes a standard VBL
PA_InitText(0, 3); //Initializes text

PA_EasyBgLoad(1, 3, Pong_Menu); //Screen, Priority 0-3, Name
PA_OutputSimpleText(0,11,11,"Press Start"); // Screen, tile x, y, "text"

while(1){

if(Pad.Released.Start && gameStart == 0)
{
PA_EasyBgLoad(1, 2, Court);
gameStart = 1;
}

}

return 0;
}

i think that fixes the prob you are talking about
make a variable called gameStart and when you press start it checks if it = 0, then if it does, it goes into the game and changes the variable so it doesn't restart the game every time you press start.
 
bool is the name of a boolean variable. this means the value is either false or true. if you set any nonzero value to the variable, it is considered true. you'll learn this variable type soon enough. it's very useful for stuff like this.
 
i don't even know what a bool is because i have just started learning c/c++ with the help of online guides and the c for dummies book

Bool is boolean. A bool variable can either be true or false (1 or 0). Some languages have a predefined bool variable type. Others like C don't. With C, you use an integer as a boolean variable.
 

Site & Scene News

Popular threads in this forum