diff options
author | Sven Hesse | 2012-06-07 04:29:10 +0200 |
---|---|---|
committer | Sven Hesse | 2012-06-07 04:29:10 +0200 |
commit | c37577a950f7337889d5c705c9bc67d434ed3670 (patch) | |
tree | 5b5e026bc7e24331ba1ad3c1d0381f198fc578b9 /engines/gob/minigames | |
parent | 3d537e763c85bb3f16825c8b47894335568278a0 (diff) | |
download | scummvm-rg350-c37577a950f7337889d5c705c9bc67d434ed3670.tar.gz scummvm-rg350-c37577a950f7337889d5c705c9bc67d434ed3670.tar.bz2 scummvm-rg350-c37577a950f7337889d5c705c9bc67d434ed3670.zip |
GOB: Hook up the Penetration minigame in the cheater
Diffstat (limited to 'engines/gob/minigames')
-rw-r--r-- | engines/gob/minigames/geisha/penetration.cpp | 18 | ||||
-rw-r--r-- | engines/gob/minigames/geisha/penetration.h | 5 |
2 files changed, 22 insertions, 1 deletions
diff --git a/engines/gob/minigames/geisha/penetration.cpp b/engines/gob/minigames/geisha/penetration.cpp index e260d3cae2..9791757984 100644 --- a/engines/gob/minigames/geisha/penetration.cpp +++ b/engines/gob/minigames/geisha/penetration.cpp @@ -377,7 +377,7 @@ Penetration::ManagedSub::~ManagedSub() { Penetration::Penetration(GobEngine *vm) : _vm(vm), _background(0), _sprites(0), _objects(0), _sub(0), - _shieldMeter(0), _healthMeter(0), _floor(0) { + _shieldMeter(0), _healthMeter(0), _floor(0), _isPlaying(false) { _background = new Surface(320, 200, 1); @@ -404,6 +404,8 @@ bool Penetration::play(bool hasAccessPass, bool hasMaxEnergy, bool testMode) { _hasMaxEnergy = hasMaxEnergy; _testMode = testMode; + _isPlaying = true; + init(); initScreen(); @@ -432,9 +434,19 @@ bool Penetration::play(bool hasAccessPass, bool hasMaxEnergy, bool testMode) { deinit(); drawEndText(); + _isPlaying = false; + return hasWon(); } +bool Penetration::isPlaying() const { + return _isPlaying; +} + +void Penetration::cheatWin() { + _floor = 3; +} + void Penetration::init() { // Load sounds _vm->_sound->sampleLoad(&_soundShield, SOUND_SND, "boucl.snd"); @@ -748,6 +760,10 @@ void Penetration::checkInput() { _keys[kKeyRight] = true; else if (event.kbd.keycode == Common::KEYCODE_SPACE) _keys[kKeySpace] = true; + else if (event.kbd.keycode == Common::KEYCODE_d) { + _vm->getDebugger()->attach(); + _vm->getDebugger()->onFrame(); + } break; case Common::EVENT_KEYUP: diff --git a/engines/gob/minigames/geisha/penetration.h b/engines/gob/minigames/geisha/penetration.h index 0f36453017..0336ef8dcb 100644 --- a/engines/gob/minigames/geisha/penetration.h +++ b/engines/gob/minigames/geisha/penetration.h @@ -50,6 +50,9 @@ public: bool play(bool hasAccessPass, bool hasMaxEnergy, bool testMode); + bool isPlaying() const; + void cheatWin(); + private: static const int kModeCount = 2; static const int kFloorCount = 3; @@ -141,6 +144,8 @@ private: SoundDesc _soundShoot; SoundDesc _soundExit; + bool _isPlaying; + void init(); void deinit(); |