diff options
Diffstat (limited to 'engines/parallaction/gui_ns.cpp')
-rw-r--r-- | engines/parallaction/gui_ns.cpp | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/engines/parallaction/gui_ns.cpp b/engines/parallaction/gui_ns.cpp index 1fee4e538c..2807f6790f 100644 --- a/engines/parallaction/gui_ns.cpp +++ b/engines/parallaction/gui_ns.cpp @@ -41,10 +41,10 @@ protected: Common::String _nextState; uint32 _startTime; - Parallaction_ns *_vm; + Parallaction *_vm; public: - SplashInputState_NS(Parallaction_ns *vm, const Common::String &name, MenuInputHelper *helper) : MenuInputState(name, helper), _vm(vm) { + SplashInputState_NS(Parallaction *vm, const Common::String &name, MenuInputHelper *helper) : MenuInputState(name, helper), _vm(vm) { } virtual MenuInputState* run() { @@ -66,7 +66,7 @@ public: class SplashInputState0_NS : public SplashInputState_NS { public: - SplashInputState0_NS(Parallaction_ns *vm, MenuInputHelper *helper) : SplashInputState_NS(vm, "intro0", helper) { + SplashInputState0_NS(Parallaction *vm, MenuInputHelper *helper) : SplashInputState_NS(vm, "intro0", helper) { _slideName = "intro"; _timeOut = 2000; _nextState = "intro1"; @@ -76,7 +76,7 @@ public: class SplashInputState1_NS : public SplashInputState_NS { public: - SplashInputState1_NS(Parallaction_ns *vm, MenuInputHelper *helper) : SplashInputState_NS(vm, "intro1", helper) { + SplashInputState1_NS(Parallaction *vm, MenuInputHelper *helper) : SplashInputState_NS(vm, "intro1", helper) { _slideName = "minintro"; _timeOut = 2000; _nextState = "chooselanguage"; @@ -111,10 +111,10 @@ class ChooseLanguageInputState_NS : public MenuInputState { static const Common::Rect _amigaLanguageSelectBlocks[4]; const Common::Rect *_blocks; - Parallaction_ns *_vm; + Parallaction *_vm; public: - ChooseLanguageInputState_NS(Parallaction_ns *vm, MenuInputHelper *helper) : MenuInputState("chooselanguage", helper), _vm(vm) { + ChooseLanguageInputState_NS(Parallaction *vm, MenuInputHelper *helper) : MenuInputState("chooselanguage", helper), _vm(vm) { _allowChoice = false; _nextState = "selectgame"; @@ -203,13 +203,13 @@ class SelectGameInputState_NS : public MenuInputState { uint _labels[2]; - Parallaction_ns *_vm; + Parallaction *_vm; static const char *newGameMsg[4]; static const char *loadGameMsg[4]; public: - SelectGameInputState_NS(Parallaction_ns *vm, MenuInputHelper *helper) : MenuInputState("selectgame", helper), _vm(vm) { + SelectGameInputState_NS(Parallaction *vm, MenuInputHelper *helper) : MenuInputState("selectgame", helper), _vm(vm) { _choice = 0; _oldChoice = -1; @@ -271,10 +271,10 @@ const char *SelectGameInputState_NS::loadGameMsg[4] = { class LoadGameInputState_NS : public MenuInputState { bool _result; - Parallaction_ns *_vm; + Parallaction *_vm; public: - LoadGameInputState_NS(Parallaction_ns *vm, MenuInputHelper *helper) : MenuInputState("loadgame", helper), _vm(vm) { } + LoadGameInputState_NS(Parallaction *vm, MenuInputHelper *helper) : MenuInputState("loadgame", helper), _vm(vm) { } virtual MenuInputState* run() { if (!_result) { @@ -291,12 +291,12 @@ public: class NewGameInputState_NS : public MenuInputState { - Parallaction_ns *_vm; + Parallaction *_vm; static const char *introMsg3[4]; public: - NewGameInputState_NS(Parallaction_ns *vm, MenuInputHelper *helper) : MenuInputState("newgame", helper), _vm(vm) { + NewGameInputState_NS(Parallaction *vm, MenuInputHelper *helper) : MenuInputState("newgame", helper), _vm(vm) { } virtual MenuInputState* run() { @@ -344,10 +344,10 @@ const char *NewGameInputState_NS::introMsg3[4] = { class StartDemoInputState_NS : public MenuInputState { - Parallaction_ns *_vm; + Parallaction *_vm; public: - StartDemoInputState_NS(Parallaction_ns *vm, MenuInputHelper *helper) : MenuInputState("startdemo", helper), _vm(vm) { + StartDemoInputState_NS(Parallaction *vm, MenuInputHelper *helper) : MenuInputState("startdemo", helper), _vm(vm) { } virtual MenuInputState* run() { @@ -372,7 +372,7 @@ class SelectCharacterInputState_NS : public MenuInputState { static const Common::Rect codeSelectBlocks[9]; static const Common::Rect codeTrueBlocks[9]; - Parallaction_ns *_vm; + Parallaction *_vm; int guiGetSelectedBlock(const Common::Point &p) { @@ -425,7 +425,7 @@ class SelectCharacterInputState_NS : public MenuInputState { public: - SelectCharacterInputState_NS(Parallaction_ns *vm, MenuInputHelper *helper) : MenuInputState("selectcharacter", helper), _vm(vm) { + SelectCharacterInputState_NS(Parallaction *vm, MenuInputHelper *helper) : MenuInputState("selectcharacter", helper), _vm(vm) { _keys = (_vm->getPlatform() == Common::kPlatformAmiga && (_vm->getFeatures() & GF_LANG_MULT)) ? _amigaKeys : _pcKeys; _block.create(BLOCK_WIDTH, BLOCK_HEIGHT, 1); } @@ -509,7 +509,6 @@ public: error("If you read this, either your CPU or transivity is broken (we believe the former)."); } - _vm->_inTestResult = false; _vm->cleanupGame(); _vm->scheduleLocationSwitch(_charStartLocation[character]); } @@ -621,7 +620,7 @@ const Common::Rect SelectCharacterInputState_NS::codeTrueBlocks[9] = { class ShowCreditsInputState_NS : public MenuInputState { - Parallaction_ns *_vm; + Parallaction *_vm; int _current; uint32 _startTime; @@ -633,7 +632,7 @@ class ShowCreditsInputState_NS : public MenuInputState { static const Credit _credits[6]; public: - ShowCreditsInputState_NS(Parallaction_ns *vm, MenuInputHelper *helper) : MenuInputState("showcredits", helper), _vm(vm) { + ShowCreditsInputState_NS(Parallaction *vm, MenuInputHelper *helper) : MenuInputState("showcredits", helper), _vm(vm) { } void drawCurrentLabel() { @@ -686,11 +685,11 @@ const ShowCreditsInputState_NS::Credit ShowCreditsInputState_NS::_credits[6] = { }; class EndIntroInputState_NS : public MenuInputState { - Parallaction_ns *_vm; + Parallaction *_vm; bool _isDemo; public: - EndIntroInputState_NS(Parallaction_ns *vm, MenuInputHelper *helper) : MenuInputState("endintro", helper), _vm(vm) { + EndIntroInputState_NS(Parallaction *vm, MenuInputHelper *helper) : MenuInputState("endintro", helper), _vm(vm) { _isDemo = (_vm->getFeatures() & GF_DEMO) != 0; } @@ -723,7 +722,7 @@ public: class EndPartInputState_NS : public MenuInputState { - Parallaction_ns *_vm; + Parallaction *_vm; bool _allPartsComplete; // part completion messages @@ -739,7 +738,7 @@ class EndPartInputState_NS : public MenuInputState { public: - EndPartInputState_NS(Parallaction_ns *vm, MenuInputHelper *helper) : MenuInputState("endpart", helper), _vm(vm) { + EndPartInputState_NS(Parallaction *vm, MenuInputHelper *helper) : MenuInputState("endpart", helper), _vm(vm) { } virtual MenuInputState* run() { @@ -759,7 +758,9 @@ public: } virtual void enter() { - _allPartsComplete = _vm->allPartsComplete(); + bool completed[3]; + _vm->getGamePartProgress(completed, 3); + _allPartsComplete = (completed[0] && completed[1] && completed[2]); _vm->_input->setMouseState(MOUSE_DISABLED); uint id[4]; |