[Scummvm-cvs-logs] CVS: scummvm/common config-manager.cpp,1.31,1.32 scummsys.h,1.56,1.57 stdafx.h,1.25,1.26 system.cpp,1.22,1.23

Robert Göffringmann lavosspawn at users.sourceforge.net
Wed Mar 30 21:36:06 CEST 2005


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

Modified Files:
	config-manager.cpp scummsys.h stdafx.h system.cpp 
Log Message:
Playstation2 Port: initial import

Index: config-manager.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/config-manager.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- config-manager.cpp	22 Feb 2005 18:11:36 -0000	1.31
+++ config-manager.cpp	31 Mar 2005 05:35:03 -0000	1.32
@@ -90,6 +90,8 @@
 		strcat(configFile, "\\" DEFAULT_CONFIG_FILE);
 	#elif defined(__PALM_OS__)
 		strcpy(configFile,"/PALM/Programs/ScummVM/" DEFAULT_CONFIG_FILE);
+	#elif defined(__PLAYSTATION2__)
+		strcpy(configFile, "mc0:ScummVM/" DEFAULT_CONFIG_FILE);
 	#else
 		strcpy(configFile, DEFAULT_CONFIG_FILE);
 	#endif

Index: scummsys.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/scummsys.h,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- scummsys.h	19 Feb 2005 15:35:05 -0000	1.56
+++ scummsys.h	31 Mar 2005 05:35:03 -0000	1.57
@@ -22,7 +22,7 @@
 #ifndef SCUMMSYS_H
 #define SCUMMSYS_H
 
-#ifndef _STDAFX_H
+#if !defined(_STDAFX_H) && !defined(__PLAYSTATION2__)
 #error Included scummsys.h without including stdafx.h first!
 #endif
 
@@ -278,6 +278,51 @@
 
 	#define START_PACK_STRUCTS pack (push, 1)
 	#define END_PACK_STRUCTS	 pack(pop)
+#elif defined __PLAYSTATION2__
+	#define CDECL 
+	#define SCUMM_NEED_ALIGNMENT
+	#define SCUMM_LITTLE_ENDIAN 
+
+	#define scumm_stricmp strcasecmp
+	#define scumm_strnicmp strncasecmp
+	#define CHECK_HEAP
+
+	#define FORCEINLINE inline
+	#define NORETURN __attribute__((__noreturn__))
+	#define GCC_PACK __attribute__((packed))
+
+	typedef unsigned char byte;
+	typedef unsigned char uint8;
+	typedef unsigned short uint16;
+	typedef unsigned int uint32;
+	typedef unsigned int uint;
+	typedef unsigned long uint64;
+	typedef signed char int8;
+	typedef signed short int16;
+	typedef signed int int32;
+	typedef signed long int64;
+
+	#define START_PACK_STRUCTS pack (push, 1)
+	#define END_PACK_STRUCTS	 pack(pop)
+
+	#include "backends/ps2/fileio.h"
+
+	#define fopen(a, b)			ps2_fopen(a, b)
+	#define fclose(a)			ps2_fclose(a)
+	#define fflush(a)			ps2_fflush(a)
+	#define fseek(a, b, c)		ps2_fseek(a, b, c)
+	#define ftell(a)			ps2_ftell(a)
+	#define feof(a)				ps2_feof(a)
+	#define fread(a, b, c, d)	ps2_fread(a, b, c, d)
+	#define fwrite(a, b, c, d)	ps2_fwrite(a, b, c, d)
+	#define fgetc(a)			ps2_fgetc(a)
+	#define fgets(a, b, c)		ps2_fgets(a, b, c)
+	#define fputc(a, b)			ps2_fputc(a, b)
+	#define fputs(a, b)			ps2_fputs(a, b)
+	#define fprintf				ps2_fprintf
+	#define fsize(a)			ps2_fsize(a)
+
+	extern void ps2_disableHandleCaching(void);
 #else
 	#error No system type defined
 #endif

Index: stdafx.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/stdafx.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- stdafx.h	28 Jan 2005 14:46:12 -0000	1.25
+++ stdafx.h	31 Mar 2005 05:35:03 -0000	1.26
@@ -111,7 +111,9 @@
 #endif
 #if !defined(macintosh)
 #include <sys/types.h>
+#if !defined(__PLAYSTATION2__)
 #include <sys/uio.h>
+#endif
 #include <sys/param.h>
 #endif
 #if !defined (__BEOS__)

Index: system.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/system.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- system.cpp	15 Jan 2005 23:08:12 -0000	1.22
+++ system.cpp	31 Mar 2005 05:35:03 -0000	1.23
@@ -54,6 +54,8 @@
 	return OSystem_GP32_create();
 #elif defined(__PALM_OS__) //chrilith
 	return OSystem_PALMOS_create();
+#elif defined(__PLAYSTATION2__)
+	return OSystem_PS2_create();
 #else
 	/* SDL is the default driver for now */
 	return OSystem_SDL_create();





More information about the Scummvm-git-logs mailing list