diff options
author | Robert Göffringmann | 2005-03-31 05:35:04 +0000 |
---|---|---|
committer | Robert Göffringmann | 2005-03-31 05:35:04 +0000 |
commit | bd81feb9969f434e538f44ad2c82ea8e9e8821c9 (patch) | |
tree | c2fc75f7bc071afd7eda51e5a076edf5e8f7c009 /common | |
parent | 5a890eedd3eeebc0ab1c37d4150cba11bb9d6138 (diff) | |
download | scummvm-rg350-bd81feb9969f434e538f44ad2c82ea8e9e8821c9.tar.gz scummvm-rg350-bd81feb9969f434e538f44ad2c82ea8e9e8821c9.tar.bz2 scummvm-rg350-bd81feb9969f434e538f44ad2c82ea8e9e8821c9.zip |
Playstation2 Port: initial import
svn-id: r17305
Diffstat (limited to 'common')
-rw-r--r-- | common/config-manager.cpp | 2 | ||||
-rw-r--r-- | common/scummsys.h | 47 | ||||
-rw-r--r-- | common/stdafx.h | 2 | ||||
-rw-r--r-- | common/system.cpp | 2 |
4 files changed, 52 insertions, 1 deletions
diff --git a/common/config-manager.cpp b/common/config-manager.cpp index d1aff130c0..10ce1995cc 100644 --- a/common/config-manager.cpp +++ b/common/config-manager.cpp @@ -90,6 +90,8 @@ void ConfigManager::loadDefaultConfigFile() { 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 diff --git a/common/scummsys.h b/common/scummsys.h index 5fa8c9d53f..3eee1976c2 100644 --- a/common/scummsys.h +++ b/common/scummsys.h @@ -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 diff --git a/common/stdafx.h b/common/stdafx.h index 3a9e0b88cb..e3d96f2741 100644 --- a/common/stdafx.h +++ b/common/stdafx.h @@ -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__) diff --git a/common/system.cpp b/common/system.cpp index 41e66050b4..b40e30185f 100644 --- a/common/system.cpp +++ b/common/system.cpp @@ -54,6 +54,8 @@ OSystem *OSystem::makeInstance() { 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(); |