[Scummvm-cvs-logs] CVS: scummvm/backends/PalmOS/Src palm.cpp,1.27,1.28 palm.h,1.20,1.21

Chris Apers chrilith at users.sourceforge.net
Thu Feb 5 06:29:02 CET 2004


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

Modified Files:
	palm.cpp palm.h 
Log Message:
More wide display support, 5way navigator support, prepare zodiac, arm and sound support, and many more stuffs...

Index: palm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/PalmOS/Src/palm.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- palm.cpp	6 Jan 2004 12:45:25 -0000	1.27
+++ palm.cpp	5 Feb 2004 14:25:34 -0000	1.28
@@ -19,21 +19,26 @@
  * $Header$
  *
  */
+#include "stdafx.h"
 
 #include "backends/intern.h"
 #include "scumm.h"
 #include "common/scaler.h"
+#include "common/config-manager.h"
+
+#include "shared.h"
[...1435 lines suppressed...]
-	}
 
 	if (w <= 0 || h <= 0)
 		return;
 
-	undraw_mouse();
+	/* FIXME: undraw mouse only if the draw rect intersects with the mouse rect */
+	if (_mouseDrawn) {
+/*		RectangleType mouse = {_mouseCurState.x, _mouseCurState.y, _mouseCurState.w, _mouseCurState.h};
+		RectangleType copy	= {x, y, w, h};
+		RectangleType result;
+		
+		RctGetIntersection(&mouse, &copy, &result);
+		
+		if (result.extent.x !=0 && result.extent.y !=0)*/
+			undraw_mouse();
+	}
 
 	if (MemPtrDataStorage(_tmpScreenP)) {
 		byte *dst = _tmpScreenP;

Index: palm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/PalmOS/Src/palm.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- palm.h	6 Jan 2004 12:45:25 -0000	1.20
+++ palm.h	5 Feb 2004 14:25:34 -0000	1.21
@@ -27,19 +27,23 @@
 #include "common/system.h"
 #include "cdaudio.h"
 
+#include "PNOLoader.h"
+
+
 Err HwrDisplayPalette(UInt8 operation, Int16 startIndex, 
 			 	  			 UInt16 paletteEntries, RGBColorType *tableP)
 							SYS_TRAP(sysTrapHwrDisplayPalette);
 
 typedef struct {
-	bool active;	
 	OSystem::SoundProc proc;
 	void *param;
 	OSystem::SoundFormat format;
+
 	SndStreamRef sndRefNum;
+	bool active, useHandler;
+	void *dataP;
 } SoundDataType;
 
-//-- 02-12-17 --////////////////////////////////////////////////////////////////
 class OSystem_PALMOS : public OSystem {
 public:
 	// Set colors of the palette
@@ -88,7 +92,7 @@
 	// Returns true if an event was retrieved.	
 	bool poll_event(Event *event);
 	
-	void SimulateArrowKeys(Event *event, Int8 iHoriz, Int8 iVert);
+	void SimulateArrowKeys(Event *event, Int8 iHoriz, Int8 iVert, Boolean repeat = false);
 
 	/** @name Sound */
 	//@{
@@ -153,10 +157,11 @@
 	// Savefile management
 	SaveFileManager *get_savefile_manager();
 
-	static OSystem *create(UInt16 gfx_mode, bool full_screen);
+	static OSystem *create(UInt16 gfx_mode);
 
-	UInt8 _sndHandle;
-	Boolean _isSndPlaying;
+//	UInt8 _sndHandle;
+//	Boolean _isSndPlaying;
+//	UInt8 *convP;
 
 protected:
 	byte *_tmpScreenP, *_tmpBackupP;
@@ -166,35 +171,35 @@
 	typedef void (OSystem_PALMOS::*RendererProc)();
 	RendererProc _renderer_proc;
 
-	UInt8 *_sndDataP, *_sndTempP;
-
 	void update_screen__flipping();
-	void update_screen__dbuffer();
+	void update_screen__buffered();
 	void update_screen__direct();
-	void update_screen__wide();
+	void update_screen__wide_portrait();
+	void update_screen__wide_landscape();
+	void update_screen__wide_zodiac();
+
+	void *ptrP[5];	// various ptr
 
 	WinHandle _screenH;
 	WinHandle _offScreenH;
-	Boolean _fullscreen;
+	Boolean _fullscreen, _adjustAspectRatio;
 	struct {
 		Coord x;
 		Coord y;
 		UInt32 addr;
 	} _screenOffset;
 
-public:
 	byte *_screenP;
+	byte *_offScreenP;
 	int _offScreenPitch;
 	int _screenPitch;
-	
-private:
-	byte *_offScreenP;
+
 
 	bool _mouseVisible;
 	bool _mouseDrawn;
 
 	enum {
-		MAX_MOUSE_W = 40,	// must be 80x80 with 640x480 games
+		MAX_MOUSE_W = 40,	// must be 80x80 with 640x480 games ?
 		MAX_MOUSE_H = 40
 	};
 
@@ -229,18 +234,44 @@
 	RGBColorType *_currentPalette;
 	uint _paletteDirtyStart, _paletteDirtyEnd;
 
-	void check_sound();
 
 	void draw_mouse();
 	void undraw_mouse();
+	
+	void sound_handler();
+	void timer_handler(UInt32 current_msecs);
+	
+	void getCoordinates(EventPtr event, Coord *x, Coord *y);
+	void draw1BitGfx(UInt16 id, UInt32 x, UInt32 y, Boolean clear);
 
 	void load_gfx_mode();
 	void unload_gfx_mode();
 	static void autosave();
 
+	// ARM
+	struct {
+		PnoDescriptor pnoDesc;
+		MemPtr pnoPtr;
+	} _arm;
+
 	CDAudio *_cdPlayer;
 	// PALM spec
 
+	enum {
+		kLastKeyNone			= 0,
+		kLastKeyMouseUp			= 1	<< 0,
+		kLastKeyMouseDown		= 1	<< 1,
+		kLastKeyMouseLeft		= 1	<< 2,
+		kLastKeyMouseRight		= 1	<< 3,
+		kLastKeyMouseButLeft	= 1 << 4,
+		kLastKeyMouseButRight	= 1 << 5,
+		
+		kLastKeyCalc			= 1 << 30,
+		kLastKeyAny				= 1 << 31
+	};
+
+	
+
 	Int32 _lastKeyPressed;
 	UInt32 _lastKeyRepeat;
 	UInt8 _lastKeyModifier;
@@ -251,7 +282,7 @@
 	eventsEnum _lastEvent;
 
 	OSystem_PALMOS();
-
+	void init_intern(UInt16 gfx_mode);
 };
 
 #endif
\ No newline at end of file





More information about the Scummvm-git-logs mailing list