mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
HYPNO: implemented infinite health and ammo cheat for arcade sequences in wet
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -100,6 +100,8 @@ public:
|
||||
Common::Platform _platform;
|
||||
Common::String _variant;
|
||||
bool _cheatsEnabled;
|
||||
bool _infiniteHealthCheat;
|
||||
bool _infiniteAmmoCheat;
|
||||
bool _restoredContentEnabled;
|
||||
|
||||
Audio::SoundHandle _soundHandle;
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user