From 82b9f1e599b0cd37d81eeda573a5b23bd0d85d9b Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 22 Aug 2004 06:16:16 +0000 Subject: Mac. version of indy3 uses VAR_VIDEOMODE value of 50 Add initial support for loading EGA resource svn-id: r14671 --- scumm/resource.cpp | 2 ++ scumm/scumm.cpp | 18 ++++++++++++++++-- scumm/scumm.h | 2 +- 3 files changed, 19 insertions(+), 3 deletions(-) (limited to 'scumm') diff --git a/scumm/resource.cpp b/scumm/resource.cpp index babb2f0671..f51e2b4e64 100644 --- a/scumm/resource.cpp +++ b/scumm/resource.cpp @@ -2601,6 +2601,8 @@ uint16 newTag2Old(uint32 oldTag) { return (0x5842); // BX case (MKID('CYCL')): return (0x4343); // CC + case (MKID('EPAL')): + return (0x5053); // SP default: return (0); } diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index 8303712236..481d7fb267 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -559,6 +559,7 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS _ENCD_offs = 0; _EXCD_offs = 0; _CLUT_offs = 0; + _EPAL_offs = 0; _IM00_offs = 0; _PALS_offs = 0; _fullRedraw = false; @@ -1360,13 +1361,14 @@ void ScummEngine::initScummVars() { } else VAR(VAR_SOUNDCARD) = 3; } - // Amiga version of MI2 and FM Towns versions use unique values if (_features & GF_FMTOWNS) VAR(VAR_VIDEOMODE) = 42; + else if (_gameId == GID_INDY3 && (_features & GF_MACINTOSH)) + VAR(VAR_VIDEOMODE) = 50; else if (_gameId == GID_MONKEY2 && (_features & GF_AMIGA)) VAR(VAR_VIDEOMODE) = 82; else - VAR(VAR_VIDEOMODE) = 19; + VAR(VAR_VIDEOMODE) = 14; if (_gameId == GID_LOOM && _features & GF_OLD_BUNDLE) { // Set number of sound resources if (!(_features & GF_MACINTOSH)) @@ -2306,6 +2308,7 @@ void ScummEngine::initRoomSubBlocks() { _ENCD_offs = 0; _EXCD_offs = 0; + _EPAL_offs = 0; _CLUT_offs = 0; _PALS_offs = 0; @@ -2605,6 +2608,17 @@ void ScummEngine::initRoomSubBlocks() { if (_features & GF_OLD_BUNDLE) ptr = 0; + else if (_features & GF_SMALL_HEADER) + ptr = findResourceSmall(MKID('EPAL'), roomptr); + else + ptr = findResourceData(MKID('EPAL'), roomptr); + + if (ptr) { + _EPAL_offs = ptr - roomptr; + } + + if (_features & GF_OLD_BUNDLE) + ptr = 0; // TODO ? do 16 bit games use a palette?!? else if (_features & GF_SMALL_HEADER) ptr = findResourceSmall(MKID('CLUT'), roomptr); else diff --git a/scumm/scumm.h b/scumm/scumm.h index 3b091558fe..a577de5d94 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -854,7 +854,7 @@ protected: ColorCycle _colorCycle[16]; // Palette cycles uint32 _ENCD_offs, _EXCD_offs; - uint32 _CLUT_offs; + uint32 _CLUT_offs, _EPAL_offs; uint32 _IM00_offs, _PALS_offs; StripTable *_roomStrips; -- cgit v1.2.3