Okay
Heres my Random Text Adventure game
It sure was fun
You skip the text by touching the second screen on DS..
Oh and at the end you can draw on second screen lol
Well atleast all works on emulator! If somebody have time and is kind enough can try this on ds and post screen that would be great
Heres the source:
#include <PA9.h> // PAlib include
char Name[200];
int main(int argc, char ** argv) {
int Text = 1;
int Block = 0;
s32 nletter = 0;
char Letter = 0;
PA_Init();
PA_InitVBL();
PA_SetBgPalCol(0, 1, PA_RGB(31, 31, 31));
PA_Init8bitBg(0,2);
PA_InitKeyboard(1);
PA_KeyboardOut();
PA_InitText(0,0);
PA_InitText(1,0);
while(1) {
PA_WaitForVBL();
if(Stylus.Newpress && Block==0) {
PA_ClearTextBg(1);
Text++;
}
if(Text == 1)
PA_OutputSimpleText(1,1,5,"Hello!");
if(Text == 2)
PA_OutputSimpleText(1,1,5,"Im the great warrior of Hyrlue..");
if(Text == 3)
PA_OutputSimpleText(1,1,5,"Oh! My name?");
if(Text == 4)
PA_OutputSimpleText(1,1,5,"It's Link.. Im Link.");
if(Text == 5) {
PA_OutputSimpleText(1,1,5,"What is your name then?");
}
if(Text == 6) {
PA_OutputSimpleText(1,1,5,"What is your name then?");
PA_KeyboardIn(10,10);
Text++;
Block=1;
}
if(Text == 7) {
PA_ClearTextBg(0);
Letter = PA_CheckKeyboard();
if (Letter > 31) {
Name[nletter] = Letter;
nletter++;
}
else if(Letter == PA_TAB){
u8 i;
for (i = 0; i < 4; i++){
Name[nletter] = ' ';
nletter++;
}
}
else if ((Letter == PA_BACKSPACE)&&nletter) {
nletter--;
Name[nletter] = ' ';
}
else if (Letter == '\n'){
PA_KeyboardOut();
Text++;
Block=0;
}
PA_OutputText(1,1,7,"Name : %s",Name);
}
if(Text <= 6 || (Text >= 8 && Text <= 10))
PA_OutputSimpleText(0,1,5,"Touch To Continue!");
if(Text == 8)
PA_OutputText(1,1,7,"So your name is %s!",Name);
if(Text == 9)
PA_OutputText(1,1,7,"Nice to meet you, %s!",Name);
if(Text == 10) {
PA_OutputSimpleText(1,1,7,"DEMO OVER! PAY 50 BUCKS!");
PA_ClearTextBg(0);
}
if(Text == 11) {
PA_OutputSimpleText(1,1,7,"Jordan Stories Games");
PA_OutputSimpleText(1,1,8,"Strikes Again!");
PA_SetLedBlink(1,1);
if(Stylus.Newpress || Stylus.Held)
PA_Put8bitPixel(0,Stylus.X,Stylus.Y,1);
Block=1;
}
}
return 0;
}
But now i go sleep
[center]