diff options
author | Chris Apers | 2004-01-20 13:59:04 +0000 |
---|---|---|
committer | Chris Apers | 2004-01-20 13:59:04 +0000 |
commit | ef14c7907b0744a68e1e8183bfa6387d65c92938 (patch) | |
tree | 045a898d66df8ea415e95d8fcc3db814091e7c6a /backends/PalmOS | |
parent | 7955e4ce72c47b38973b487f234d65494172ffed (diff) | |
download | scummvm-rg350-ef14c7907b0744a68e1e8183bfa6387d65c92938.tar.gz scummvm-rg350-ef14c7907b0744a68e1e8183bfa6387d65c92938.tar.bz2 scummvm-rg350-ef14c7907b0744a68e1e8183bfa6387d65c92938.zip |
Removed unused stuffs, added ARM init functions
svn-id: r12543
Diffstat (limited to 'backends/PalmOS')
-rw-r--r-- | backends/PalmOS/Src/extend.cpp | 60 | ||||
-rw-r--r-- | backends/PalmOS/Src/extend.h | 11 |
2 files changed, 47 insertions, 24 deletions
diff --git a/backends/PalmOS/Src/extend.cpp b/backends/PalmOS/Src/extend.cpp index 23fa98ab91..5b7cf20933 100644 --- a/backends/PalmOS/Src/extend.cpp +++ b/backends/PalmOS/Src/extend.cpp @@ -21,6 +21,7 @@ */ #include <PalmOS.h> + #include "extend.h" #include "string.h" #include "globals.h" @@ -33,6 +34,9 @@ void PalmFatalError(const Char *err) { if (gVars->screenLocked) WinScreenUnlock(); + + if (OPTIONS_TST(kOptModeHiDensity)) + WinSetCoordinateSystem(kCoordinatesStandard); WinEraseWindow(); FrmCustomAlert(FrmFatalErrorAlert, err, 0,0); @@ -74,27 +78,39 @@ UInt16 StrReplace(Char *ioStr, UInt16 inMaxLen, const Char *inParamStr, const Ch return occurences; } - -void WinDrawWarpChars(const Char *chars, Int16 len, Coord x, Coord y, Coord maxWidth) { - Char *part = (Char *)chars; - Coord x2 = x; - Int16 next; +/* +UInt32 PceNativeRsrcCall(DmResID resID, void *userDataP) { + PnoDescriptor pno; - if (part[StrLen(part)-1] == '\n') - part[StrLen(part)-1] = 0; - - part = StrTok(part," "); - - while ( part ) { - next = FntLineWidth (part, StrLen(part)) + FntLineWidth (" ",1); - if ((x2 + next - x) > maxWidth) { - x2 = x; - y += FntLineHeight(); - } - //HRWinDrawTruncChars(gHRrefNum, part, StrLen(part), x2, y, maxWidth - (x2-x)); - WinDrawTruncChars(part, StrLen(part), x2, y, maxWidth - (x2-x)); - x2 += next; - - part = StrTok(NULL," "); - } + MemHandle armH = DmGetResource('ARMC', resID); + MemPtr pnoPtr = MemHandleLock(armH); + +// UInt32 result = PceNativeCall((NativeFuncType*)armP, userDataP); + PnoLoad(&pno, pnoPtr); + UInt32 result = PnoCall(&pno, userDataP); + PnoUnload(&pno); + + MemHandleUnlock(armH); + DmReleaseResource(armH); + + return result; +}*/ +UInt32 PceNativeRsrcCall(PnoDescriptor *pno, void *userDataP) { + return PnoCall(pno, userDataP);; +} + +MemPtr PceNativeCallInit(DmResID resID, PnoDescriptor *pno) { + MemHandle armH = DmGetResource('ARMC', resID); + MemPtr pnoPtr = MemHandleLock(armH); + PnoLoad(pno, pnoPtr); + + return pnoPtr; +} + +void PceNativeCallRelease(PnoDescriptor *pno, MemPtr ptr) { + MemHandle h = MemPtrRecoverHandle(ptr); + + PnoUnload(pno); + MemPtrUnlock(ptr); + DmReleaseResource(h); } diff --git a/backends/PalmOS/Src/extend.h b/backends/PalmOS/Src/extend.h index 30ae1dbee1..d6104f1780 100644 --- a/backends/PalmOS/Src/extend.h +++ b/backends/PalmOS/Src/extend.h @@ -23,21 +23,28 @@ #ifndef EXTEND_H #define EXTEND_H +#include "PNOLoader.h" + extern const Char *SCUMMVM_SAVEPATH; //#define DISABLE_SCUMM #define DISABLE_SKY //#define DISABLE_SIMON +#define DISABLE_SWORD1 #define DISABLE_SWORD2 #define DISABLE_QUEEN // PalmOS -#define DISABLE_TAPWAVE +//#define DISABLE_TAPWAVE +#define DEBUG_ARM int main(int argc, char **argv); -void WinDrawWarpChars(const Char *chars, Int16 len, Coord x, Coord y, Coord maxWidth); UInt16 StrReplace(Char *ioStr, UInt16 inMaxLen, const Char *inParamStr, const Char *fndParamStr); void PalmFatalError(const Char *err); +UInt32 PceNativeRsrcCall(PnoDescriptor *pno, void *userDataP); +MemPtr PceNativeCallInit(DmResID resID, PnoDescriptor *pno); +void PceNativeCallRelease(PnoDescriptor *pno, MemPtr ptr); + #endif |