FREESCAPE: added extended timer cheat for all the games

This commit is contained in:
neuromancer 2022-11-27 08:55:35 +01:00
parent 1b8759f13b
commit aa0be90ef5
6 changed files with 27 additions and 2 deletions

View File

@ -252,7 +252,7 @@ static const DebugChannelDef debugFlagList[] = {
class FreescapeMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
FreescapeMetaEngineDetection() : AdvancedMetaEngineDetection(Freescape::gameDescriptions, sizeof(ADGameDescription), Freescape::freescapeGames) {
_guiOptions = GUIO3(GUIO_NOMIDI, GAMEOPTION_PRERECORDED_SOUNDS, GAMEOPTION_DISABLE_DEMO_MODE);
_guiOptions = GUIO4(GUIO_NOMIDI, GAMEOPTION_PRERECORDED_SOUNDS, GAMEOPTION_EXTENDED_TIMER, GAMEOPTION_DISABLE_DEMO_MODE);
}
const char *getName() const override {

View File

@ -22,8 +22,13 @@
#ifndef FREESCAPE_DETECTION_H
#define FREESCAPE_DETECTION_H
// Engine options
#define GAMEOPTION_PRERECORDED_SOUNDS GUIO_GAMEOPTIONS1
#define GAMEOPTION_AUTOMATIC_DRILLING GUIO_GAMEOPTIONS2
#define GAMEOPTION_EXTENDED_TIMER GUIO_GAMEOPTIONS2
#define GAMEOPTION_DISABLE_DEMO_MODE GUIO_GAMEOPTIONS3
// Driller options
#define GAMEOPTION_AUTOMATIC_DRILLING GUIO_GAMEOPTIONS4
#endif

View File

@ -56,6 +56,9 @@ FreescapeEngine::FreescapeEngine(OSystem *syst, const ADGameDescription *gd)
if (!Common::parseBool(ConfMan.get("prerecorded_sounds"), _usePrerecordedSounds))
error("Failed to parse bool from prerecorded_sounds option");
if (!Common::parseBool(ConfMan.get("extended_timer"), _useExtendedTimer))
error("Failed to parse bool from extended_timer option");
if (!Common::parseBool(ConfMan.get("disable_demo_mode"), _disableDemoMode))
error("Failed to parse bool from disable_demo_mode option");

View File

@ -320,6 +320,9 @@ public:
bool _timerStarted;
int _countdown;
int _ticks;
// Cheats
bool _useExtendedTimer;
};
enum DrillerReleaseFlags {

View File

@ -528,6 +528,9 @@ void FreescapeEngine::load8bitBinary(Common::SeekableReadStream *file, int offse
n += char(readField(file, 8));
n += char(readField(file, 8));
_countdown = _countdown + atoi(n.c_str());
if (_useExtendedTimer)
_countdown = 359999; // 99:59:59
}
if (isAmiga() || isAtariST())

View File

@ -36,6 +36,17 @@ static const ADExtraGuiOptionsMap optionsList[] = {
0
}
},
{
GAMEOPTION_EXTENDED_TIMER,
{
_s("Extended timer"),
_s("Start the game timer at 99:59:59"),
"extended_timer",
false,
0,
0
}
},
{
GAMEOPTION_AUTOMATIC_DRILLING,
{