From 2f2d4527efc63dffef87b2dd7826fde53a60897a Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 5 May 2002 20:04:26 +0000 Subject: [PATCH] cleaning up the mess drigo left... svn-id: r4215 --- gameDetector.cpp | 10 +++++----- gui.cpp | 5 ----- mac/ScummVM_Mac_Prefix.h | 2 +- mac/scummvm.mcp | Bin 158716 -> 158716 bytes main.cpp | 12 +++++++----- saveload.cpp | 7 +------ script_v2.cpp | 17 ----------------- scumm.h | 4 ---- scummvm.cpp | 7 +------ simon/midi.cpp | 5 ----- simon/simon.cpp | 8 -------- simon/simonsys.cpp | 4 ---- sound.cpp | 6 ------ sound/mididrv.cpp | 14 ++++++++------ stdafx.h | 6 +++++- system.h | 14 ++++++++------ 16 files changed, 36 insertions(+), 85 deletions(-) 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 d2f529f7a291c7d870e6f1599d36e945aa841c21..35a051e06f922f6971902012758acca653fb6e83 100644 GIT binary patch delta 2909 zcmbVOZEzb$8NNMPC+pKvuw_|xY&mjb8@qCFoHn>7j_R*C&4-$V2FQ?Fl4V=ArBfu? zN@BoHr?fEn(THtxX`3=6(89npwddNZlnzOO>4Y{z{Ug(QCJU@|2`JyV#r#EE(K zZVjFm{_u{Td!BvYci-LH+r87$JLaW#%(G1IJHRN&1i} zYL}rhKoUsMYo>xR4Rx5FF20LQ(96Y}XsE5oEW+mj%4vtWg}CXs*-t8HveI9+4qiV{ z2doD+0QLFc1NM4|PJ#?8Gdc34f{i zU@Dbq-xbTIZG zJR)?5v*GqoS{{v!W&N@C412hfiT2@eBKBV%^>AZ8cmeBGtd>=MR5UHIoyN8}Ok$fi zp-Dk{5zMwVOuB#z+v+gsO|ViYnduQxqL9gjtjL{78C8L7+H>+rpz@)c6_uWf3-)j;@Fid^ zPz`hdHGmJO1?~XW0YTs%pbO{*dVpS_57>^OK*D})%R+Et=Og#>%{!l4UjA{ldNy&B z(Dikt<^)_P1!3elxIQ8DL)RPX!NxLz6)p$7^iK_=?5@1h-aUKvuhe2()Z4$49po+a zz76Hm)x6cq+0Qw^c^&5+oNGDzIB(@#!+E7%CvUfN?%`a?*{gFz*v1_}&J~R&6X3@gzNXNsZ${R?%ZqRqBhKm7;n+ zP=m)Cylp5Eh}zbA+^&hM-N)@}b&vZKJyR(m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#6JpwP z8EmkPEX9TFVjBti`rv!5>=Wvq7?gY>%IvKy& zGcM@P+9B{ya}thvjBVm{JNR}nTj!fU%SqV$A8Z(CyoH@@hnJYO5-yTQlpU%A{;Nb4 b+Fik19iYNn92E5NIQXN2Zob7L9puD+KWo-* 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 };