[Scummvm-cvs-logs] CVS: scummvm/backends/PalmOS/Src extend.cpp,1.6,1.7 extend.h,1.9,1.10

Chris Apers chrilith at users.sourceforge.net
Tue Jan 20 06:00:01 CET 2004


Update of /cvsroot/scummvm/scummvm/backends/PalmOS/Src
In directory sc8-pr-cvs1:/tmp/cvs-serv4901

Modified Files:
	extend.cpp extend.h 
Log Message:
Removed unused stuffs, added ARM init functions

Index: extend.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/PalmOS/Src/extend.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- extend.cpp	6 Jan 2004 12:45:25 -0000	1.6
+++ extend.cpp	20 Jan 2004 13:59:04 -0000	1.7
@@ -21,6 +21,7 @@
  */
  
 #include <PalmOS.h>
+
 #include "extend.h"
 #include "string.h"
 #include "globals.h"
@@ -33,6 +34,9 @@
 
 	if (gVars->screenLocked)
 		WinScreenUnlock();
+	
+	if (OPTIONS_TST(kOptModeHiDensity))
+		WinSetCoordinateSystem(kCoordinatesStandard);
 
 	WinEraseWindow();
 	FrmCustomAlert(FrmFatalErrorAlert, err, 0,0);
@@ -74,27 +78,39 @@
 
 	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;
+	MemHandle armH = DmGetResource('ARMC', resID);
+	MemPtr pnoPtr = MemHandleLock(armH);
 
-	part = StrTok(part," ");
+//	UInt32 result = PceNativeCall((NativeFuncType*)armP, userDataP);
+	PnoLoad(&pno, pnoPtr);
+	UInt32 result = PnoCall(&pno, userDataP);
+	PnoUnload(&pno);
 
-	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;
+	MemHandleUnlock(armH);
+	DmReleaseResource(armH);
 
-		part = StrTok(NULL," ");
-	}
+	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);
 }

Index: extend.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/PalmOS/Src/extend.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- extend.h	6 Jan 2004 12:45:25 -0000	1.9
+++ extend.h	20 Jan 2004 13:59:04 -0000	1.10
@@ -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





More information about the Scummvm-git-logs mailing list