void DoSlime(void) { long frameOld; pPicture=pAlloc(32768L + 16L); pAPicture=_pAlignPara(pPicture); pSlimeTable=pAlloc(MAXTRIG * sizeof(long) + 16L); pASlimeTable=_pAlignPara(pSlimeTable); pPalette=pAlloc(768); pTempPal=pAlloc(768); pTrig=pAlloc(MAXTRIG * sizeof(long)); pLoadFile("slime.bin", pAPicture, 32768L); pLoadFile("slime.tab", pASlimeTable, MAXTRIG * sizeof(long)); pLoadFile("slime.pal", pPalette, 768); pLoadFile("slime.trg", pTrig, MAXTRIG * sizeof(long)); FadePalFromBlack(pTempPal, pPalette, 0); RemapPal(pTempPal, 0, 256); tmrSyncScr(tmrSync200, preVR, NULL, inVR); frameCount=0; frameWaitOne(); while(pos != 255) { frameOld=frameCount; DrawPic(StartX, StartY, dX, dY, (ZoomSide) ? Zoom : -Zoom); while(frameCount == frameOld); } frameCount=0; while(frameCount < 128) { frameOld=frameCount; FadePalFromBlack(pTempPal, pPalette, 64 - (frameOld >> 1)); RemapPal(pTempPal, 0, 256); DrawPic(StartX, StartY, dX, dY, (ZoomSide) ? Zoom : -Zoom); while(frameCount == frameOld); } FadePalFromBlack(pTempPal, pPalette, 0); RemapPal(pTempPal, 0, 256); tmrSyncScr(tmrSync200, preVR, NULL, NULL); Free(pPicture); Free(pPalette); Free(pTrig); Free(pSlimeTable); }
EXPORT_C void * _pAlloc(size_t size) { return pAlloc(size); }