/* -------------------------------------------------------------------- ** File: nocntrl.c ** Purpose: Little routine which is called when no standard contrller ** is inserted ** Date: 14.07.99 */ #include #include "tetixx.h" // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = // V A R I A B L E S // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = GsSPRITE ISCntrlSprite; static long _ActiBuf; void InsertStandardController(YXM_MODDATA *mod) { unsigned char mask; short exit; unsigned short osp; ISCntrlSprite.x = ((512 - 248) >> 1); ISCntrlSprite.y = ((256 - 40) >> 1); BGLeft.r = BGLeft.g = BGLeft.b = BGRight.r = BGRight.g = BGRight.b = 64; exit = 0; osp = StopYXM(mod); while (!exit) { _ActiBuf = GsGetActiveBuff(); if (*pport0 == 0x0) { mask = (unsigned char)*(pport0+1); mask>>=4; if (mask == 4) exit = 1; } GsSetWorkBase((PACKET*)GPU_WorkArea[_ActiBuf]); GsClearOt(0, 0, &WorldOT[_ActiBuf]); GsSortFastSprite(&BGLeft,&WorldOT[_ActiBuf],15); // draw background GsSortFastSprite(&BGRight,&WorldOT[_ActiBuf],15); GsSortFastSprite(&ISCntrlSprite,&WorldOT[_ActiBuf],13); DrawSync(0); VSync(0); GsSwapDispBuff(); GsSortClear(0x0, 0x0, 0x0, &WorldOT[_ActiBuf]); GsDrawOt(&WorldOT[_ActiBuf]); } BGLeft.r = BGLeft.g = BGLeft.b = BGRight.r = BGRight.g = BGRight.b = 0x68; ResetYXM(mod, osp); }