GROOVIE: option for slim left/right hotspots in puzzles, enabled by default

This commit is contained in:
Die4Ever 2022-12-21 11:57:08 -06:00
parent ca9f4e9739
commit e04a692b87
No known key found for this signature in database
GPG Key ID: 00C99EDCC248D1B6
4 changed files with 46 additions and 17 deletions

View File

@ -70,34 +70,34 @@ const int BASE_FLAGS = ADGF_NO_FLAGS;
#define T7GENTRY(extra, f1, x1, s1, f2, x2, s2, language, platform, flags) \
GROOVIEGAME("t7g", extra, f1, x1, s1, f2, x2, s2, language, platform, flags, GUIO9(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT, GUIO_NOSFX, GAMEOPTION_T7G_FAST_MOVIE_SPEED, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_EASIER_AI, GAMEOPTION_SPEEDRUN), kGroovieT7G)
GROOVIEGAME("t7g", extra, f1, x1, s1, f2, x2, s2, language, platform, flags, GUIO10(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT, GUIO_NOSFX, GAMEOPTION_T7G_FAST_MOVIE_SPEED, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_EASIER_AI, GAMEOPTION_SLIMHOTSPOTS, GAMEOPTION_SPEEDRUN), kGroovieT7G)
#define T7GNOMIDIENTRY(extra, f1, x1, s1, f2, x2, s2, language, platform, flags, guiOptions) \
GROOVIEGAME("t7g", extra, f1, x1, s1, f2, x2, s2, language, platform, flags, (GUIO_NOMIDI GUIO_NOASPECT GUIO_NOSFX GAMEOPTION_T7G_FAST_MOVIE_SPEED GAMEOPTION_SPEEDRUN guiOptions), kGroovieT7G)
GROOVIEGAME("t7g", extra, f1, x1, s1, f2, x2, s2, language, platform, flags, (GUIO_NOMIDI GUIO_NOASPECT GUIO_NOSFX GAMEOPTION_T7G_FAST_MOVIE_SPEED GAMEOPTION_SLIMHOTSPOTS GAMEOPTION_SPEEDRUN guiOptions), kGroovieT7G)
#define T11HENTRY(extra, f1, x1, s1, f2, x2, s2, language, platform, flags) \
GROOVIEGAME("11h", extra, f1, x1, s1, f2, x2, s2, language, platform, flags, GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM GUIO_NOASPECT, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_EASIER_AI, GAMEOPTION_FINAL_HOUR, GAMEOPTION_SPEEDRUN), kGroovieT11H)
GROOVIEGAME("11h", extra, f1, x1, s1, f2, x2, s2, language, platform, flags, GUIO8(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM GUIO_NOASPECT, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_EASIER_AI, GAMEOPTION_FINAL_HOUR, GAMEOPTION_SLIMHOTSPOTS, GAMEOPTION_SPEEDRUN), kGroovieT11H)
#define T11HDEMOENTRY(extra, f1, x1, s1, f2, x2, s2, language, platform, flags) \
GROOVIEGAME("11h", extra, f1, x1, s1, f2, x2, s2, language, platform, flags | ADGF_DEMO, GUIO6(GUIO_NOLAUNCHLOAD, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT, GAMEOPTION_SPEEDRUN), kGroovieT11H)
GROOVIEGAME("11h", extra, f1, x1, s1, f2, x2, s2, language, platform, flags | ADGF_DEMO, GUIO7(GUIO_NOLAUNCHLOAD, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT, GAMEOPTION_SLIMHOTSPOTS, GAMEOPTION_SPEEDRUN), kGroovieT11H)
#define T11HMAKINGOFENTRY(f1, x1, s1, f2, x2, s2, language, platform) \
GROOVIEGAME("making11h", "", f1, x1, s1, f2, x2, s2, language, platform, ADGF_NO_FLAGS, GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT, GAMEOPTION_SPEEDRUN), kGroovieT11H)
GROOVIEGAME("making11h", "", f1, x1, s1, f2, x2, s2, language, platform, ADGF_NO_FLAGS, GUIO6(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT, GAMEOPTION_SLIMHOTSPOTS, GAMEOPTION_SPEEDRUN), kGroovieT11H)
#define CLANENTRY(extra, f1, x1, s1, f2, x2, s2, language, platform, flags) \
GROOVIEGAME("clandestiny", extra, f1, x1, s1, f2, x2, s2, language, platform, flags, GUIO5(GUIO_NOMIDI, GUIO_NOASPECT, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_EASIER_AI, GAMEOPTION_SPEEDRUN), kGroovieCDY)
GROOVIEGAME("clandestiny", extra, f1, x1, s1, f2, x2, s2, language, platform, flags, GUIO6(GUIO_NOMIDI, GUIO_NOASPECT, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_EASIER_AI, GAMEOPTION_SLIMHOTSPOTS, GAMEOPTION_SPEEDRUN), kGroovieCDY)
#define CLANDEMOENTRY(extra, f1, x1, s1, f2, x2, s2, language, platform, flags) \
GROOVIEGAME("clandestiny", extra, f1, x1, s1, f2, x2, s2, language, platform, flags | ADGF_DEMO, GUIO4(GUIO_NOMIDI, GUIO_NOLAUNCHLOAD, GUIO_NOASPECT, GAMEOPTION_SPEEDRUN), kGroovieCDY)
GROOVIEGAME("clandestiny", extra, f1, x1, s1, f2, x2, s2, language, platform, flags | ADGF_DEMO, GUIO5(GUIO_NOMIDI, GUIO_NOLAUNCHLOAD, GUIO_NOASPECT, GAMEOPTION_SLIMHOTSPOTS, GAMEOPTION_SPEEDRUN), kGroovieCDY)
#define UHPENTRY(extra, f1, x1, s1, f2, x2, s2, language, platform, flags) \
GROOVIEGAME("unclehenry", extra, f1, x1, s1, f2, x2, s2, language, platform, flags, GUIO4(GUIO_NOMIDI, GUIO_NOASPECT, GAMEOPTION_EASIER_AI, GAMEOPTION_SPEEDRUN), kGroovieUHP)
GROOVIEGAME("unclehenry", extra, f1, x1, s1, f2, x2, s2, language, platform, flags, GUIO5(GUIO_NOMIDI, GUIO_NOASPECT, GAMEOPTION_EASIER_AI, GAMEOPTION_SLIMHOTSPOTS, GAMEOPTION_SPEEDRUN), kGroovieUHP)
#define TLCENTRY(extra, f1, x1, s1, f2, x2, s2, language, platform, flags) \
GROOVIEGAME("tlc", extra, f1, x1, s1, f2, x2, s2, language, platform, flags | ADGF_CD, GUIO3(GUIO_NOMIDI, GUIO_NOASPECT, GAMEOPTION_SPEEDRUN), kGroovieTLC)
GROOVIEGAME("tlc", extra, f1, x1, s1, f2, x2, s2, language, platform, flags | ADGF_CD, GUIO4(GUIO_NOMIDI, GUIO_NOASPECT, GAMEOPTION_SLIMHOTSPOTS, GAMEOPTION_SPEEDRUN), kGroovieTLC)
#define TLCDVDENTRY(f1, x1, s1, f2, x2, s2, language, platform) \
GROOVIEGAME("tlc", _s("Missing game code"), f1, x1, s1, f2, x2, s2, language, platform, ADGF_UNSUPPORTED | ADGF_DVD, GUIO3(GUIO_NOMIDI, GUIO_NOASPECT, GAMEOPTION_SPEEDRUN), kGroovieTLC)
GROOVIEGAME("tlc", _s("Missing game code"), f1, x1, s1, f2, x2, s2, language, platform, ADGF_UNSUPPORTED | ADGF_DVD, GUIO4(GUIO_NOMIDI, GUIO_NOASPECT, GAMEOPTION_SLIMHOTSPOTS, GAMEOPTION_SPEEDRUN), kGroovieTLC)
#define TLCDEMOENTRY(f1, x1, s1, f2, x2, s2, language, platform, flags) \
GROOVIEGAME("tlc", "Demo", f1, x1, s1, f2, x2, s2, language, platform, flags | ADGF_DEMO, GUIO3(GUIO_NOMIDI, GUIO_NOASPECT, GUIO_NOLAUNCHLOAD), kGroovieTLC)
@ -161,7 +161,7 @@ static const GroovieGameDescription gameDescriptions[] = {
// The 11th Hour: Souped Up
GROOVIEGAME("11hsu", "", "suscript.grv", NULL, -1,
"introd1.gjd", "9ec3e727182fbe40ee23e786721180eb", 6437077, EN_ANY, kPlatformWindows, BASE_FLAGS,
GUIO6(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM GUIO_NOASPECT, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_EASIER_AI_DEFAULT, GAMEOPTION_SPEEDRUN), kGroovieT11H),
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM GUIO_NOASPECT, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_EASIER_AI_DEFAULT, GAMEOPTION_SLIMHOTSPOTS, GAMEOPTION_SPEEDRUN), kGroovieT11H),
/*==== The 11th Hour Demos ====*/
// The 11th Hour DOS Interactive Demo English https://archive.org/details/11th_Hour_demo

View File

@ -46,6 +46,7 @@ struct GroovieGameDescription {
#define GAMEOPTION_FINAL_HOUR GUIO_GAMEOPTIONS4
#define GAMEOPTION_SPEEDRUN GUIO_GAMEOPTIONS5
#define GAMEOPTION_EASIER_AI_DEFAULT GUIO_GAMEOPTIONS6
#define GAMEOPTION_SLIMHOTSPOTS GUIO_GAMEOPTIONS7
} // End of namespace Groovie

View File

@ -91,6 +91,18 @@ static const ADExtraGuiOptionsMap optionsList[] = {
}
},
{
GAMEOPTION_SLIMHOTSPOTS,
{
_s("Slim Left/Right Hotspots"),
_s("Shrinks the hotspots on the left and right sides for exiting puzzles"),
"slim_hotspots",
true,
0,
0
}
},
{
GAMEOPTION_SPEEDRUN,
{

View File

@ -1144,8 +1144,13 @@ void Script::o_hotspot_left() {
debugC(5, kDebugScript, "Groovie::Script: HOTSPOT-LEFT @0x%04X", address);
// Mark the leftmost 100 pixels of the game area
Common::Rect rect(0, 80, 100, 400);
// Mark the leftmost 50 or 100 pixels of the game area
// slim_hotspots is only for puzzles
int width = 100;
if (_savedCode != nullptr && ConfMan.getBool("slim_hotspots"))
width = 50;
Common::Rect rect(0, 80, width, 400);
hotspot(rect, address, 1);
}
@ -1154,8 +1159,13 @@ void Script::o_hotspot_right() {
debugC(5, kDebugScript, "Groovie::Script: HOTSPOT-RIGHT @0x%04X", address);
// Mark the rightmost 100 pixels of the game area
Common::Rect rect(540, 80, 640, 400);
// Mark the rightmost 50 or 100 pixels of the game area
// slim_hotspots is only for puzzles
int width = 100;
if (_savedCode != nullptr && ConfMan.getBool("slim_hotspots"))
width = 50;
Common::Rect rect(640 - width, 80, 640, 400);
hotspot(rect, address, 2);
}
@ -1183,6 +1193,12 @@ void Script::o_hotspot_current() {
void Script::o_inputloopend() {
debugC(5, kDebugScript, "Groovie::Script: Input loop end");
// width for left and right sides
// slim_hotspots is only for puzzles
int width = 80;
if (_savedCode != nullptr && ConfMan.getBool("slim_hotspots"))
width = 50;
// Handle the predefined hotspots
if (_hotspotTopAction) {
Common::Rect rect(0, 0, 640, 80);
@ -1193,11 +1209,11 @@ void Script::o_inputloopend() {
hotspot(rect, _hotspotBottomAction, _hotspotBottomCursor);
}
if (_hotspotRightAction) {
Common::Rect rect(560, 0, 640, 480);
Common::Rect rect(640 - width, 0, 640, 480);
hotspot(rect, _hotspotRightAction, 2);
}
if (_hotspotLeftAction) {
Common::Rect rect(0, 0, 80, 480);
Common::Rect rect(0, 0, width, 480);
hotspot(rect, _hotspotLeftAction, 1);
}