[Scummvm-cvs-logs] CVS: scummvm/backends/PalmOS/Src palm.h,1.32,1.33 palmgfx.cpp,1.4,1.5 palmrdr.cpp,1.4,1.5

Chris Apers chrilith at users.sourceforge.net
Mon Dec 20 09:14:04 CET 2004


Update of /cvsroot/scummvm/scummvm/backends/PalmOS/Src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv586

Modified Files:
	palm.h palmgfx.cpp palmrdr.cpp 
Log Message:
- Better ARM support
- Cleanup

Index: palm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/PalmOS/Src/palm.h,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- palm.h	28 Sep 2004 20:19:21 -0000	1.32
+++ palm.h	20 Dec 2004 17:13:26 -0000	1.33
@@ -26,6 +26,21 @@
 #include <SonyClie.h>
 #include "common/system.h"
 #include "cdaudio.h"
+//#include "arm/native.h"
+
+typedef struct {
+	void *proc;
+	void *param;
+
+	void	*handle;	// sound handle
+	UInt32	size;		// buffer size
+	UInt32	slot;
+	UInt32 	active,		// is the sound handler active
+			set,		// is the buffer filled
+			wait;		// do we need to wait for sound completion
+	void	*dataP,		// main buffer
+			*tmpP;		// tmp buffer (convertion)
+} SoundDataType;
 
 // OSD resource id
 #define kDrawKeyState	3000
@@ -76,6 +91,8 @@
 	// Update the dirty areas of the screen
 	void updateScreen();
 
+	void clearScreen();
+
 	// Either show or hide the mouse cursor
 	bool showMouse(bool visible);
 
@@ -181,8 +198,6 @@
 	void updateScreen_wideLandscape();
 	void updateScreen_wideZodiac();
 
-	void rumblePack(Boolean active);
-
 	void *ptrP[5];	// various ptr
 
 	WinHandle _screenH, _offScreenH;
@@ -302,6 +317,5 @@
 // Sound
 void pcm2adpcm(Int16 *src, UInt8 *dst, UInt32 length);
 Err sndCallback(void* UserDataP, SndStreamRef stream, void* bufferP, UInt32 *bufferSizeP);
-void ClearScreen();
 
-#endif
\ No newline at end of file
+#endif

Index: palmgfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/PalmOS/Src/palmgfx.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- palmgfx.cpp	9 Nov 2004 10:54:45 -0000	1.4
+++ palmgfx.cpp	20 Dec 2004 17:13:26 -0000	1.5
@@ -131,7 +131,6 @@
 
 	if (OPTIONS_TST(kOptMode16Bit)) {
 		WinScreenMode(winScreenModeSet, &width, &height, &depth, &color);
-		ClearScreen();
 		OPTIONS_SET(kOptDisableOnScrDisp);
 	}
 }
@@ -281,6 +280,7 @@
 #ifndef DISABLE_TAPWAVE
 				if (OPTIONS_TST(kOptDeviceZodiac)) {
 					HotSwap16bitMode(true);
+					clearScreen();
 					_twBmpV3 = (void *)WinGetBitmap(_offScreenH);
 
 					// TODO : change _screenP with the correct value (never used in this mode ?)
@@ -291,10 +291,7 @@
 				{
 					gVars->screenLocked = true;
 					_screenP = WinScreenLock(winLockErase) + _screenOffset.addr;
-					
-					if (OPTIONS_TST(kOptDeviceARM))
-						ARM(PNO_WIDE).pnoPtr = _PnoInit((OPTIONS_TST(kOptModeLandscape) ? RSC_WIDELANDSCAPE : RSC_WIDEPORTRAIT), &ARM(PNO_WIDE).pnoDesc);
-					
+									
 					_renderer_proc = (OPTIONS_TST(kOptModeLandscape)) ?
 						&OSystem_PALMOS::updateScreen_wideLandscape :
 						&OSystem_PALMOS::updateScreen_widePortrait;
@@ -350,14 +347,12 @@
 			if (OPTIONS_TST(kOptDeviceZodiac)) {
 				ZodiacRelease(ptrP);
 				HotSwap16bitMode(false);
+				clearScreen();
 			} else
 #endif
 			{
 				WinScreenUnlock();
 				gVars->screenLocked = false;
-
-				if (OPTIONS_TST(kOptDeviceARM) && ARM(PNO_WIDE).pnoPtr)
-					_PnoFree(&ARM(PNO_WIDE).pnoDesc, ARM(PNO_WIDE).pnoPtr);
 			}
 				// continue to GFX_BUFFERED
 
@@ -427,7 +422,7 @@
 	
 	// restore offscreen
 	WinPalette(winPaletteSet, 0, 256, _currentPalette);
-	ClearScreen();
+	clearScreen();
 	copyRectToScreen(_tmpHotSwapP, _screenWidth, 0, 0, _screenWidth, _screenHeight);
 	_modeChanged = false;
 	
@@ -530,13 +525,14 @@
 	// if ARM
 	ARM_CHECK_EXEC(w > 8 && h > 8)
 		ARM_START(CopyRectangleType)
+			ARM_INIT(COMMON_COPYRECT)
 			ARM_ADDM(dst)
 			ARM_ADDM(buf)
 			ARM_ADDM(pitch)
 			ARM_ADDM(_offScreenPitch)
 			ARM_ADDM(w)
 			ARM_ADDM(h)
-			PNO_CALL(PNO_COPYRECT, ARM_DATA())
+			ARM_CALL(ARM_COMMON, PNO_DATA());
 		ARM_END()
 	ARM_CHECK_END()
 	// if no ARM
@@ -644,4 +640,15 @@
 		MemPtrUnlock(bmTemp);
 		DmReleaseResource(hTemp);
 	}
-}
\ No newline at end of file
+}
+
+void OSystem_PALMOS::clearScreen() {
+	Coord w, h;
+	RectangleType r;
+
+	WinSetDrawWindow(WinGetDisplayWindow());
+	WinGetDisplayExtent(&w, &h);
+	RctSetRectangle(&r, 0, 0, w, h);
+	WinSetForeColor(RGBToColor(0,0,0));
+	WinDrawRectangle(&r,0);
+}

Index: palmrdr.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/PalmOS/Src/palmrdr.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- palmrdr.cpp	9 Nov 2004 11:25:48 -0000	1.4
+++ palmrdr.cpp	20 Dec 2004 17:13:26 -0000	1.5
@@ -34,7 +34,7 @@
 #include "arm/native.h"
 #include "arm/macros.h"
 
-void OSystem_PALMOS::rumblePack(Boolean active) {
+static void rumblePack(Boolean active) {
 	if (!gVars->vibrator)
 		return;
 
@@ -123,9 +123,10 @@
 	
 	// update screen
 	ARM_START(WideType)
+		ARM_INIT(COMMON_WPORTRAIT)
 		ARM_ADDM(dst)
 		ARM_ADDM(src)
-		PNO_CALL(PNO_WIDE, ARM_DATA())
+		ARM_CALL(ARM_COMMON, PNO_DATA())
 	ARM_CONTINUE()
 	{
 		Coord x, y;
@@ -185,9 +186,10 @@
 	
 	// update screen
 	ARM_START(WideType)
+		ARM_INIT(COMMON_WLANDSCAPE)
 		ARM_ADDM(dst)
 		ARM_ADDM(src)
-		PNO_CALL(PNO_WIDE, ARM_DATA())
+		ARM_CALL(ARM_COMMON, PNO_DATA())
 	ARM_CONTINUE()
 	{
 		Coord x, y;





More information about the Scummvm-git-logs mailing list