2004-02-05 14:02:24 +00:00
|
|
|
#include "PACEInterfaceLib.h"
|
2004-09-12 12:42:07 +00:00
|
|
|
#include "native.h"
|
2004-02-05 14:02:24 +00:00
|
|
|
|
|
|
|
// Linker still looks for ARMlet_Main as entry point, but the
|
|
|
|
// "ARMlet" name is now officially discouraged. Compare an
|
|
|
|
// contrast to "PilotMain" for 68K applications.
|
|
|
|
#define PNO_Main ARMlet_Main
|
|
|
|
|
2004-05-25 13:44:22 +00:00
|
|
|
// ------------------------
|
|
|
|
|
|
|
|
extern "C"
|
|
|
|
unsigned long PNO_Main(
|
2005-07-30 21:11:48 +00:00
|
|
|
const void *emulStateP,
|
|
|
|
void *userData68KP,
|
2004-05-25 13:44:22 +00:00
|
|
|
Call68KFuncType *call68KFuncP);
|
2004-02-05 14:02:24 +00:00
|
|
|
|
|
|
|
unsigned long PNO_Main(const void *emulStateP, void *userData68KP, Call68KFuncType *call68KFuncP) {
|
2004-12-20 17:38:31 +00:00
|
|
|
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
|
|
|
|
};
|
2004-05-25 13:44:22 +00:00
|
|
|
|
2005-07-30 21:11:48 +00:00
|
|
|
// needed before making any OS calls using the
|
2004-02-05 14:02:24 +00:00
|
|
|
// PACEInterface library
|
|
|
|
InitPACEInterface(emulStateP, call68KFuncP);
|
|
|
|
|
2004-12-20 17:38:31 +00:00
|
|
|
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);
|
2004-02-05 14:02:24 +00:00
|
|
|
}
|