[Scummvm-cvs-logs] SF.net SVN: scummvm: [22849] scummvm/trunk/backends/sdl

sev at users.sourceforge.net sev at users.sourceforge.net
Sat Jun 3 03:05:50 CEST 2006


Revision: 22849
Author:   sev
Date:     2006-06-02 18:05:09 -0700 (Fri, 02 Jun 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22849&view=rev

Log Message:
-----------
More maemo port development

Modified Paths:
--------------
    scummvm/trunk/backends/maemo/Makefile
    scummvm/trunk/backends/maemo/main.cpp
    scummvm/trunk/backends/sdl/graphics.cpp
    scummvm/trunk/backends/sdl/sdl.cpp

Added Paths:
-----------
    scummvm/trunk/backends/maemo/maemo-sdl.cpp
    scummvm/trunk/backends/maemo/maemo-sdl.h
Modified: scummvm/trunk/backends/maemo/Makefile
===================================================================
--- scummvm/trunk/backends/maemo/Makefile	2006-06-03 00:30:28 UTC (rev 22848)
+++ scummvm/trunk/backends/maemo/Makefile	2006-06-03 01:05:09 UTC (rev 22849)
@@ -5,13 +5,27 @@
 #control build
 DISABLE_HQ_SCALERS = true
 
+#DISABLE_SCUMM = 1
+#DISABLE_HE = 1
+DISABLE_SIMON = 1
+DISABLE_SKY = 1
+DISABLE_SWORD1 = 1
+DISABLE_SWORD2 = 1
+DISABLE_QUEEN = 1
+DISABLE_KYRA = 1
+DISABLE_SAGA = 1
+DISABLE_GOB = 1
+DISABLE_LURE = 1
+DISABLE_CINE = 1
+DISABLE_AGI = 1
+
 srcdir = ../..
 VPATH = $(srcdir)
 
 CXX := g++
 EXECUTABLE  := scummvm
 
-INCDIR = ../../
+INCDIR = ../../ . $(srcdir)/engines/
 
 CXXFLAGS := -g -ansi -W -Wno-unused-parameter
 CXXFLAGS += `pkg-config --cflags gconf-2.0 hildon-libs gtk+-2.0 libosso gdk-2.0`
@@ -40,7 +54,7 @@
 RM_REC  := rm -f -r
 CP      := cp
 
-OBJS := main.o
+OBJS := main.o maemo-sdl.o
 
 MODULE_DIRS += .
 

Added: scummvm/trunk/backends/maemo/maemo-sdl.cpp
===================================================================
--- scummvm/trunk/backends/maemo/maemo-sdl.cpp	                        (rev 0)
+++ scummvm/trunk/backends/maemo/maemo-sdl.cpp	2006-06-03 01:05:09 UTC (rev 22849)
@@ -0,0 +1,42 @@
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2001-2006 The ScummVM project
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#include "common/stdafx.h"
+#include "backends/maemo/maemo-sdl.h"
+
+
+void OSystem_MAEMO::loadGFXMode() {
+	if (_fullscreen || _screenHeight > 400) {
+		_overlayWidth = 800;
+		_overlayHeight = 480;
+
+		_fullscreen = true;
+	} else {
+		_overlayWidth = 720;
+		_overlayHeight = 400;
+	}
+
+	if (_screenHeight != 200)
+		_adjustAspectRatio = false;
+
+	OSystem_SDL::loadGFXMode();
+}


Property changes on: scummvm/trunk/backends/maemo/maemo-sdl.cpp
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Date Rev Author URL Id
Name: svn:eol-style
   + native

Added: scummvm/trunk/backends/maemo/maemo-sdl.h
===================================================================
--- scummvm/trunk/backends/maemo/maemo-sdl.h	                        (rev 0)
+++ scummvm/trunk/backends/maemo/maemo-sdl.h	2006-06-03 01:05:09 UTC (rev 22849)
@@ -0,0 +1,41 @@
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2001-2006 The ScummVM project
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#ifndef MAEMO_SDL_H
+#define MAEMO_SDL_H
+
+#include "common/stdafx.h"
+#include "backends/sdl/sdl-common.h"
+
+//#include "CEkeys.h"
+
+#include <SDL.h>
+
+
+class OSystem_MAEMO : public OSystem_SDL {
+public:
+	OSystem_MAEMO() {};
+
+	void loadGFXMode();
+};
+
+#endif


Property changes on: scummvm/trunk/backends/maemo/maemo-sdl.h
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Date Rev Author URL Id
Name: svn:eol-style
   + native

Modified: scummvm/trunk/backends/maemo/main.cpp
===================================================================
--- scummvm/trunk/backends/maemo/main.cpp	2006-06-03 00:30:28 UTC (rev 22848)
+++ scummvm/trunk/backends/maemo/main.cpp	2006-06-03 01:05:09 UTC (rev 22849)
@@ -28,7 +28,7 @@
 #include <SDL/SDL.h>
 #include <SDL/SDL_syswm.h>
 
-#include "backends/sdl/sdl-common.h"
+#include "backends/maemo/maemo-sdl.h"
 #include "base/main.h"
 #include <hildon-widgets/hildon-app.h>
 #include <gtk/gtk.h>
@@ -65,7 +65,7 @@
 
 	set_doubling(0);
 
-	g_system = new OSystem_SDL();
+	g_system = new OSystem_MAEMO();
 	assert(g_system);
 
 	// Invoke the actual ScummVM main entry point:

Modified: scummvm/trunk/backends/sdl/graphics.cpp
===================================================================
--- scummvm/trunk/backends/sdl/graphics.cpp	2006-06-03 00:30:28 UTC (rev 22848)
+++ scummvm/trunk/backends/sdl/graphics.cpp	2006-06-03 01:05:09 UTC (rev 22849)
@@ -310,6 +310,9 @@
 	_forceFull = true;
 	_modeFlags |= DF_UPDATE_EXPAND_1_PIXEL;
 
+	int hwW, hwH;
+
+#ifndef __MAEMO__
 	_overlayWidth = _screenWidth * _scaleFactor;
 	_overlayHeight = _screenHeight * _scaleFactor;
 
@@ -319,6 +322,13 @@
 	if (_adjustAspectRatio)
 		_overlayHeight = real2Aspect(_overlayHeight);
 
+	hwW = _screenWidth * _scaleFactor;
+	hwH = effectiveScreenHeight();
+#else
+	hwW = _overlayWidth;
+	hwH = _overlayHeight;
+#endif
+
 	//
 	// Create the surface that contains the 8 bit game data
 	//
@@ -330,7 +340,7 @@
 	// Create the surface that contains the scaled graphics in 16 bit mode
 	//
 
-	_hwscreen = SDL_SetVideoMode(_screenWidth * _scaleFactor, effectiveScreenHeight(), 16,
+	_hwscreen = SDL_SetVideoMode(hwW, hwH, 16,
 		_fullscreen ? (SDL_FULLSCREEN|SDL_SWSURFACE) : SDL_SWSURFACE
 	);
 	if (_hwscreen == NULL) {
@@ -703,7 +713,7 @@
 			return;
 		}
 
-#if defined(MACOSX) && !SDL_VERSION_ATLEAST(1, 2, 6)
+#if (defined(MACOSX) && !SDL_VERSION_ATLEAST(1, 2, 6)) || defined(__MAEMO__)
 		// On OS X, SDL_WM_ToggleFullScreen is currently not implemented. Worse,
 		// before SDL 1.2.6 it always returned -1 (which would indicate a
 		// successful switch). So we simply don't call it at all and use

Modified: scummvm/trunk/backends/sdl/sdl.cpp
===================================================================
--- scummvm/trunk/backends/sdl/sdl.cpp	2006-06-03 00:30:28 UTC (rev 22848)
+++ scummvm/trunk/backends/sdl/sdl.cpp	2006-06-03 01:05:09 UTC (rev 22849)
@@ -144,7 +144,7 @@
 	_scaleFactor = 1;
 	_scalerProc = Normal1x;
 
-#if !defined(_WIN32_WCE) && !defined(__SYMBIAN32__) &&  !defined(__MAEMO__)
+#if !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
 	_fullscreen = ConfMan.getBool("fullscreen");
 #else
 	_fullscreen = true;


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