ROM Hack Another Simple C/C++ Q

.::5pYd3r::.

Viva La Pizza
OP
Member
Joined
Jun 2, 2007
Messages
765
Trophies
0
Age
29
Location
The GREAT Southern Land :D
Website
Visit site
XP
293
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
 

ediblebird

Well-Known Member
Member
Joined
Aug 22, 2006
Messages
313
Trophies
0
XP
267
Country
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
 

ediblebird

Well-Known Member
Member
Joined
Aug 22, 2006
Messages
313
Trophies
0
XP
267
Country
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.
 

outphase

Custom title
Member
Joined
Nov 21, 2005
Messages
1,217
Trophies
0
Website
Visit site
XP
176
Country
United States
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.
 

IBNobody

I try to keep myself amused.
Member
Joined
Nov 16, 2006
Messages
1,151
Trophies
1
Location
Texas, Hang 'Em High
Website
Visit site
XP
954
Country
United States
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

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: yawn