diff options
Diffstat (limited to 'backends/PalmOS/Src/arm/PNOMain.cpp')
-rw-r--r-- | backends/PalmOS/Src/arm/PNOMain.cpp | 65 |
1 files changed, 37 insertions, 28 deletions
diff --git a/backends/PalmOS/Src/arm/PNOMain.cpp b/backends/PalmOS/Src/arm/PNOMain.cpp index 1c1b2c051b..87175335ab 100644 --- a/backends/PalmOS/Src/arm/PNOMain.cpp +++ b/backends/PalmOS/Src/arm/PNOMain.cpp @@ -15,37 +15,46 @@ unsigned long PNO_Main( Call68KFuncType *call68KFuncP); unsigned long PNO_Main(const void *emulStateP, void *userData68KP, Call68KFuncType *call68KFuncP) { - unsigned long retVal = 0; + PnoProc *func[] = { +#if defined(COMPILE_COMMON) + OSystem_CopyRectToScreen, + OSystem_updateScreen_widePortrait, + OSystem_updateScreen_wideLandscape, +// MemoryStream_ReadBuffer + +#elif defined(COMPILE_QUEEN) + Display_blit + +#elif defined(COMPILE_SCUMM) + Gdi_drawStripToScreen, + CostumeRenderer_proc3 + +#elif defined(COMPILE_SWORD1) + Screen_draw, + Screen_drawSprite, + Screen_fastShrink, + Screen_renderParallax, + Screen_decompressTony, + Screen_decompressRLE7, + Screen_decompressRLE0 + +#endif + }; -#ifdef COMPILE_PACE // needed before making any OS calls using the // PACEInterface library InitPACEInterface(emulStateP, call68KFuncP); -#endif -#ifdef COMPILE_WIDELANDSCAPE - OSystem_updateScreen_wideLandscape(userData68KP); -#endif - -#ifdef COMPILE_WIDEPORTRAIT - OSystem_updateScreen_widePortrait(userData68KP); -#endif - -#ifdef COMPILE_COPYRECT - OSystem_CopyRectToScreen(userData68KP); -#endif - -#ifdef COMPILE_COSTUMEPROC3 - retVal = CostumeRenderer_proc3(userData68KP); -#endif - -#ifdef COMPILE_DRAWSTRIP - Gdi_drawStripToScreen(userData68KP); -#endif - -#ifdef COMPILE_BLIT - Display_blit(userData68KP); -#endif - - return ByteSwap32(retVal); + unsigned long retVal = 0; + PnoType *pno = (PnoType *)ByteSwap32(userData68KP); + UInt32 funcID = ReadUnaligned32(&pno->funcID); + void *dataP = (void *)ReadUnaligned32(&pno->dataP); +/* +char buf[100]; +StrIToA(buf,funcID); +WinDrawChars(buf,StrLen(buf),30,0); +*/ + retVal = func[funcID](dataP); + + return (retVal); } |