aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2002-05-05 20:04:26 +0000
committerMax Horn2002-05-05 20:04:26 +0000
commit2f2d4527efc63dffef87b2dd7826fde53a60897a (patch)
tree37fa0c90810a8db394ea2188379588e2cbf54141
parent816fe7116872ca65603aaf49340e55c89410507b (diff)
downloadscummvm-rg350-2f2d4527efc63dffef87b2dd7826fde53a60897a.tar.gz
scummvm-rg350-2f2d4527efc63dffef87b2dd7826fde53a60897a.tar.bz2
scummvm-rg350-2f2d4527efc63dffef87b2dd7826fde53a60897a.zip
cleaning up the mess drigo left... <sigh>
svn-id: r4215
-rw-r--r--gameDetector.cpp10
-rw-r--r--gui.cpp5
-rw-r--r--mac/ScummVM_Mac_Prefix.h2
-rw-r--r--mac/scummvm.mcpbin158716 -> 158716 bytes
-rw-r--r--main.cpp12
-rw-r--r--saveload.cpp7
-rw-r--r--script_v2.cpp17
-rw-r--r--scumm.h4
-rw-r--r--scummvm.cpp7
-rw-r--r--simon/midi.cpp5
-rw-r--r--simon/simon.cpp8
-rw-r--r--simon/simonsys.cpp4
-rw-r--r--sound.cpp6
-rw-r--r--sound/mididrv.cpp14
-rw-r--r--stdafx.h6
-rw-r--r--system.h14
16 files changed, 36 insertions, 85 deletions
diff --git a/gameDetector.cpp b/gameDetector.cpp
index ddafb69f2e..cfb60d5410 100644
--- a/gameDetector.cpp
+++ b/gameDetector.cpp
@@ -23,13 +23,8 @@
#include "stdafx.h"
#include "scumm.h"
-#ifndef macintosh
#include "sound/mididrv.h"
#include "sound/imuse.h"
-#else
-#include "mididrv.h"
-#include "imuse.h"
-#endif
#include "gameDetector.h"
@@ -473,6 +468,8 @@ int GameDetector::detectMain(int argc, char **argv)
_gfx_driver = GD_MORPHOS;
#elif defined(_WIN32_WCE)
_gfx_driver = GD_WINCE;
+#elif defined(MACOS_CARBON)
+ _gfx_driver = GD_MAC;
#else
/* SDL is the default driver for now */
_gfx_driver = GD_SDL;
@@ -542,6 +539,9 @@ OSystem *GameDetector::createSystem() {
#elif defined(__MORPHOS__)
case GD_MORPHOS:
return OSystem_MorphOS_create(_gameId, _gfx_mode, _fullScreen);
+#elif defined(MACOS_CARBON)
+ case GD_MAC:
+ return OSystem_MAC_create(_gfx_mode, _fullScreen);
#elif defined(USE_NULL_DRIVER)
case GD_NULL:
return OSystem_NULL_create();
diff --git a/gui.cpp b/gui.cpp
index cd8200a554..a8488773f9 100644
--- a/gui.cpp
+++ b/gui.cpp
@@ -21,13 +21,8 @@
#include "stdafx.h"
#include "scumm.h"
-#ifndef macintosh
#include "sound/mididrv.h"
#include "sound/imuse.h"
-#else
-#include "mididrv.h"
-#include "imuse.h"
-#endif
#include "gui.h"
#include "guimaps.h"
diff --git a/mac/ScummVM_Mac_Prefix.h b/mac/ScummVM_Mac_Prefix.h
index 57f65716dc..ef3f2e6a4b 100644
--- a/mac/ScummVM_Mac_Prefix.h
+++ b/mac/ScummVM_Mac_Prefix.h
@@ -4,4 +4,4 @@
#include <MacHeadersCarbon>
#endif
-#define __APPLE__CW \ No newline at end of file
+#define MACOS_CARBON
diff --git a/mac/scummvm.mcp b/mac/scummvm.mcp
index d2f529f7a2..35a051e06f 100644
--- a/mac/scummvm.mcp
+++ b/mac/scummvm.mcp
Binary files differ
diff --git a/main.cpp b/main.cpp
index be2d892d0d..529159f6bd 100644
--- a/main.cpp
+++ b/main.cpp
@@ -25,11 +25,7 @@
#include "mididrv.h"
#include "gameDetector.h"
#include "gui.h"
-#ifndef macintosh
#include "simon/simon.h"
-#else
-#include "simon.h"
-#endif
#include "config-file.h"
GameDetector detector;
@@ -98,8 +94,13 @@ static void do_memory_test(void) {
int main(int argc, char *argv[])
{
+/*
+Disabled this for now. What good does it do, anyway, we now have real config
+files, and a proper port to MacOS classic should offer a dialog or so for any
+game settings!
+
#if defined(MACOS_SDL)
- /* support for config file for macos SDL port */
+ // support for config file for macos SDL port
char *argitem;
char *argstr;
@@ -131,6 +132,7 @@ int main(int argc, char *argv[])
fclose(argf);
#endif
+*/
#if defined(UNIX) || defined(UNIX_X11)
char scummhome[MAXPATHLEN];
diff --git a/saveload.cpp b/saveload.cpp
index c7a10c7a04..b3db3e2852 100644
--- a/saveload.cpp
+++ b/saveload.cpp
@@ -22,13 +22,8 @@
#include "stdafx.h"
#include "scumm.h"
-#ifndef macintosh
#include "sound/mididrv.h"
#include "sound/imuse.h"
-#else
-#include "mididrv.h"
-#include "imuse.h"
-#endif
struct SaveGameHeader {
uint32 type;
@@ -163,7 +158,7 @@ void Scumm::makeSavegameName(char *out, int slot, bool compatible)
#ifndef _WIN32_WCE
-#if !defined(macintosh)
+#if !defined(MACOS_CARBON)
const char *dir = getenv("SCUMMVM_SAVEPATH");
if (dir == NULL)
dir = "";
diff --git a/script_v2.cpp b/script_v2.cpp
index c7f2c87432..95aa114360 100644
--- a/script_v2.cpp
+++ b/script_v2.cpp
@@ -24,13 +24,8 @@
#include "stdafx.h"
#include "scumm.h"
-#ifndef macintosh
#include "sound/mididrv.h"
#include "sound/imuse.h"
-#else
-#include "mididrv.h"
-#include "imuse.h"
-#endif
void Scumm::setupOpcodes2()
{
@@ -2713,7 +2708,6 @@ void Scumm::o6_miscOps()
break;
case 13:
remapActor(derefActorSafe(args[1], "o6_miscOps:14"), args[2], args[3],
-
args[4], -1);
break;
case 14:
@@ -2919,27 +2913,16 @@ void Scumm::o6_kernelFunction()
break;
case 211:
warning("o6_kernelFunction: getInput(%d)", args[1]);
-
/*
-
13 = thrust
-
336 = thrust
-
328 = thrust
-
27 = abord
-
97 = left
-
331 = left
-
115 = right
-
333 = tight
-
*/
-
push(0);
break;
case 212:
diff --git a/scumm.h b/scumm.h
index ed8b9ac418..b5755e104d 100644
--- a/scumm.h
+++ b/scumm.h
@@ -21,11 +21,7 @@
#include "scummsys.h"
#include "system.h"
-#ifndef macintosh
#include "sound/mixer.h"
-#else
-#include "mixer.h"
-#endif
#include "config-file.h"
#define SCUMMVM_VERSION "0.2.0 devel"
diff --git a/scummvm.cpp b/scummvm.cpp
index a676efb693..23719256bd 100644
--- a/scummvm.cpp
+++ b/scummvm.cpp
@@ -22,13 +22,8 @@
#include "stdafx.h"
#include "scumm.h"
-#ifndef macintosh
#include "sound/mididrv.h"
#include "sound/imuse.h"
-#else
-#include "mididrv.h"
-#include "imuse.h"
-#endif
#include "gui.h"
#include "string.h"
#include "gameDetector.h"
@@ -742,7 +737,7 @@ void Scumm::dumpResource(char *tag, int idx, byte *ptr)
else
size = READ_BE_UINT32_UNALIGNED(ptr + 4);
-#if defined(macintosh)
+#if defined(MACOS_CARBON)
sprintf(buf, ":dumps:%s%d.dmp", tag, idx);
#else
sprintf(buf, "dumps/%s%d.dmp", tag, idx);
diff --git a/simon/midi.cpp b/simon/midi.cpp
index c599e34700..c4acc1390a 100644
--- a/simon/midi.cpp
+++ b/simon/midi.cpp
@@ -23,13 +23,8 @@
#include "stdafx.h"
#include "scummsys.h"
#include "system.h"
-#ifndef macintosh
#include "../sound/mididrv.h"
#include "../sound/mixer.h"
-#else
-#include "mididrv.h"
-#include "mixer.h"
-#endif
#include "simon.h"
void MidiPlayer::read_from_file(void *dst, uint size) {
diff --git a/simon/simon.cpp b/simon/simon.cpp
index b7e7dc3f77..add8f42bb5 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -23,11 +23,7 @@
#include "stdafx.h"
#include "scummsys.h"
#include "system.h"
-#ifndef macintosh
#include "../sound/mixer.h"
-#else
-#include "mixer.h"
-#endif
#include "simon.h"
@@ -38,11 +34,7 @@
#ifdef WIN32
#include <malloc.h>
#endif
-#ifndef macintosh
#include <sys/stat.h>
-#else
-#include <stat.h>
-#endif
int sdl_mouse_x, sdl_mouse_y;
diff --git a/simon/simonsys.cpp b/simon/simonsys.cpp
index 8d29ad2214..cb7f34bc9e 100644
--- a/simon/simonsys.cpp
+++ b/simon/simonsys.cpp
@@ -23,11 +23,7 @@
#include "stdafx.h"
#include "scummsys.h"
#include "system.h"
-#ifndef macintosh
#include "../sound/mixer.h"
-#else
-#include "mixer.h"
-#endif
#include "simon.h"
#include <stdarg.h>
diff --git a/sound.cpp b/sound.cpp
index fd301ec242..849a5b1db9 100644
--- a/sound.cpp
+++ b/sound.cpp
@@ -22,15 +22,9 @@
#include "stdafx.h"
#include "scumm.h"
-#ifndef macintosh
#include "sound/mididrv.h"
#include "sound/imuse.h"
#include <sys/stat.h>
-#else
-#include "mididrv.h"
-#include "imuse.h"
-#include <stat.h>
-#endif
#ifdef _WIN32_WCE
extern void *bsearch(const void *, const void *, size_t,
diff --git a/sound/mididrv.cpp b/sound/mididrv.cpp
index 4cb1742bc2..b8ec4dad17 100644
--- a/sound/mididrv.cpp
+++ b/sound/mididrv.cpp
@@ -454,12 +454,14 @@ MidiDriver *MidiDriver_SEQ_create() {
// to check for these *cleanly* without a configure script, though..
-//#include <QuickTime/QuickTimeComponents.h>
-//#include <QuickTime/QuickTimeMusic.h>
-
-#include <QuickTimeComponents.h>
-#include <QuickTimeMusic.h>
-
+#if defined(MACOSX)
+ // On MacOSX, these are in a frameworks!
+ #include <QuickTime/QuickTimeComponents.h>
+ #include <QuickTime/QuickTimeMusic.h>
+#else
+ #include <QuickTimeComponents.h>
+ #include <QuickTimeMusic.h>
+#endif
/* QuickTime MIDI driver */
diff --git a/stdafx.h b/stdafx.h
index 0528578301..667c0f8edb 100644
--- a/stdafx.h
+++ b/stdafx.h
@@ -2,6 +2,9 @@
* $Id$
*
* $Log$
+ * Revision 1.16 2002/05/05 20:04:25 fingolfin
+ * cleaning up the mess drigo left... <sigh>
+ *
* Revision 1.15 2002/05/05 19:06:51 drigo
* Fixed some things for Macintosh ports
*
@@ -132,7 +135,8 @@
#define SCUMMVM_PLATFORM_VERSION "X11 version"
#else
-#ifdef macintosh
+
+#ifdef MACOS_CARBON
#define SCUMMVM_PLATFORM_VERSION "Macintosh version"
#else
diff --git a/system.h b/system.h
index bf09282ffe..cda8691a37 100644
--- a/system.h
+++ b/system.h
@@ -145,12 +145,13 @@ public:
*/
/* OSystem_SDL */
-OSystem *OSystem_SDL_create(int gfx_driver, bool full_screen);
-OSystem *OSystem_NULL_create();
-OSystem *OSystem_MorphOS_create(int game_id, int gfx_driver, bool full_screen);
-OSystem *OSystem_Dreamcast_create();
-OSystem *OSystem_WINCE3_create();
-OSystem *OSystem_X11_create();
+extern OSystem *OSystem_SDL_create(int gfx_driver, bool full_screen);
+extern OSystem *OSystem_NULL_create();
+extern OSystem *OSystem_MorphOS_create(int game_id, int gfx_driver, bool full_screen);
+extern OSystem *OSystem_Dreamcast_create();
+extern OSystem *OSystem_WINCE3_create();
+extern OSystem *OSystem_X11_create();
+extern OSystem *OSystem_MAC_create(int gfx_mode, bool full_screen);
enum {
GFX_NORMAL = 0,
@@ -170,5 +171,6 @@ enum {
GD_X,
GD_MORPHOS,
GD_WINCE,
+ GD_MAC,
GD_DC
};