From 8d97f26cef90f5db41c4153b68eff48700f7501d Mon Sep 17 00:00:00 2001 From: johndoe123 Date: Sat, 20 Oct 2012 18:35:37 +0000 Subject: [PATCH] NEVERHOOD: Fix AsScene2402Door animation --- engines/neverhood/gamemodule.cpp | 5 +++-- engines/neverhood/module2400.cpp | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/engines/neverhood/gamemodule.cpp b/engines/neverhood/gamemodule.cpp index a574fa52f96..2a7de46bcf6 100644 --- a/engines/neverhood/gamemodule.cpp +++ b/engines/neverhood/gamemodule.cpp @@ -366,12 +366,13 @@ void GameModule::startup() { setGlobalVar(V_RADIO_ENABLED, 1); setGlobalVar(V_TNT_DUMMY_BUILT, 1); setGlobalVar(V_FLYTRAP_RING_DOOR, 1); + setGlobalVar(V_TV_JOKE_TOLD, 1); // <<gameState().which = 0; - _vm->gameState().sceneNum = 3; - createModule(1300, -1); + _vm->gameState().sceneNum = 1; + createModule(2400, -1); #endif #if 0 _vm->gameState().sceneNum = 0; diff --git a/engines/neverhood/module2400.cpp b/engines/neverhood/module2400.cpp index 7cc97f7d485..a017c117a8e 100644 --- a/engines/neverhood/module2400.cpp +++ b/engines/neverhood/module2400.cpp @@ -574,16 +574,16 @@ static const uint32 kScene2402FileHashes[] = { }; AsScene2402Door::AsScene2402Door(NeverhoodEngine *vm, Scene *parentScene, bool isOpen) - : AnimatedSprite(vm, 1100), _parentScene(parentScene), _isOpen(isOpen) { + : AnimatedSprite(vm, 1100), _parentScene(parentScene), _isOpen(isOpen), _countdown(0) { SetUpdateHandler(&AsScene2402Door::update); SetMessageHandler(&AsScene2402Door::handleMessage); createSurface1(0x80495831, 100); _x = 320; _y = 240; - _newStickFrameIndex = STICK_LAST_FRAME; if (_isOpen) { startAnimation(0x80495831, -1, -1); + _newStickFrameIndex = STICK_LAST_FRAME; _countdown = 48; } else { stopAnimation(); @@ -749,7 +749,7 @@ Scene2402::Scene2402(NeverhoodEngine *vm, Module *parentModule, int which) tempSprite = insertStaticSprite(0x081A60A8, 1100); _ssDoorFrame = (StaticSprite*)insertStaticSprite(0x406C0AE0, 1100); _klayman->setClipRect(_ssDoorFrame->getDrawRect().x, 0, 639, tempSprite->getDrawRect().y2()); - _asDoor = insertSprite(this, which == 1/*CHECKME or != ?*/); + _asDoor = insertSprite(this, which == 0); insertSprite(_klayman); insertStaticSprite(0x3A01A020, 200);