#include #include "lib2d.h" #include "addrs.h" #include "pad.h" GsSPRITE start0; GsSPRITE start1; GsSPRITE help0; GsSPRITE help1; GsSPRITE credits0; GsSPRITE credits1; void ShowIns(); void ShowIns1(); void ShowIns2(); void ProcessPadins(); /*void ProcessPadins1(); void ProcessPadins2();*/ void InitialiseSprites(); void Getscreen(); static u_long Instscrn1 = TRUE; void main() { PadInit(); Initialise2DGraphics(); LoadTextures(); InitialiseSprites(); //ShowIns(); while(Instscrn1) { ProcessPadins(); } // main game loop ResetGraph(3); } void ProcessPadins() { int page=1; u_long PAD = PadRead(); ShowIns(); if(PAD& PADselect) Instscrn1 = FALSE; if(PAD& PAD2select) Instscrn1 = FALSE; if(PAD& PADLdown)ProcessPadins1(); FntPrint("Page: %d.\n",page); // force text output to the PSX screen FntFlush(-1); } /*void ProcessPadins1() {int page=2; u_long PAD = PadRead(); ShowIns1(); if(PAD& PADselect) Instscrn1 = FALSE; if(PAD& PAD2select) Instscrn1 = FALSE; if(PAD& PADLdown)ProcessPadins2(); if(PAD& PADLup)ProcessPadins(); FntPrint("Page: %d.\n",page); // force text output to the PSX screen FntFlush(-1); } void ProcessPadins2() {int page=3; u_long PAD = PadRead(); ShowIns2(); if(PAD& PADselect) Instscrn1 = FALSE; if(PAD& PAD2select) Instscrn1 = FALSE; //if(PAD& PADLdown) if(PAD& PADLup)ProcessPadins1(); FntPrint("Page: %d.\n",page); // force text output to the PSX screen FntFlush(-1); } */ void Getscreen() { PadInit(); if (page==1)ShowIns(); if (page==2) ShowIns1(); if (page==3) ShowIns2(); //if (page>3) page=3; //if (page<1) page=1; } void InitialiseSprites() { SetSpriteInfo(&start1,START1_TIM,150,140); SetSpriteInfo(&start0,START0_TIM,150,140); SetSpriteInfo(&help0,HELP0_TIM,150,180); SetSpriteInfo(&help1,HELP1_TIM,150,180); SetSpriteInfo(&credits0,CREDITS0_TIM,155,210); SetSpriteInfo(&credits1,CREDITS1_TIM,155,210); } void ShowIns() { RenderPrepare(); DrawSprite(&start1,3); DrawSprite(&help0,2); DrawSprite(&credits0,1); RenderFinish(); } void ShowIns1() { RenderPrepare(); DrawSprite(&start0,3); DrawSprite(&help1,2); DrawSprite(&credits0,1); RenderFinish(); } void ShowIns2() { RenderPrepare(); DrawSprite(&start0,3); DrawSprite(&help0,2); DrawSprite(&credits1,1); RenderFinish(); }