aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/game.cpp2
-rw-r--r--engines/sci/engine/kernel.cpp16
-rw-r--r--engines/sci/engine/kfile.cpp14
-rw-r--r--engines/sci/engine/savegame.cpp2
-rw-r--r--engines/sci/engine/scriptdebug.cpp2
5 files changed, 17 insertions, 19 deletions
diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp
index cf33473907..6558529b34 100644
--- a/engines/sci/engine/game.cpp
+++ b/engines/sci/engine/game.cpp
@@ -593,11 +593,9 @@ script_free_vm_memory(state_t *s)
s->classtable = NULL;
/* Close all opened file handles */
-#ifndef _DOS
for (i = 1; i < s->file_handles_nr; i++)
if (s->file_handles[i])
fclose(s->file_handles[i]);
-#endif
sci_free(s->file_handles);
s->file_handles = NULL;
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index 3737cd4cad..538bdcd60c 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -28,7 +28,7 @@
#include "sci/engine/gc.h"
#include "sci/include/sciresource.h"
#include "sci/include/engine.h"
-#ifdef _WIN32
+#ifdef WIN32
# include <windows.h>
# include <mmsystem.h>
#endif
@@ -90,7 +90,7 @@ reg_t kGlobalToLocal(struct _state *s, int funct_nr, int argc, reg_t *argv);
reg_t kLocalToGlobal(struct _state *s, int funct_nr, int argc, reg_t *argv);
reg_t kWait(struct _state *s, int funct_nr, int argc, reg_t *argv);
reg_t kRestartGame(struct _state *s, int funct_nr, int argc, reg_t *argv);
-#ifdef _WIN32
+#ifdef WIN32
reg_t kDeviceInfo_Win32(struct _state *s, int funct_nr, int argc, reg_t *argv);
#else
reg_t kDeviceInfo_Unix(struct _state *s, int funct_nr, int argc, reg_t *argv);
@@ -300,9 +300,9 @@ sci_kernel_function_t kfunct_mappers[] = {
/*64*/ DEFUN("ValidPath", kValidPath, "r"),
/*65*/ DEFUN("CoordPri", kCoordPri, "i"),
/*66*/ DEFUN("StrAt", kStrAt, "rii*"),
-#ifdef _WIN32
+#ifdef WIN32
/*67*/ DEFUN("DeviceInfo", kDeviceInfo_Win32, "i.*"),
-#else /* !_WIN32 */
+#else /* !WIN32 */
/*67*/ DEFUN("DeviceInfo", kDeviceInfo_Unix, "i.*"),
#endif
/*68*/ DEFUN("GetSaveDir", kGetSaveDir, ""),
@@ -547,22 +547,22 @@ kGetTime(state_t *s, int funct_nr, int argc, reg_t *argv)
| KERNEL_OPT_FLAG_GOT_2NDEVENT);
#endif
-#ifdef _WIN32
+#ifdef WIN32
if (TIMERR_NOERROR != timeBeginPeriod(1))
{
fprintf(stderr, "timeBeginPeriod(1) failed in kGetTime!\n");
}
-#endif /* _WIN32 */
+#endif /* WIN32 */
the_time = time(NULL);
loc_time = localtime(&the_time);
-#ifdef _WIN32
+#ifdef WIN32
if (TIMERR_NOERROR != timeEndPeriod(1))
{
fprintf(stderr, "timeEndPeriod(1) failed in kGetTime!\n");
}
-#endif /* _WIN32 */
+#endif /* WIN32 */
if (s->version<SCI_VERSION_FTU_NEW_GETTIME) { /* Use old semantics */
if (argc) { /* Get seconds since last am/pm switch */
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index b7b2ae92fa..9c4235852f 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -30,12 +30,12 @@
#include "sci/include/engine.h"
-#ifdef _WIN32
+#ifdef WIN32
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# include <sys/types.h>
# include <sys/stat.h>
-#elif defined (_DREAMCAST)
+#elif defined (__DC__)
# include <dc.h>
#endif
@@ -405,7 +405,7 @@ delete_savegame(state_t *s, int savedir_nr)
#define K_DEVICE_INFO_GET_SAVECAT_NAME 7
#define K_DEVICE_INFO_GET_SAVEFILE_NAME 8
-#ifdef _WIN32
+#ifdef WIN32
reg_t
kDeviceInfo_Win32(state_t *s, int funct_nr, int argc, reg_t *argv)
@@ -487,7 +487,7 @@ kDeviceInfo_Win32(state_t *s, int funct_nr, int argc, reg_t *argv)
return s->r_acc;
}
-#else /* !_WIN32 */
+#else /* !WIN32 */
reg_t
kDeviceInfo_Unix(state_t *s, int funct_nr, int argc, reg_t *argv)
@@ -553,7 +553,7 @@ kDeviceInfo_Unix(state_t *s, int funct_nr, int argc, reg_t *argv)
return s->r_acc;
}
-#endif /* !_WIN32 */
+#endif /* !WIN32 */
reg_t
@@ -662,7 +662,7 @@ _k_find_savegame_by_name(char *game_id_file, char *name)
return 0;
}
-#ifdef _DREAMCAST
+#ifdef __DC__
static long
get_file_mtime(int fd)
{
@@ -1140,7 +1140,7 @@ kFileIO(state_t *s, int funct_nr, int argc, reg_t *argv)
reg_t buf = argv[2];
/* int attr = UKPV(3); */ /* We won't use this, Win32 might, though... */
-#ifndef _WIN32
+#ifndef WIN32
if (strcmp(mask, "*.*")==0) strcpy(mask, "*"); /* For UNIX */
#endif
first_file(s, ".", mask, buf);
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index 06dfb87329..4abda55847 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -41,7 +41,7 @@
#include <direct.h>
#endif
-#ifdef _WIN32
+#ifdef WIN32
#pragma warning( disable : 4101 )
#endif
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp
index 76cc9d1302..d5e8c9778f 100644
--- a/engines/sci/engine/scriptdebug.cpp
+++ b/engines/sci/engine/scriptdebug.cpp
@@ -36,7 +36,7 @@
#include "sci/include/sci_widgets.h"
#include "sci/include/reg_t_hashmap.h"
-#ifdef _WIN32
+#ifdef WIN32
# include <windows.h>
# include <mmsystem.h>
# include <io.h>