diff --git a/gameDetector.cpp b/gameDetector.cpp index ddafb69f2ee..cfb60d54100 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 cd8200a554e..a8488773f9d 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 57f65716dc6..ef3f2e6a4bb 100644 --- a/mac/ScummVM_Mac_Prefix.h +++ b/mac/ScummVM_Mac_Prefix.h @@ -4,4 +4,4 @@ #include #endif -#define __APPLE__CW \ No newline at end of file +#define MACOS_CARBON diff --git a/mac/scummvm.mcp b/mac/scummvm.mcp index d2f529f7a29..35a051e06f9 100644 Binary files a/mac/scummvm.mcp and b/mac/scummvm.mcp differ diff --git a/main.cpp b/main.cpp index be2d892d0d1..529159f6bd4 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 c7a10c7a049..b3db3e2852e 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 c7f2c874322..95aa1143602 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 ed8b9ac418a..b5755e104dc 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 a676efb6933..23719256bd5 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 c599e34700b..c4acc1390a0 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 b7e7dc3f771..add8f42bb50 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 #endif -#ifndef macintosh #include -#else -#include -#endif int sdl_mouse_x, sdl_mouse_y; diff --git a/simon/simonsys.cpp b/simon/simonsys.cpp index 8d29ad22146..cb7f34bc9ee 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 diff --git a/sound.cpp b/sound.cpp index fd301ec2429..849a5b1db96 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 -#else -#include "mididrv.h" -#include "imuse.h" -#include -#endif #ifdef _WIN32_WCE extern void *bsearch(const void *, const void *, size_t, diff --git a/sound/mididrv.cpp b/sound/mididrv.cpp index 4cb1742bc2f..b8ec4dad179 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 -//#include - -#include -#include - +#if defined(MACOSX) + // On MacOSX, these are in a frameworks! + #include + #include +#else + #include + #include +#endif /* QuickTime MIDI driver */ diff --git a/stdafx.h b/stdafx.h index 05285783012..667c0f8edbd 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... + * * 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 bf09282ffe8..cda8691a370 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 };