diff options
author | Max Horn | 2009-02-15 21:27:42 +0000 |
---|---|---|
committer | Max Horn | 2009-02-15 21:27:42 +0000 |
commit | e90eed4ff338f833067f28e0374d58ccfdf6cbf1 (patch) | |
tree | b83cb7ece93b5b2697cae3ee39f11d7c460a8391 /engines/sci/include | |
parent | 5417f6bacb73d5996b26229513c2ce01db27bf6a (diff) | |
download | scummvm-rg350-e90eed4ff338f833067f28e0374d58ccfdf6cbf1.tar.gz scummvm-rg350-e90eed4ff338f833067f28e0374d58ccfdf6cbf1.tar.bz2 scummvm-rg350-e90eed4ff338f833067f28e0374d58ccfdf6cbf1.zip |
SCI: Changed _WIN32 -> WIN32; _DREAMCAST -> __DC__; removed _DOS stuff
svn-id: r38305
Diffstat (limited to 'engines/sci/include')
-rw-r--r-- | engines/sci/include/console.h | 4 | ||||
-rw-r--r-- | engines/sci/include/resource.h | 15 | ||||
-rw-r--r-- | engines/sci/include/sci_dos.h | 171 | ||||
-rw-r--r-- | engines/sci/include/sci_memory.h | 4 | ||||
-rw-r--r-- | engines/sci/include/sciresource.h | 2 | ||||
-rw-r--r-- | engines/sci/include/scitypes.h | 8 |
6 files changed, 14 insertions, 190 deletions
diff --git a/engines/sci/include/console.h b/engines/sci/include/console.h index 306582840d..a6858ae929 100644 --- a/engines/sci/include/console.h +++ b/engines/sci/include/console.h @@ -41,10 +41,6 @@ #include <config.h> #endif /* HAVE_CONFIG_H */ -#ifdef _DOS -#include <sci_dos.h> -#endif - #define SCI_CONSOLE #include "sci/include/gfx_operations.h" diff --git a/engines/sci/include/resource.h b/engines/sci/include/resource.h index 26a8318b76..88df611e59 100644 --- a/engines/sci/include/resource.h +++ b/engines/sci/include/resource.h @@ -44,7 +44,7 @@ #define SCI_INVALID_FD -1 #define IS_VALID_FD(a) ((a) != SCI_INVALID_FD) /* Tests validity of a file descriptor */ -#ifdef _WIN32 +#ifdef WIN32 # ifndef _Win32 # define _Win32 /* Work around problem with some versions of flex */ @@ -123,14 +123,12 @@ # include <sys/stat.h> #endif #include <assert.h> -#ifdef _DOS -# include <sci_dos.h> -#endif #ifdef HAVE_LIMITS_H # include <limits.h> #endif -#if _MSC_VER || _DOS +// FIXME: Get rid of G_DIR_SEPARATOR / G_DIR_SEPARATOR_S +#if _MSC_VER # define G_DIR_SEPARATOR_S "\\" # define G_DIR_SEPARATOR '\\' #else @@ -138,6 +136,7 @@ # define G_DIR_SEPARATOR '/' #endif +// FIXME: Get rid of MIN / MAX, use common/util.h instead #ifndef MIN # define MIN(a, b) (((a) < (b)) ? (a) : (b)) #endif @@ -161,13 +160,13 @@ #define MAX_HOMEDIR_SIZE 255 -#ifdef _WIN32 +#ifdef WIN32 # define FO_BINARY "b" #else # define FO_BINARY "" #endif -#ifdef _WIN32 +#ifdef WIN32 # define FO_TEXT "t" #else # define FO_TEXT "" @@ -179,7 +178,7 @@ /**** FUNCTION DECLARATIONS ****/ -#ifdef _WIN32 +#ifdef WIN32 # define scimkdir(arg1,arg2) mkdir(arg1) #else # define scimkdir(arg1,arg2) mkdir(arg1,arg2) diff --git a/engines/sci/include/sci_dos.h b/engines/sci/include/sci_dos.h deleted file mode 100644 index 97e56f712d..0000000000 --- a/engines/sci/include/sci_dos.h +++ /dev/null @@ -1,171 +0,0 @@ -/*************************************************************************** - sci_dos.h Copyright (C) 1999 Rink Springer - - - This program may be modified and copied freely according to the terms of - the GNU general public license (GPL), as long as the above copyright - notice and the licensing information contained herein are preserved. - - Please refer to www.gnu.org for licensing details. - - This work is provided AS IS, without warranty of any kind, expressed or - implied, including but not limited to the warranties of merchantibility, - noninfringement, and fitness for a specific purpose. The author will not - be held liable for any damage caused by this work or derivatives of it. - - By using this source code, you agree to the licensing terms as stated - above. - - - Please contact the maintainer for bug reports or inquiries. - - Current Maintainer: - - Rink Springer [rink@springer.cx] - -***************************************************************************/ - -#ifndef _SCI_DOS_H_ -#define _SCI_DOS_H_ - -#include <stdarg.h> - -#ifndef HAVE_DIRENT_H -#define HAVE_DIRENT_H -#endif - -#define TRUE (!FALSE) -#define FALSE (0) - -typedef signed char gint8; -typedef signed short gint16; -typedef signed long gint32; - -typedef unsigned char guint8; -typedef unsigned short guint16; -typedef unsigned long guint32; - -typedef char gchar; -typedef unsigned char guchar; -typedef int gint; -typedef unsigned int guint; -typedef long glong; -typedef unsigned long gulong; - -typedef gint gboolean; - -typedef void* gpointer; - -#define g_new0(type, count) ((type*)g_malloc0((unsigned)sizeof(type) * (count))) -#define g_new(type, count) ((type*)sci_malloc((unsigned)sizeof(type) * (count))) - -#define g_malloc(x) sci_malloc(x) -#define g_free(x) sci_free(x) -#define g_realloc(x,y) sci_realloc(x,y) - -extern gpointer g_malloc0(guint32 size); - -/* Name of package */ -#define PACKAGE "freesci" - -/* Version number of package */ -#define VERSION "0.3.0" - -/* directory separator */ -#define G_DIR_SEPARATOR_S "/" - -#define SSIZE_MAX 1024 - -#define g_get_current_time(x) gettimeofday(x,NULL) - -#define g_strcasecmp(x,y) strcasecmp(x,y) -#define g_strncasecmp(x,y,z) strncasecmp(x,y,z) - -extern gint g_vsnprintf(gchar*,gulong,gchar const*,va_list); -extern gpointer g_memdup (gpointer mem, guint byte_size); - -#define DGFX_KEYUP 72 -#define DGFX_KEYDOWN 80 -#define DGFX_KEYLEFT 75 -#define DGFX_KEYRIGHT 77 -#define DGFX_KEYSTOP 76 /* numberic 5 */ - -#define DGFX_KEY_ESCAPE 1 /* escape */ -#define DGFX_KEY_1 2 /* 1 */ -#define DGFX_KEY_2 3 /* 2 */ -#define DGFX_KEY_3 4 /* 3 */ -#define DGFX_KEY_4 5 /* 4 */ -#define DGFX_KEY_5 6 /* 5 */ -#define DGFX_KEY_6 7 /* 6 */ -#define DGFX_KEY_7 8 /* 7 */ -#define DGFX_KEY_8 9 /* 8 */ -#define DGFX_KEY_9 10 /* 9 */ -#define DGFX_KEY_0 11 /* 0 */ -#define DGFX_KEY_MINUS 12 /* -/_ */ -#define DGFX_KEY_EQUAL 13 /* =/+ */ -#define DGFX_KEY_BSPACE 14 /* backspace */ -#define DGFX_KEY_TAB 15 /* enter */ -#define DGFX_KEY_Q 16 /* q */ -#define DGFX_KEY_W 17 /* w */ -#define DGFX_KEY_E 18 /* e */ -#define DGFX_KEY_R 19 /* r */ -#define DGFX_KEY_T 20 /* t */ -#define DGFX_KEY_Y 21 /* y */ -#define DGFX_KEY_U 22 /* u */ -#define DGFX_KEY_I 23 /* i */ -#define DGFX_KEY_O 24 /* o */ -#define DGFX_KEY_P 25 /* p */ -#define DGFX_KEY_LBRACKET 26 /* [/{ */ -#define DGFX_KEY_RBRACKET 27 /* ]/} */ -#define DGFX_KEY_ENTER 28 /* enter */ -#define DGFX_KEY_CTRL 29 /* control */ -#define DGFX_KEY_A 30 /* a */ -#define DGFX_KEY_S 31 /* s */ -#define DGFX_KEY_D 32 /* d */ -#define DGFX_KEY_F 33 /* f */ -#define DGFX_KEY_G 34 /* g */ -#define DGFX_KEY_H 35 /* h */ -#define DGFX_KEY_J 36 /* j */ -#define DGFX_KEY_K 37 /* k */ -#define DGFX_KEY_L 38 /* l */ -#define DGFX_KEY_COLON 39 /* ;/: */ -#define DGFX_KEY_TILDE 41 /* tilde */ -#define DGFX_KEY_LSHIFT 42 /* left shift */ -#define DGFX_KEY_Z 44 /* z */ -#define DGFX_KEY_X 45 /* x */ -#define DGFX_KEY_C 46 /* c */ -#define DGFX_KEY_V 47 /* v */ -#define DGFX_KEY_B 48 /* b */ -#define DGFX_KEY_N 49 /* n */ -#define DGFX_KEY_M 50 /* m */ -#define DGFX_KEY_COMMA 51 /* ,/< */ -#define DGFX_KEY_DOT 52 /* ./> */ -#define DGFX_KEY_SLASH 53 /* / / ? */ -#define DGFX_KEY_RSHIFT 54 /* right shift */ -#define DGFX_KEY_ALT 56 /* alt key */ -#define DGFX_KEY_SPACE 57 /* space bar */ -#define DGFX_KEY_F1 59 /* f1 */ -#define DGFX_KEY_F2 60 /* f2 */ -#define DGFX_KEY_F3 61 /* f3 */ -#define DGFX_KEY_F4 62 /* f4 */ -#define DGFX_KEY_F5 63 /* f5 */ -#define DGFX_KEY_F6 64 /* f6 */ -#define DGFX_KEY_F7 65 /* f7 */ -#define DGFX_KEY_F8 66 /* f8 */ -#define DGFX_KEY_F9 67 /* f9 */ -#define DGFX_KEY_F10 68 /* f10 */ - -#define DGFX_KEY_HOME 71 /* home */ -#define DGFX_KEY_PAGEUP 73 /* page up */ -#define DGFX_KEY_END 79 /* end */ -#define DGFX_KEY_PAGEDOWN 81 /* page down */ -#define DGFX_KEY_INSERT 82 /* insert */ -#define DGFX_KEY_DELETE 83 /* delete */ - -#define DGFX_KEY_KPSUB 74 /* keypad - */ -#define DGFX_KEY_KPADD 78 /* keypad + */ - -#define DGFX_KEY_F11 87 /* f11 */ -#define DGFX_KEY_F12 88 /* f12 (emergency exit) */ - -#endif /* _SCI_DOS_H_ */ diff --git a/engines/sci/include/sci_memory.h b/engines/sci/include/sci_memory.h index 37ecea5b58..138466d4a3 100644 --- a/engines/sci/include/sci_memory.h +++ b/engines/sci/include/sci_memory.h @@ -71,7 +71,7 @@ #include "common/scummsys.h" #include "sci/include/resource.h" -#ifdef _WIN32 +#ifdef WIN32 # undef scim_inline /* just to be sure it is not defined */ # define scim_inline __inline #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199900L @@ -371,7 +371,7 @@ sci_refcount_memdup(void *data, size_t len); /********** other memory/debug related routines **********/ -#ifdef _WIN32 +#ifdef WIN32 extern void debug_win32_memory(int dbg_setting); /* Sets debugging for Win32 memory. diff --git a/engines/sci/include/sciresource.h b/engines/sci/include/sciresource.h index c2d70f594f..ead97fe647 100644 --- a/engines/sci/include/sciresource.h +++ b/engines/sci/include/sciresource.h @@ -41,7 +41,7 @@ #define SCI_MAX_RESOURCE_SIZE 0x0400000 /* The maximum allowed size for a compressed or decompressed resource */ -#ifdef _WIN32 +#ifdef WIN32 # define DIR_SEPARATOR_STR "\\" # define PATH_SEPARATOR_STR ";" #else diff --git a/engines/sci/include/scitypes.h b/engines/sci/include/scitypes.h index 3de058e4bf..73968572ad 100644 --- a/engines/sci/include/scitypes.h +++ b/engines/sci/include/scitypes.h @@ -62,15 +62,15 @@ typedef uint32 guint32; # include <sys/types.h> # include <dirent.h> #endif -#ifdef _WIN32 +#ifdef WIN32 # include <io.h> # include <sci_win32.h> #endif -#ifdef _DREAMCAST +#ifdef __DC__ # include <stdio.h> #endif -#if defined(_WIN32) && defined(_MSC_VER) +#if defined(WIN32) && defined(_MSC_VER) # define TYPE_16 short # define TYPE_32 int #endif @@ -124,7 +124,7 @@ typedef struct { } GTimeVal; typedef struct { -#ifdef _WIN32 +#ifdef WIN32 long search; struct _finddata_t fileinfo; #else |