diff options
author | Chris Apers | 2004-11-09 11:48:12 +0000 |
---|---|---|
committer | Chris Apers | 2004-11-09 11:48:12 +0000 |
commit | 27449a32541f434230bdff8f54a290ba40e5db53 (patch) | |
tree | 2bec7a4e938f134cbb5e90581beafe6e45668736 /backends/PalmOS | |
parent | 5fd488b7a0e39dadb93cc8c7875ed6d28abfab01 (diff) | |
download | scummvm-rg350-27449a32541f434230bdff8f54a290ba40e5db53.tar.gz scummvm-rg350-27449a32541f434230bdff8f54a290ba40e5db53.tar.bz2 scummvm-rg350-27449a32541f434230bdff8f54a290ba40e5db53.zip |
- ARM call functions moved to init_arm.cpp
- Added new operators
- cleanup
svn-id: r15767
Diffstat (limited to 'backends/PalmOS')
-rw-r--r-- | backends/PalmOS/Src/extend.cpp | 45 | ||||
-rw-r--r-- | backends/PalmOS/Src/extend.h | 3 |
2 files changed, 12 insertions, 36 deletions
diff --git a/backends/PalmOS/Src/extend.cpp b/backends/PalmOS/Src/extend.cpp index 70d1f891bb..9a84dc1de8 100644 --- a/backends/PalmOS/Src/extend.cpp +++ b/backends/PalmOS/Src/extend.cpp @@ -25,7 +25,7 @@ #include "extend.h" #include "globals.h" -#include "starterrsc.h" +#include "enginersc.h" #include "arm/native.h" @@ -107,40 +107,17 @@ UInt16 StrReplace(Char *ioStr, UInt16 inMaxLen, const Char *inParamStr, const Ch return occurences; } -MemPtr _PceInit(DmResID resID) { - MemHandle armH = DmGetResource('ARMC', resID); - NativeFuncType *armP = (NativeFuncType *)MemHandleLock(armH); - return armP; +// This is now required since some classes are now very big :) +#include "MemGlue.h" +void *operator new(UInt32 size) { + void *ptr = MemGluePtrNew(size); + MemSet(ptr, 0, size); + return ptr; } -UInt32 _PceCall(void *armP, void *userDataP) { - return PceNativeCall((NativeFuncType *)armP, userDataP); -} - -void _PceFree(void *armP) { - MemHandle armH = MemPtrRecoverHandle(armP); - - MemPtrUnlock(armP); - DmReleaseResource(armH); -} - -MemPtr _PnoInit(DmResID resID, PnoDescriptor *pnoP) { - MemHandle armH = DmGetResource('ARMC', resID); - MemPtr armP = MemHandleLock(armH); - PnoLoad(pnoP, armP); - - return armP; -} - -UInt32 _PnoCall(PnoDescriptor *pnoP, void *userDataP) { - return PnoCall(pnoP, userDataP); -} - -void _PnoFree(PnoDescriptor *pnoP, MemPtr armP) { - MemHandle armH = MemPtrRecoverHandle(armP); - - PnoUnload(pnoP); - MemPtrUnlock(armP); - DmReleaseResource(armH); +void *operator new [] (UInt32 size) { + void *ptr = MemGluePtrNew(size); + MemSet(ptr, 0, size); + return ptr; } diff --git a/backends/PalmOS/Src/extend.h b/backends/PalmOS/Src/extend.h index dd9fcfbcae..8a01814805 100644 --- a/backends/PalmOS/Src/extend.h +++ b/backends/PalmOS/Src/extend.h @@ -26,9 +26,8 @@ extern const Char *SCUMMVM_SAVEPATH; int main(int argc, char **argv); - UInt16 StrReplace(Char *ioStr, UInt16 inMaxLen, const Char *inParamStr, const Char *fndParamStr); - void PalmFatalError(const Char *err); +void DrawStatus(Boolean show); #endif |