diff options
author | Chris Apers | 2005-10-12 20:41:00 +0000 |
---|---|---|
committer | Chris Apers | 2005-10-12 20:41:00 +0000 |
commit | d9527b601e26d6cf918302f9f4255ddfcb7a7974 (patch) | |
tree | 815519f48c83b413b612bc75737f6461348ea8a6 /backends/PalmOS/Src | |
parent | 559bf8634c08c8291ae993f5f2fc792985e2c7c7 (diff) | |
download | scummvm-rg350-d9527b601e26d6cf918302f9f4255ddfcb7a7974.tar.gz scummvm-rg350-d9527b601e26d6cf918302f9f4255ddfcb7a7974.tar.bz2 scummvm-rg350-d9527b601e26d6cf918302f9f4255ddfcb7a7974.zip |
Not needed
svn-id: r19048
Diffstat (limited to 'backends/PalmOS/Src')
-rw-r--r-- | backends/PalmOS/Src/extend.cpp | 45 |
1 files changed, 29 insertions, 16 deletions
diff --git a/backends/PalmOS/Src/extend.cpp b/backends/PalmOS/Src/extend.cpp index b1d53f2fc4..1802b0dfc5 100644 --- a/backends/PalmOS/Src/extend.cpp +++ b/backends/PalmOS/Src/extend.cpp @@ -19,7 +19,7 @@ * $Header$ * */ - + #include <PalmOS.h> #include <string.h> @@ -32,20 +32,12 @@ const Char *SCUMMVM_SAVEPATH = "/PALM/Programs/ScummVM/Saved/"; void PalmFatalError(const Char *err) { WinSetDrawWindow(WinGetDisplayWindow()); WinPalette(winPaletteSetToDefault,0,0,0); - - // unlock to show the alert box - if (gVars->screenLocked) - WinScreenUnlock(); - + if (OPTIONS_TST(kOptModeHiDensity)) WinSetCoordinateSystem(kCoordinatesStandard); WinEraseWindow(); FrmCustomAlert(FrmFatalErrorAlert, err, 0,0); - - // relock to prevent crash unloading gfx mode - if (gVars->screenLocked) - WinScreenLock(winLockDontCare); } @@ -57,9 +49,6 @@ void DrawStatus(Boolean show) { UInt8 *screen = (UInt8 *)(BmpGetBits(WinGetBitmap(WinGetDisplayWindow()))); UInt8 color = (show? gVars->indicator.on : gVars->indicator.off); - if (gVars->screenLocked) - screen = (screen == gVars->flipping.pageAddr1) ? gVars->flipping.pageAddr2 : gVars->flipping.pageAddr1; - screen += gVars->screenPitch + 1; for(y=0; y < 4; y++) { for(x=0; x < 4; x++) @@ -78,10 +67,10 @@ UInt16 StrReplace(Char *ioStr, UInt16 inMaxLen, const Char *inParamStr, const Ch UInt16 l2 = 0; UInt16 l3 = StrLen(ioStr); UInt16 next = 0; - + if (inParamStr) l2 = StrLen(inParamStr); // can be null to know how many occur. - + while (((found = StrStr(ioStr+next, fndParamStr)) != NULL) && (!quit)) { occurences++; newLength = (StrLen(ioStr) - l1 + l2); @@ -98,7 +87,7 @@ UInt16 StrReplace(Char *ioStr, UInt16 inMaxLen, const Char *inParamStr, const Ch } else next = found - ioStr + l1; } - + if (inParamStr) ioStr[l3 + l2*occurences - l1*occurences] = 0; @@ -106,6 +95,8 @@ UInt16 StrReplace(Char *ioStr, UInt16 inMaxLen, const Char *inParamStr, const Ch } +#ifndef PALMOS_ARM + // This is now required since some classes are now very big :) #include "MemGlue.h" void *operator new(UInt32 size) { @@ -119,3 +110,25 @@ void *operator new [] (UInt32 size) { MemSet(ptr, 0, size); return ptr; } +#else +/* +__inline void *operator new(UInt32 size) { + void *ptr = MemPtrNew(size); + MemSet(ptr, 0, size); + return ptr; +} + +__inline void *operator new [] (UInt32 size) { + void *ptr = MemPtrNew(size); + MemSet(ptr, 0, size); + return ptr; +} + +__inline void operator delete(void *ptr) throw() { + if (ptr) MemPtrFree(ptr); +} + +__inline void operator delete[](void *ptr) throw() { + if (ptr) MemPtrFree(ptr); +}*/ +#endif |