Skip to content

Commit

Permalink
NEVERHOOD: Fix AsScene2402Door animation
Browse files Browse the repository at this point in the history
  • Loading branch information
johndoe123 authored and wjp committed May 8, 2013
1 parent f8ff1cc commit 8d97f26
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions engines/neverhood/gamemodule.cpp
Expand Up @@ -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);
// <<<DEBUG

#if 1
_vm->gameState().which = 0;
_vm->gameState().sceneNum = 3;
createModule(1300, -1);
_vm->gameState().sceneNum = 1;
createModule(2400, -1);
#endif
#if 0
_vm->gameState().sceneNum = 0;
Expand Down
6 changes: 3 additions & 3 deletions engines/neverhood/module2400.cpp
Expand Up @@ -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();
Expand Down Expand Up @@ -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<AsScene2402Door>(this, which == 1/*CHECKME or != ?*/);
_asDoor = insertSprite<AsScene2402Door>(this, which == 0);
insertSprite<AsScene2402TV>(_klayman);
insertStaticSprite(0x3A01A020, 200);

Expand Down

0 comments on commit 8d97f26

Please sign in to comment.