diff --git a/engines/hypno/arcade.cpp b/engines/hypno/arcade.cpp index 379ee04c49a..b2b55c50389 100644 --- a/engines/hypno/arcade.cpp +++ b/engines/hypno/arcade.cpp @@ -462,7 +462,8 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) { if (it->attackFrames.size() > 0) { uint32 attackFrame = it->attackFrames.front(); if (frame > 0 && frame >= (int)(attackFrame - 2) && !it->destroyed) { - _health = _health - it->attackWeight; + if (!_infiniteHealthCheat) + _health = _health - it->attackWeight; hitPlayer(); it->attackFrames.pop_front(); } diff --git a/engines/hypno/hypno.cpp b/engines/hypno/hypno.cpp index d4956b09fc3..5719d80d33a 100644 --- a/engines/hypno/hypno.cpp +++ b/engines/hypno/hypno.cpp @@ -69,6 +69,12 @@ HypnoEngine::HypnoEngine(OSystem *syst, const ADGameDescription *gd) if (!Common::parseBool(ConfMan.get("cheats"), _cheatsEnabled)) error("Failed to parse bool from cheats options"); + if (!Common::parseBool(ConfMan.get("infiniteHealth"), _infiniteHealthCheat)) + error("Failed to parse bool from cheats options"); + + if (!Common::parseBool(ConfMan.get("infiniteAmmo"), _infiniteAmmoCheat)) + error("Failed to parse bool from cheats options"); + if (!Common::parseBool(ConfMan.get("restored"), _restoredContentEnabled)) error("Failed to parse bool from restored options"); // Add quit level diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h index 23c6056f3ff..f728c14e6b1 100644 --- a/engines/hypno/hypno.h +++ b/engines/hypno/hypno.h @@ -100,6 +100,8 @@ public: Common::Platform _platform; Common::String _variant; bool _cheatsEnabled; + bool _infiniteHealthCheat; + bool _infiniteAmmoCheat; bool _restoredContentEnabled; Audio::SoundHandle _soundHandle; diff --git a/engines/hypno/wet/arcade.cpp b/engines/hypno/wet/arcade.cpp index 8fa4399703c..5291cc706a3 100644 --- a/engines/hypno/wet/arcade.cpp +++ b/engines/hypno/wet/arcade.cpp @@ -659,7 +659,8 @@ bool WetEngine::clickedSecondaryShoot(const Common::Point &mousePos) { if (_ammo <= 0) return false; - _ammo--; + if (!_infiniteAmmoCheat) + _ammo--; incShotsFired(); return clickedPrimaryShoot(mousePos); } @@ -668,7 +669,8 @@ void WetEngine::missedTarget(Shoot *s, ArcadeShooting *arc) { if (s->name == "SP_SWITCH_R" || s->name == "SP_SWITCH_L") { _health = 0; } else if (s->name == "SP_LIZARD1") { - _health = _health - 15; + if (!_infiniteHealthCheat) + _health = _health - 15; _background->decoder->pauseVideo(true); MVideo video(arc->additionalVideo, Common::Point(0, 0), false, true, false); runIntro(video); @@ -688,7 +690,8 @@ void WetEngine::missedTarget(Shoot *s, ArcadeShooting *arc) { drawScreen(); _skipDefeatVideo = true; } else if (s->attackFrames.empty()) { - _health = _health - s->attackWeight; + if (!_infiniteHealthCheat) + _health = _health - s->attackWeight; hitPlayer(); } }