Skip to content

Commit

Permalink
NEVERHOOD: Implement Scene2807
Browse files Browse the repository at this point in the history
  • Loading branch information
johndoe123 authored and wjp committed May 8, 2013
1 parent 0962c59 commit 6f00339
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 1 deletion.
2 changes: 1 addition & 1 deletion engines/neverhood/gamemodule.cpp
Expand Up @@ -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
}
Expand Down
56 changes: 56 additions & 0 deletions engines/neverhood/module2800.cpp
Expand Up @@ -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);
Expand Down Expand Up @@ -174,6 +178,9 @@ void Module2800::updateScene() {
createScene(2, 2);
}
break;
case 6:
createScene(2, 3);
break;
case 7:
createScene(5, _moduleResult);
break;
Expand Down Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions engines/neverhood/module2800.h
Expand Up @@ -251,6 +251,13 @@ class Scene2806 : public Scene {
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);
Expand Down

0 comments on commit 6f00339

Please sign in to comment.