[Scummvm-cvs-logs] CVS: scummvm/common scummsys.h,1.67,1.68 stdafx.h,1.29,1.30 system.cpp,1.27,1.28

Chris Apers chrilith at users.sourceforge.net
Sat Sep 3 09:16:22 CEST 2005


Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28096

Modified Files:
	scummsys.h stdafx.h system.cpp 
Log Message:
Prepare new backends and potential native version

Index: scummsys.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/scummsys.h,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- scummsys.h	28 Aug 2005 11:15:38 -0000	1.67
+++ scummsys.h	3 Sep 2005 16:15:39 -0000	1.68
@@ -68,7 +68,7 @@
 	typedef signed char int8;
 	typedef signed short int16;
 	typedef signed long int32;
-
+	
 	#define START_PACK_STRUCTS pack(push, 1)
 	#define END_PACK_STRUCTS	 pack(pop)
 
@@ -106,14 +106,14 @@
 
 	#ifndef CONFIG_H
 		#ifdef X11_BACKEND
-
+	
 		// You need to set this manually if necessary
 	//	#define SCUMM_LITTLE_ENDIAN
-
+		
 		#else
 		/* need this for the SDL_BYTEORDER define */
 		#include <SDL_byteorder.h>
-
+	
 		#if SDL_BYTEORDER == SDL_LIL_ENDIAN
 		#define SCUMM_LITTLE_ENDIAN
 		#elif SDL_BYTEORDER == SDL_BIG_ENDIAN
@@ -149,17 +149,21 @@
 	#define END_PACK_STRUCTS	 pack ()
 	#endif
 
-#elif defined(__PALMOS_TRAPS__)	// PALMOS
-	#include <PalmOS.h>
+#elif defined(__PALMOS_TRAPS__)	|| defined (__PALMOS_ARMLET__) // PALMOS
+	#include "palmversion.h"
 	#include "globals.h"
 	#include "extend.h"
-
+	
 	#define STRINGBUFLEN 256
 
 	#define scumm_stricmp stricmp
 	#define scumm_strnicmp strnicmp
 
+#ifdef PALMOS_68K
 	#define SCUMM_BIG_ENDIAN
+#else
+	#define SCUMM_LITTLE_ENDIAN
+#endif
 	#define SCUMM_NEED_ALIGNMENT
 
 	typedef unsigned char byte;
@@ -170,11 +174,13 @@
 	typedef signed char int8;
 	typedef signed short int16;
 	typedef signed long int32;
-
+	
 	#define START_PACK_STRUCTS pack (1)
 	#define END_PACK_STRUCTS   pack ()
 
+#if !defined(COMPILE_ZODIAC) && !defined(PALMOS_ARM)
 	#define NEWGUI_256
+#endif
 
 #elif defined(__MORPHOS__)
 	#define scumm_stricmp stricmp
@@ -220,7 +226,7 @@
 
 #elif defined __GP32__ //ph0x
 	#define SCUMM_NEED_ALIGNMENT
-	#define SCUMM_LITTLE_ENDIAN
+	#define SCUMM_LITTLE_ENDIAN 
 
 	#define scumm_stricmp stricmp
 	#define scumm_strnicmp strnicmp
@@ -240,7 +246,7 @@
 	#define END_PACK_STRUCTS	 pack(pop)
 #elif defined __PLAYSTATION2__
 	#define SCUMM_NEED_ALIGNMENT
-	#define SCUMM_LITTLE_ENDIAN
+	#define SCUMM_LITTLE_ENDIAN 
 
 	#define scumm_stricmp strcasecmp
 	#define scumm_strnicmp strncasecmp
@@ -317,9 +323,9 @@
 	#define scumm_stricmp strcasecmp
 	#define scumm_strnicmp strncasecmp
 
-	#define CDECL
+	#define CDECL	
 	#define SCUMM_NEED_ALIGNMENT
-	#define SCUMM_LITTLE_ENDIAN
+	#define SCUMM_LITTLE_ENDIAN	
 	#define CHECK_HEAP
 	#define SMALL_SCREEN_DEVICE
 
@@ -333,7 +339,7 @@
 	typedef signed char int8;
 	typedef signed short int int16;
 	typedef signed long int int32;
-
+	
 	#define START_PACK_STRUCTS pack (push,1)
 	#define END_PACK_STRUCTS   pack(pop)
 #else
@@ -346,7 +352,7 @@
 //
 #if defined(__GNUC__)
 	#define GCC_PACK __attribute__((packed))
-	#define NORETURN __attribute__((__noreturn__))
+	#define NORETURN __attribute__((__noreturn__)) 
 #else
 	#define GCC_PACK
 #endif

Index: stdafx.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/stdafx.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- stdafx.h	16 Aug 2005 17:15:37 -0000	1.29
+++ stdafx.h	3 Sep 2005 16:15:39 -0000	1.30
@@ -113,7 +113,7 @@
 #include <devices/timer.h>
 #undef CMD_INVALID
 #endif
-#if !defined(macintosh)
+#if !defined(macintosh) && !defined(PALMOS_ARM)
 #include <sys/types.h>
 #if !defined(__PLAYSTATION2__) && !defined(__PSP__) && !defined(__amigaos4__)
 #include <sys/uio.h>

Index: system.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/system.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- system.cpp	16 Aug 2005 17:15:37 -0000	1.27
+++ system.cpp	3 Sep 2005 16:15:39 -0000	1.28
@@ -1,98 +1,104 @@
-/* ScummVM - Scumm Interpreter
- * Copyright (C) 2001  Ludvig Strigeus
- * Copyright (C) 2001-2005 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- *
- * $Header$
- *
- */
-
-#include "common/stdafx.h"
-
-#include "backends/intern.h"
-
-#include "base/gameDetector.h"
-
-#include "gui/message.h"
-
-#include "common/config-manager.h"
-#include "common/savefile.h"
-#include "common/system.h"
-#include "common/util.h"
-
-DECLARE_SINGLETON(OSystem);
-
-OSystem *OSystem::makeInstance() {
-	// Attention: Do not call parseGraphicsMode() here, nor any other function
-	// which needs to access the OSystem instance, else you get stuck in an
-	// endless loop.
-
-#if defined(USE_NULL_DRIVER)
-	return OSystem_NULL_create();
-#elif defined(__DC__)
-	return OSystem_Dreamcast_create();
-#elif defined(X11_BACKEND)
-	return OSystem_X11_create();
-#elif defined(__MORPHOS__)
-	return OSystem_MorphOS_create();
-#elif defined(_WIN32_WCE)
-	return OSystem_WINCE3_create();
-#elif defined(__GP32__)	// ph0x
-	return OSystem_GP32_create();
-#elif defined(__PALM_OS__) //chrilith
-	return OSystem_PALMOS_create();
-#elif defined(__PLAYSTATION2__)
-	return OSystem_PS2_create();
-#elif defined(__PSP__)
-	return OSystem_PSP_create();
-#elif defined(__SYMBIAN32__) // SumthinWicked / Sprawl
-	return OSystem_SymbianOS_create();
-#else
-	/* SDL is the default driver for now */
-	return OSystem_SDL_create();
-#endif
-}
-
-bool OSystem::setGraphicsMode(const char *name) {
-	if (!name)
-		return false;
-
-	// Sepcial case for the 'default' filter
-	if (!scumm_stricmp(name, "normal") || !scumm_stricmp(name, "default")) {
-		return setGraphicsMode(getDefaultGraphicsMode());
-	}
-
-	const GraphicsMode *gm = getSupportedGraphicsModes();
-
-	while (gm->name) {
-		if (!scumm_stricmp(gm->name, name)) {
-			return setGraphicsMode(gm->id);
-		}
-		gm++;
-	}
-
-	return false;
-}
-
-void OSystem::displayMessageOnOSD(const char *msg) {
-	// Display the message for 1.5 seconds
-	GUI::TimedMessageDialog dialog(msg, 1500);
-	dialog.runModal();
-}
-
-Common::SaveFileManager *OSystem::getSavefileManager() {
-	return new Common::DefaultSaveFileManager();
-}
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2001  Ludvig Strigeus
+ * Copyright (C) 2001-2005 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+#include "common/stdafx.h"
+
+#include "backends/intern.h"
+
+#include "base/gameDetector.h"
+
+#include "gui/message.h"
+
+#include "common/config-manager.h"
+#include "common/savefile.h"
+#include "common/system.h"
+#include "common/util.h"
+
+DECLARE_SINGLETON(OSystem);
+
+OSystem *OSystem::makeInstance() {
+	// Attention: Do not call parseGraphicsMode() here, nor any other function
+	// which needs to access the OSystem instance, else you get stuck in an
+	// endless loop.
+
+#if defined(USE_NULL_DRIVER)
+	return OSystem_NULL_create();
+#elif defined(__DC__)
+	return OSystem_Dreamcast_create();
+#elif defined(X11_BACKEND)
+	return OSystem_X11_create();
+#elif defined(__MORPHOS__)
+	return OSystem_MorphOS_create();
+#elif defined(_WIN32_WCE)
+	return OSystem_WINCE3_create();
+#elif defined(__GP32__)	// ph0x
+	return OSystem_GP32_create();
+#elif defined(PALMOS_MODE) //chrilith
+#	if defined(COMPILE_OS5)
+	return OSystem_PalmOS5_create();
+#	elif defined(COMPILE_ZODIAC)
+	return OSystem_PalmZodiac_create();
+#	else
+	return OSystem_PALMOS_create();	// old backend
+#	endif
+#elif defined(__PLAYSTATION2__)
+	return OSystem_PS2_create();
+#elif defined(__PSP__)
+	return OSystem_PSP_create();
+#elif defined(__SYMBIAN32__) // SumthinWicked / Sprawl
+	return OSystem_SymbianOS_create();
+#else
+	/* SDL is the default driver for now */
+	return OSystem_SDL_create();
+#endif
+}
+
+bool OSystem::setGraphicsMode(const char *name) {
+	if (!name)
+		return false;
+
+	// Sepcial case for the 'default' filter
+	if (!scumm_stricmp(name, "normal") || !scumm_stricmp(name, "default")) {
+		return setGraphicsMode(getDefaultGraphicsMode());
+	}
+
+	const GraphicsMode *gm = getSupportedGraphicsModes();
+
+	while (gm->name) {
+		if (!scumm_stricmp(gm->name, name)) {
+			return setGraphicsMode(gm->id);
+		}
+		gm++;
+	}
+
+	return false;
+}
+
+void OSystem::displayMessageOnOSD(const char *msg) {
+	// Display the message for 1.5 seconds
+	GUI::TimedMessageDialog dialog(msg, 1500);
+	dialog.runModal();
+}
+
+Common::SaveFileManager *OSystem::getSavefileManager() {
+	return new Common::DefaultSaveFileManager();
+}





More information about the Scummvm-git-logs mailing list