From 4e1cb7947372106efd4c496fdac5ada562b094a8 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 1 May 2005 14:22:00 +0000 Subject: Add feature flag for HE games with 16bit color. svn-id: r17886 --- scumm/akos.h | 1 - scumm/intern.h | 2 +- scumm/palette_he.cpp | 2 +- scumm/scumm.cpp | 24 ++++++++++++------------ scumm/scumm.h | 9 ++++++--- scumm/wiz_he.cpp | 2 +- 6 files changed, 21 insertions(+), 19 deletions(-) (limited to 'scumm') diff --git a/scumm/akos.h b/scumm/akos.h index bbd1f41f60..6a15bf0bdc 100644 --- a/scumm/akos.h +++ b/scumm/akos.h @@ -72,7 +72,6 @@ protected: const byte *akpl, *akci, *aksq; const AkosOffset *akof; const byte *akcd; - const byte *akct; struct { diff --git a/scumm/intern.h b/scumm/intern.h index d8778a8573..c2f0a3a430 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -869,7 +869,7 @@ protected: int readFileToArray(int slot, int32 size); void writeFileFromArray(int slot, int resID); - void remapPalette(uint8 *src, uint8 *dst); + void remapHEPalette(const uint8 *src, uint8 *dst); void displayWizImage(WizImage *pwi); void displayWizComplexImage(const WizParameters *params); diff --git a/scumm/palette_he.cpp b/scumm/palette_he.cpp index c7a346b591..aea7a17605 100644 --- a/scumm/palette_he.cpp +++ b/scumm/palette_he.cpp @@ -30,7 +30,7 @@ namespace Scumm { -void ScummEngine_v72he::remapPalette(uint8 *src, uint8 *dst) { +void ScummEngine_v72he::remapHEPalette(const uint8 *src, uint8 *dst) { int r, g, b, sum, bestitem, bestsum; int ar, ag, ab; uint8 *palPtr; diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index 8fdf4f481e..e7d466fff2 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -353,7 +353,7 @@ static const ScummGameSettings scumm_settings[] = { // Humongous Entertainment Scumm Version ? {"freddicove", "Freddi Fish 5: The Case of the Creature of Coral Cave", GID_FREDDICOVE, 6, 99, 61, MDT_NONE, - GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_LOCALIZED | GF_MULTIPLE_VERSIONS, Common::kPlatformUnknown, 0, 0}, + GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_LOCALIZED | GF_16BIT_COLOR | GF_MULTIPLE_VERSIONS, Common::kPlatformUnknown, 0, 0}, {"pj3-demo", "Pajama Sam 3: You Are What You Eat From Your Head to Your Feet (Demo)", GID_HEGAME, 6, 99, 61, MDT_NONE, GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0}, {"pajama3", "Pajama Sam 3: You Are What You Eat From Your Head to Your Feet", GID_HEGAME, 6, 99, 61, MDT_NONE, @@ -365,12 +365,12 @@ static const ScummGameSettings scumm_settings[] = { {"putttime", "Putt-Putt Travels Through Time", GID_HEGAME, 6, 99, 31, MDT_NONE, GF_USE_KEY | GF_NEW_COSTUMES | GF_MULTIPLE_VERSIONS, Common::kPlatformUnknown, 0, 0}, {"spyozon", "Spyfox 3: Operation Ozone", GID_HEGAME, 6, 99, 61, MDT_NONE, - GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_LOCALIZED, Common::kPlatformUnknown, 0, 0}, + GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_LOCALIZED | GF_16BIT_COLOR, Common::kPlatformUnknown, 0, 0}, {"sf3-demo", "Spyfox 3: Operation Ozone (Demo)", GID_HEGAME, 6, 99, 61, MDT_NONE, - GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_LOCALIZED, Common::kPlatformUnknown, 0, 0}, + GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_LOCALIZED | GF_16BIT_COLOR, Common::kPlatformUnknown, 0, 0}, {"bb2demo", "Backyard Baseball 2001 (Demo)", GID_HEGAME, 6, 99, 61, MDT_NONE, - GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0}, + GF_USE_KEY | GF_NEW_COSTUMES | GF_16BIT_COLOR, Common::kPlatformUnknown, 0, 0}, {"footdemo", "Backyard Football 2002 (Demo)", GID_HEGAME, 6, 99, 61, MDT_NONE, GF_USE_KEY | GF_NEW_COSTUMES | GF_MULTIPLE_VERSIONS, Common::kPlatformUnknown, 0, 0}, {"SoccerMLS", "Backyard Soccer MLS Edition", GID_HEGAME, 6, 99, 61, MDT_NONE, @@ -378,23 +378,23 @@ static const ScummGameSettings scumm_settings[] = { // Humongous Entertainment Scumm Version ? {"ff5demo", "Freddi Fish 5: The Case of the Creature of Coral Cave (Demo)", GID_FREDDICOVE, 6, 100, 61, MDT_NONE, - GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_LOCALIZED, Common::kPlatformUnknown, 0, 0}, + GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_LOCALIZED | GF_16BIT_COLOR, Common::kPlatformUnknown, 0, 0}, {"pjgames", "Pajama Sam: Games to Play On Any Day", GID_HEGAME, 6, 100, 62, MDT_NONE, - GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_LOCALIZED, Common::kPlatformUnknown, 0, 0}, + GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_LOCALIZED | GF_16BIT_COLOR, Common::kPlatformUnknown, 0, 0}, // Uses smacker in external files - {"artdemo", "Blue's Art Time Activities (Demo)", GID_HEGAME, 6, 99, 61, MDT_NONE, - GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0}, {"BluesBirthdayDemo", "Blue's Birthday Adventure (Demo)", GID_HEGAME, 6, 98, 61, MDT_NONE, GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0}, + {"artdemo", "Blue's Art Time Activities (Demo)", GID_HEGAME, 6, 99, 61, MDT_NONE, + GF_USE_KEY | GF_NEW_COSTUMES | GF_16BIT_COLOR, Common::kPlatformUnknown, 0, 0}, {"readdemo", "Blue's Reading Time Activities (Demo)", GID_HEGAME, 6, 99, 61, MDT_NONE, - GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0}, + GF_USE_KEY | GF_NEW_COSTUMES | GF_16BIT_COLOR, Common::kPlatformUnknown, 0, 0}, // Uses bink in external files for logos {"Baseball2003", "Backyard Baseball 2003", GID_HEGAME, 6, 100, 61, MDT_NONE, - GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0}, + GF_USE_KEY | GF_NEW_COSTUMES | GF_16BIT_COLOR, Common::kPlatformUnknown, 0, 0}, {"Soccer2004", "Backyard Soccer 2004", GID_HEGAME, 6, 100, 61, MDT_NONE, - GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0}, + GF_USE_KEY | GF_NEW_COSTUMES | GF_16BIT_COLOR, Common::kPlatformUnknown, 0, 0}, #endif {NULL, NULL, 0, 0, 0, 0, MDT_NONE, 0, Common::kPlatformUnknown, 0, 0} @@ -466,7 +466,7 @@ static const ScummGameSettings multiple_versions_md5_settings[] = { GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALING, Common::kPlatformUnknown, 0, 0}, {"ef71a322b6530ac45b1a070f7c0795f7", "Moonbase Commander (Demo)", GID_HEGAME, 6, 100, 62, MDT_NONE, - GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_LOCALIZED, Common::kPlatformUnknown, 0, 0}, + GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_LOCALIZED | GF_16BIT_COLOR, Common::kPlatformUnknown, 0, 0}, {"37aed3f91c1ef959e0bd265f9b13781f", "Pajama Sam: No Need To Hide When It's Dark Outside (Updated)", GID_HEGAME, 6, 100, 61, MDT_NONE, GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0}, // PajamaNHD diff --git a/scumm/scumm.h b/scumm/scumm.h index f626d6ee1c..daa9328fbf 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -114,13 +114,16 @@ enum GameFeatures { GF_HE_CURSORLESS = 1 << 12, /** HE games for which localized versions exist */ - GF_HE_LOCALIZED = 1 << 13, + GF_HE_LOCALIZED = 1 << 13, + + /** HE games with 16 bit color */ + GF_16BIT_COLOR = 1 << 14, /** Games with multiple versions */ - GF_MULTIPLE_VERSIONS = 1 << 14, + GF_MULTIPLE_VERSIONS = 1 << 15, /** A demo, not a full blown game. */ - GF_DEMO = 1 << 15 + GF_DEMO = 1 << 16 }; /* SCUMM Debug Channels */ diff --git a/scumm/wiz_he.cpp b/scumm/wiz_he.cpp index 11ef292fb2..f5b17893bd 100644 --- a/scumm/wiz_he.cpp +++ b/scumm/wiz_he.cpp @@ -947,7 +947,7 @@ uint8 *ScummEngine_v72he::drawWizImage(int resNum, int state, int x1, int y1, in if (_heversion <= 80 || READ_BE_UINT32(rmap) != 0x01234567) { uint8 *rgbs = findWrappedBlock(MKID('RGBS'), dataPtr, state, 0); assert(rgbs); - remapPalette(rgbs, rmap + 4); + remapHEPalette(rgbs, rmap + 4); } } if (flags & kWIFPrint) { -- cgit v1.2.3