aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjohndoe1232012-09-05 17:46:09 +0000
committerWillem Jan Palenstijn2013-05-08 20:43:39 +0200
commit6f003399c85a38245b1e9f376f94625fad1ca581 (patch)
tree92facdfb98aa35941ef8af973ad54233afdc751a
parent0962c594bd7edb2d232cdd9ff1f10c23f5c6944a (diff)
downloadscummvm-rg350-6f003399c85a38245b1e9f376f94625fad1ca581.tar.gz
scummvm-rg350-6f003399c85a38245b1e9f376f94625fad1ca581.tar.bz2
scummvm-rg350-6f003399c85a38245b1e9f376f94625fad1ca581.zip
NEVERHOOD: Implement Scene2807
-rw-r--r--engines/neverhood/gamemodule.cpp2
-rw-r--r--engines/neverhood/module2800.cpp56
-rw-r--r--engines/neverhood/module2800.h7
3 files changed, 64 insertions, 1 deletions
diff --git a/engines/neverhood/gamemodule.cpp b/engines/neverhood/gamemodule.cpp
index 813222ccf1..18d7881199 100644
--- a/engines/neverhood/gamemodule.cpp
+++ b/engines/neverhood/gamemodule.cpp
@@ -328,7 +328,7 @@ void GameModule::startup() {
createModule(2700, -1);
#endif
#if 1
- _vm->gameState().sceneNum = 3;
+ _vm->gameState().sceneNum = 6;
createModule(2800, -1);
#endif
}
diff --git a/engines/neverhood/module2800.cpp b/engines/neverhood/module2800.cpp
index 9cdc94283d..73675303c8 100644
--- a/engines/neverhood/module2800.cpp
+++ b/engines/neverhood/module2800.cpp
@@ -93,6 +93,10 @@ void Module2800::createScene(int sceneNum, int which) {
// TODO Music18hList_play(0xD2FA4D14, 0, 2, 1);
_childObject = new Scene2806(_vm, this, which);
break;
+ case 6:
+ // TODO Music18hList_play(0xD2FA4D14, 0, 2, 1);
+ _childObject = new Scene2807(_vm, this, which);
+ break;
case 7:
// TODO Music18hList_play(0xD2FA4D14, 0, 2, 1);
_childObject = new Scene2808(_vm, this, 0);
@@ -174,6 +178,9 @@ void Module2800::updateScene() {
createScene(2, 2);
}
break;
+ case 6:
+ createScene(2, 3);
+ break;
case 7:
createScene(5, _moduleResult);
break;
@@ -1451,6 +1458,55 @@ void Scene2806::findClosestPoint() {
}
+Scene2807::Scene2807(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule, true) {
+
+ _surfaceFlag = true;
+ SetMessageHandler(&Scene2807::handleMessage);
+
+ if (getSubVar(0x0C601058, 0) == 1) {
+ insertStaticSprite(0x103021E2, 300);
+ } else if (getSubVar(0x0C601058, 0) == 2) {
+ insertStaticSprite(0x103022E2, 300);
+ } else if (getSubVar(0x0C601058, 0) == 3) {
+ insertStaticSprite(0x103024E2, 300);
+ }
+
+ if (getSubVar(0x0C601058, 1) == 1) {
+ insertStaticSprite(0x4800A52A, 200);
+ } else if (getSubVar(0x0C601058, 1) == 2) {
+ insertStaticSprite(0x4800A62A, 200);
+ } else if (getSubVar(0x0C601058, 1) == 3) {
+ insertStaticSprite(0x4800A02A, 200);
+ }
+
+ if (getSubVar(0x0C601058, 2) == 1) {
+ insertStaticSprite(0x31203430, 100);
+ } else if (getSubVar(0x0C601058, 2) == 2) {
+ insertStaticSprite(0x31203400, 100);
+ } else if (getSubVar(0x0C601058, 2) == 3) {
+ insertStaticSprite(0x31203460, 100);
+ }
+
+ _surfaceFlag = true;
+ setBackground(0x3E049A95);
+ setPalette(0x3E049A95);
+ insertMouse435(0x49A913E8, 20, 620);
+
+}
+
+uint32 Scene2807::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ if (param.asPoint().x <= 20 || param.asPoint().x >= 620) {
+ leaveScene(0);
+ }
+ break;
+ }
+ return 0;
+}
+
static const uint32 kScene2808FileHashes1[] = {
0x90B0392,
0x90B0192
diff --git a/engines/neverhood/module2800.h b/engines/neverhood/module2800.h
index 20bc4b4f74..720f01112e 100644
--- a/engines/neverhood/module2800.h
+++ b/engines/neverhood/module2800.h
@@ -251,6 +251,13 @@ protected:
void findClosestPoint();
};
+class Scene2807 : public Scene {
+public:
+ Scene2807(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
class SsScene2808Dispenser : public StaticSprite {
public:
SsScene2808Dispenser(NeverhoodEngine *vm, Scene *parentScene, int testTubeSetNum, int testTubeIndex);