diff options
author | Filippos Karapetis | 2013-10-06 18:07:44 +0300 |
---|---|---|
committer | Filippos Karapetis | 2013-10-06 18:08:19 +0300 |
commit | d5ebc69de0af1992b821297d5e9cc9e8baa604de (patch) | |
tree | dc7f5c2200a9ed2a7c29109a2491331a55240a93 /engines/neverhood/modules/module2200_sprites.cpp | |
parent | f19fd06e243fabf5a9244c178e056432c575860b (diff) | |
download | scummvm-rg350-d5ebc69de0af1992b821297d5e9cc9e8baa604de.tar.gz scummvm-rg350-d5ebc69de0af1992b821297d5e9cc9e8baa604de.tar.bz2 scummvm-rg350-d5ebc69de0af1992b821297d5e9cc9e8baa604de.zip |
NEVERHOOD: Move more scene-specific Klaymen animations to their scenes
Diffstat (limited to 'engines/neverhood/modules/module2200_sprites.cpp')
-rw-r--r-- | engines/neverhood/modules/module2200_sprites.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/engines/neverhood/modules/module2200_sprites.cpp b/engines/neverhood/modules/module2200_sprites.cpp index 8cdaf6c49c..82fd5e32cc 100644 --- a/engines/neverhood/modules/module2200_sprites.cpp +++ b/engines/neverhood/modules/module2200_sprites.cpp @@ -1073,7 +1073,7 @@ uint32 KmScene2206::xHandleMessage(int messageNum, const MessageParam ¶m) { GotoState(&Klaymen::stTryStandIdle); break; case 0x4803: - GotoState(&Klaymen::stRidePlatformDown); + GotoState(&KmScene2206::stRidePlatformDown); break; case 0x4804: if (param.asInteger() != 0) { @@ -1147,6 +1147,27 @@ uint32 KmScene2206::xHandleMessage(int messageNum, const MessageParam ¶m) { return 0; } +void KmScene2206::suRidePlatformDown() { + _platformDeltaY++; + _y += _platformDeltaY; + if (_y > 600) + sendMessage(this, 0x1019, 0); +} + +void KmScene2206::stRidePlatformDown() { + if (!stStartActionFromIdle(AnimationCallback(&KmScene2206::stRidePlatformDown))) { + _busyStatus = 1; + sendMessage(_parentScene, 0x4803, 0); + _acceptInput = false; + _platformDeltaY = 0; + startAnimation(0x5420E254, 0, -1); + SetUpdateHandler(&Klaymen::update); + SetMessageHandler(&Klaymen::hmLowLevel); + SetSpriteUpdate(&KmScene2206::suRidePlatformDown); + _vm->_soundMan->playSoundLooping(0xD3B02847); + } +} + KmScene2207::KmScene2207(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y) : Klaymen(vm, parentScene, x, y) { |