// *********************************************** // P_INIT.C - screen + pad initialisation // *********************************************** // **** includes #include "init.h" #include "global.h" // **** initialise the graphics void InitScreen(void) { u_long counter; SetVideoMode(MODE_PAL); GsInitGraph(320, 256, GsOFSGPU, 1, 0); GsDefDispBuff(0, 0, 0, 256); GsInit3D(); for (counter=0; counter<8; counter++) { OTable_Header[counter].length = OTABLE_LENGTH; OTable_Header[counter].org = &OTable_Array[counter][0]; GsClearOt(0, 0, &OTable_Header[counter]); } FntLoad(960, 256); FntOpen(-80, -64, 160, 128, 0, 256); } // **** initialise the joypad reading variables void InitPad(void) { GetPadBuf(&bb0, &bb1); } // **** read status of the joypads u_long ReadPad(void) { return(~(*(bb0+3) | *(bb0+2) << 8 | *(bb1+3) << 16 | *(bb1+2) << 24)); }