#64810 - G-Pjube - Mon Dec 26, 2005 11:31 pm
Hello there. I'm fairly new to programming and all I did before was PHP/Sql, so I thought PA_libs would be best to start with. I was following some tutorials from aaronrogers.com (to be precise, aaronrogers.com/nintendods/PA_Lib/Day2_Input_Pad/ )The first tutorial was really a piece of cake, even the second one. But when I created the .nds file all my DS does is showing 2 black screens instead of what it should do. Also, when I test my code on an Emulator exactly the same happends, and when I test the premade from aaronrogers.com it works, but when you push the buttons it shows the wrong button, or nothing. What am I doing wrong?
Btw, don't mind the dutch :P
(having PA_libs 0.76a)
_________________
www.picfront.com [ Upload your pictures ]
Btw, don't mind the dutch :P
(having PA_libs 0.76a)
Code: |
#include <PA9.h>
#include <String> int main(int argc, char ** argv) { std::string Button = " Geen"; //Initialiseren en instellingen PA_Init(); PA_InitVBL(); PA_InitText(1, 0); PA_InitText(0, 0); PA_SetTextCol(1, 31, 31, 31); PA_SetTextCol(0, 31, 0, 0); //Laat text op bovenste scherm zien PA_OutputSimpleText(1, 0, 0, "Druk op een knop naar keuze"); while(1) { if(Pad.Held.Start){ Button = " Start"; } else if(Pad.Held.Select){ Button = " Select"; } else if(Pad.Held.A){ Button = " A"; } else if(Pad.Held.B){ Button = " B"; } else if(Pad.Held.X){ Button = " X"; } else if(Pad.Held.Y){ Button = " Y"; } else if(Pad.Held.L){ Button = " L"; } else if(Pad.Held.R){ Button = " R"; } else if(Pad.Held.Up){ Button = " Up"; } else if(Pad.Held.Down){ Button = " Down"; } else if(Pad.Held.Left){ Button = " Left"; } else if(Pad.Held.Right){ Button = " Right"; } else{ Button = " "; } PA_OutputText(0, 0, 12, "%s knop ingedrukt.",Button.c_str()); PA_WaitForVBL(); } return 0; } |
_________________
www.picfront.com [ Upload your pictures ]