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
  • SylverReZ @ SylverReZ:
    Worst would be getting a DRM rootkit from using audio CDs and then Sony getting sued.
  • K3Nv2 @ K3Nv2:
    Least I can throw the nvme at neighbors now
  • DinohScene @ DinohScene:
    get a 2 TB NVMe from amazon, return the fucked one, get replacement and send that one to me
  • K3Nv2 @ K3Nv2:
    Easier way buy one with a preadded heatsync pop the heat sync open
  • K3Nv2 @ K3Nv2:
    Some nerd at Amazon warehouse may tell the end of the colors off
  • DinohScene @ DinohScene:
    I'd like a 990 pro tyvm <З
  • K3Nv2 @ K3Nv2:
    Gen 5s going to be crazy expensive at like 10k transfer
  • K3Nv2 @ K3Nv2:
    $300for 2tb
  • DinohScene @ DinohScene:
    don't have anything that can take PCIe5
  • K3Nv2 @ K3Nv2:
    It's still m.2 form just the next gen
  • DinohScene @ DinohScene:
    ew crucial
  • K3Nv2 @ K3Nv2:
    13,600 MB/s though
  • DinohScene @ DinohScene:
    I got a 980 pro iirc
  • K3Nv2 @ K3Nv2:
    Soldigms been pretty solid
  • DinohScene @ DinohScene:
    yeh 980 pro
  • DinohScene @ DinohScene:
    good enough tbf
  • K3Nv2 @ K3Nv2:
    https://a.co/d/gMNhZNI never heard about them but reviews are good
  • SylverReZ @ SylverReZ:
    @DinohScene, Crucial SSDs work fine. I have one installed in my Xbox.
  • SylverReZ @ SylverReZ:
    Reviews seem positive.
  • DinohScene @ DinohScene:
    I believe I had some Patriot RAM running in a computer somewhere
  • K3Nv2 @ K3Nv2:
    $250 is pretty solid considering
  • K3Nv2 @ K3Nv2:
    With the refund it'll be about $150
  • K3Nv2 @ K3Nv2:
    6tb nvme pc ftw
    K3Nv2 @ K3Nv2: 6tb nvme pc ftw