aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/neverhood/modules/module1000.cpp23
-rw-r--r--engines/neverhood/modules/module1000.h9
-rw-r--r--engines/neverhood/scene.cpp23
-rw-r--r--engines/neverhood/scene.h8
4 files changed, 31 insertions, 32 deletions
diff --git a/engines/neverhood/modules/module1000.cpp b/engines/neverhood/modules/module1000.cpp
index f65b89899d..08fb88ad72 100644
--- a/engines/neverhood/modules/module1000.cpp
+++ b/engines/neverhood/modules/module1000.cpp
@@ -1383,29 +1383,6 @@ uint32 Scene1002::handleMessage(int messageNum, const MessageParam &param, Entit
return messageResult;
}
-// StaticScene
-
-StaticScene::StaticScene(NeverhoodEngine *vm, Module *parentModule, uint32 backgroundFileHash, uint32 cursorFileHash)
- : Scene(vm, parentModule) {
-
- SetMessageHandler(&StaticScene::handleMessage);
-
- setBackground(backgroundFileHash);
- setPalette(backgroundFileHash);
- insertPuzzleMouse(cursorFileHash, 20, 620);
-}
-
-uint32 StaticScene::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;
-}
-
// Scene1004
AsScene1004TrashCan::AsScene1004TrashCan(NeverhoodEngine *vm)
diff --git a/engines/neverhood/modules/module1000.h b/engines/neverhood/modules/module1000.h
index 8461ecfc6f..9e97e822f6 100644
--- a/engines/neverhood/modules/module1000.h
+++ b/engines/neverhood/modules/module1000.h
@@ -102,15 +102,6 @@ protected:
uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
};
-// TODO: Move this to some common file since it's used several times
-
-class StaticScene : public Scene {
-public:
- StaticScene(NeverhoodEngine *vm, Module *parentModule, uint32 backgroundFileHash, uint32 cursorFileHash);
-protected:
- uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
-};
-
// Scene1002
class AsScene1002Ring : public AnimatedSprite {
diff --git a/engines/neverhood/scene.cpp b/engines/neverhood/scene.cpp
index c8d7490753..8a0e3d5556 100644
--- a/engines/neverhood/scene.cpp
+++ b/engines/neverhood/scene.cpp
@@ -593,4 +593,27 @@ void Scene::insertMouse(Mouse *mouseCursor) {
addEntity(_mouseCursor);
}
+// StaticScene
+
+StaticScene::StaticScene(NeverhoodEngine *vm, Module *parentModule, uint32 backgroundFileHash, uint32 cursorFileHash)
+ : Scene(vm, parentModule) {
+
+ SetMessageHandler(&StaticScene::handleMessage);
+
+ setBackground(backgroundFileHash);
+ setPalette(backgroundFileHash);
+ insertPuzzleMouse(cursorFileHash, 20, 620);
+}
+
+uint32 StaticScene::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;
+}
+
} // End of namespace Neverhood
diff --git a/engines/neverhood/scene.h b/engines/neverhood/scene.h
index 5e42e34418..cd44ba7bb1 100644
--- a/engines/neverhood/scene.h
+++ b/engines/neverhood/scene.h
@@ -224,6 +224,14 @@ protected:
void insertMouse(Mouse *mouseCursor);
};
+
+class StaticScene : public Scene {
+public:
+ StaticScene(NeverhoodEngine *vm, Module *parentModule, uint32 backgroundFileHash, uint32 cursorFileHash);
+protected:
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
} // End of namespace Neverhood
#endif /* NEVERHOOD_SCENE_H */