aboutsummaryrefslogtreecommitdiff
path: root/engines/neverhood/gamemodule.cpp
diff options
context:
space:
mode:
authorjohndoe1232011-07-01 13:20:46 +0000
committerWillem Jan Palenstijn2013-05-08 20:30:57 +0200
commit3c82668fe4267b34a9e3c7fe88f0d2a0fcfc4c4b (patch)
tree1a98104a53fb813e0093405a813a42d74d6bfeb5 /engines/neverhood/gamemodule.cpp
parentf01f9343c831cda618dabd2dcda7be77b2948ecc (diff)
downloadscummvm-rg350-3c82668fe4267b34a9e3c7fe88f0d2a0fcfc4c4b.tar.gz
scummvm-rg350-3c82668fe4267b34a9e3c7fe88f0d2a0fcfc4c4b.tar.bz2
scummvm-rg350-3c82668fe4267b34a9e3c7fe88f0d2a0fcfc4c4b.zip
NEVERHOOD: More work on Module1500
- Implement Scene1501 (with yet unimpelemented stuff commented out) - Add preliminary main loop to test stuff/updates - Add dummy SoundResource - And fix a mean bug/typo in some initializer lists... (The intro now "runs" but doesn't show anything yet since the actual display code and other classes are not yet implemented yet.)
Diffstat (limited to 'engines/neverhood/gamemodule.cpp')
-rw-r--r--engines/neverhood/gamemodule.cpp25
1 files changed, 19 insertions, 6 deletions
diff --git a/engines/neverhood/gamemodule.cpp b/engines/neverhood/gamemodule.cpp
index 09046cfa3e..e46d23c420 100644
--- a/engines/neverhood/gamemodule.cpp
+++ b/engines/neverhood/gamemodule.cpp
@@ -22,20 +22,22 @@
#include "neverhood/gamemodule.h"
+#include "neverhood/module1500.h"
+
namespace Neverhood {
GameModule::GameModule(NeverhoodEngine *vm)
- : Module(_vm, NULL) {
+ : Module(vm, NULL) {
// Other initializations moved to actual engine class
// TODO
// TODO Sound1ChList_sub_407F70(0x2D0031, 0x8861079);
-
-
SetMessageHandler(&GameModule::handleMessage);
+
+ startup();
}
@@ -49,6 +51,8 @@ GameModule::~GameModule() {
// TODO: Set palette to black but probably not neccessary
// TODO Sound1ChList_sub_408480();
+
+ // TODO Set debug vars (maybe)
}
@@ -84,15 +88,24 @@ void GameModule::startup() {
}
void GameModule::createModule1500(int which) {
- // TODO
_someFlag1 = false;
// TODO *getGlobalGameVarValuePtr(0x91080831) = 0x0F10114;
- // TODO _childObject = new Module1500(this, which, true);
+ _childObject = new Module1500(_vm, this, which, true);
SetUpdateHandler(&GameModule::updateModule1500);
}
void GameModule::updateModule1500() {
- // TODO
+ if (!_childObject)
+ return;
+ _childObject->handleUpdate();
+ if (_done) {
+ _done = false;
+ delete _childObject;
+ _childObject = NULL;
+ debug("Done...");
+ // TODO createModule1000();
+ // TODO _childObject->handleUpdate();
+ }
}
} // End of namespace Neverhood