[Scummvm-cvs-logs] SF.net SVN: scummvm: [25143] scummvm/trunk/backends/platform/PalmOS/Src

chrilith at users.sourceforge.net chrilith at users.sourceforge.net
Sun Jan 21 10:55:44 CET 2007


Revision: 25143
          http://scummvm.svn.sourceforge.net/scummvm/?rev=25143&view=rev
Author:   chrilith
Date:     2007-01-21 01:55:44 -0800 (Sun, 21 Jan 2007)

Log Message:
-----------
Clenaup

Modified Paths:
--------------
    scummvm/trunk/backends/platform/PalmOS/Src/be_os5.cpp
    scummvm/trunk/backends/platform/PalmOS/Src/be_os5.h
    scummvm/trunk/backends/platform/PalmOS/Src/be_zodiac.cpp
    scummvm/trunk/backends/platform/PalmOS/Src/be_zodiac.h
    scummvm/trunk/backends/platform/PalmOS/Src/os5_event.cpp

Modified: scummvm/trunk/backends/platform/PalmOS/Src/be_os5.cpp
===================================================================
--- scummvm/trunk/backends/platform/PalmOS/Src/be_os5.cpp	2007-01-21 09:54:27 UTC (rev 25142)
+++ scummvm/trunk/backends/platform/PalmOS/Src/be_os5.cpp	2007-01-21 09:55:44 UTC (rev 25143)
@@ -67,10 +67,10 @@
 
 	} else {
 		w = gVars->screenWidth;
-		h = gVars->screenHeight - MIN_OFFSET * 2;
+		h = gVars->screenHeight * _screenHeight / _screenWidth;
 
 		_screenOffset.x = 0;
-		_screenOffset.y = MIN_OFFSET;		
+		_screenOffset.y = (gVars->screenHeight - h) / 2;		
 	}
 	
 	_screenDest.w = w;

Modified: scummvm/trunk/backends/platform/PalmOS/Src/be_os5.h
===================================================================
--- scummvm/trunk/backends/platform/PalmOS/Src/be_os5.h	2007-01-21 09:54:27 UTC (rev 25142)
+++ scummvm/trunk/backends/platform/PalmOS/Src/be_os5.h	2007-01-21 09:55:44 UTC (rev 25143)
@@ -27,8 +27,6 @@
 
 #include "be_base.h"
 
-#define MIN_OFFSET	20
-
 #if !defined(SYSTEM_CALLBACK) || defined(PALMOS_68K)
 #	define SYSTEM_CALLBACK
 #	ifdef PALMOS_ARM
@@ -125,10 +123,8 @@
 
 	void draw_mouse();
 	void undraw_mouse();
-	virtual void get_coordinates(EventPtr ev, Coord &x, Coord &y);
 	virtual bool check_event(Event &event, EventPtr ev);
 	virtual void extras_palette(uint8 index, uint8 r, uint8 g, uint8 b);
-	void calc_rect(Boolean fullscreen);
 	void calc_scale();
 
 	void render_landscapeAny(RectangleType &r, PointType &p);
@@ -158,6 +154,9 @@
 		Coord height;	// (480 x height)
 	} _ratio;
 
+	void calc_rect(Boolean fullscreen);
+	void get_coordinates(EventPtr ev, Coord &x, Coord &y);
+
 public:
 	OSystem_PalmOS5();
 	static OSystem *create();

Modified: scummvm/trunk/backends/platform/PalmOS/Src/be_zodiac.cpp
===================================================================
--- scummvm/trunk/backends/platform/PalmOS/Src/be_zodiac.cpp	2007-01-21 09:54:27 UTC (rev 25142)
+++ scummvm/trunk/backends/platform/PalmOS/Src/be_zodiac.cpp	2007-01-21 09:55:44 UTC (rev 25143)
@@ -42,30 +42,12 @@
 }
 
 void OSystem_PalmZodiac::calc_rect(Boolean fullscreen) {
-	Int32 w, h;
-	
-	if (fullscreen) {
-		w = (_ratio.adjustAspect == kRatioWidth) ? _ratio.width : gVars->screenFullWidth;
-		h = (_ratio.adjustAspect == kRatioHeight) ? _ratio.height : gVars->screenFullHeight;
+	OSystem_PalmOS5::calc_rect(fullscreen);
 
-		_screenOffset.x = (_ratio.adjustAspect == kRatioWidth) ? (gVars->screenFullWidth - _ratio.width) / 2 : 0;
-		_screenOffset.y = (_ratio.adjustAspect == kRatioHeight) ? (gVars->screenFullHeight - _ratio.height) / 2 : 0;
-
-	} else {
-		w = gVars->screenWidth;
-		h = gVars->screenHeight - MIN_OFFSET * 2;
-
-		_screenOffset.x = 0;
-		_screenOffset.y = MIN_OFFSET;		
-	}
-
 	_dstRect.x = _screenOffset.x;
 	_dstRect.y = _screenOffset.y;
-	_dstRect.w = w;
-	_dstRect.h = h;
-	
-	_screenDest.w = _dstRect.w;
-	_screenDest.h = _dstRect.h;
+	_dstRect.w = _screenDest.w;
+	_dstRect.h = _screenDest.h;
 }
 
 void OSystem_PalmZodiac::setFeatureState(Feature f, bool enable) {

Modified: scummvm/trunk/backends/platform/PalmOS/Src/be_zodiac.h
===================================================================
--- scummvm/trunk/backends/platform/PalmOS/Src/be_zodiac.h	2007-01-21 09:54:27 UTC (rev 25142)
+++ scummvm/trunk/backends/platform/PalmOS/Src/be_zodiac.h	2007-01-21 09:55:44 UTC (rev 25143)
@@ -55,7 +55,6 @@
 
 	void extras_palette(uint8 index, uint8 r, uint8 g, uint8 b);
 	void calc_rect(Boolean fullscreen);
-	void get_coordinates(EventPtr ev, Coord &x, Coord &y);
 	bool check_event(Event &event, EventPtr ev);
 	void draw_osd(UInt16 id, Int32 x, Int32 y, Boolean show, UInt8 color = 0);
 

Modified: scummvm/trunk/backends/platform/PalmOS/Src/os5_event.cpp
===================================================================
--- scummvm/trunk/backends/platform/PalmOS/Src/os5_event.cpp	2007-01-21 09:54:27 UTC (rev 25142)
+++ scummvm/trunk/backends/platform/PalmOS/Src/os5_event.cpp	2007-01-21 09:55:44 UTC (rev 25143)
@@ -27,27 +27,13 @@
 void OSystem_PalmOS5::get_coordinates(EventPtr ev, Coord &x, Coord &y) {
 	Boolean dummy;
 	EvtGetPenNative(WinGetDisplayWindow(), &ev->screenX, &ev->screenY, &dummy);
-	
+
 	x = (ev->screenX - _screenOffset.x);
 	y = (ev->screenY - _screenOffset.y);
 
 	if (_stretched) {
-		Int32 w, h;
-
-		if (_mode == GFX_NORMAL) {
-
-			h = gVars->screenHeight - MIN_OFFSET * 2;
-			w = gVars->screenWidth;
-			x = (_screenWidth * x) / w;
-			y = (_screenHeight * y) / h;
-
-		} else {
-
-			h = (_ratio.adjustAspect == kRatioHeight ? _ratio.height : gVars->screenFullHeight);
-			w = (_ratio.adjustAspect == kRatioWidth ? _ratio.width : gVars->screenFullWidth);
-			x = (_screenWidth * x) / w;
-			y = (_screenHeight * y) / h;
-		}
+		x = (x * _screenWidth) / _screenDest.w;
+		y = (y * _screenHeight) / _screenDest.h;
 	}
 }
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list