diff options
author | Filippos Karapetis | 2013-10-06 04:55:52 +0300 |
---|---|---|
committer | Filippos Karapetis | 2013-10-06 04:56:41 +0300 |
commit | f35298f9eed0c98a9ec839e80f95c9fcab075223 (patch) | |
tree | 3ec95ff547d1da89f4f236cfb0866689cfe69b68 /engines/neverhood/modules/module1900_sprites.cpp | |
parent | a1719ac3d0c895ce428fe91ccc90792f3ac2d43a (diff) | |
download | scummvm-rg350-f35298f9eed0c98a9ec839e80f95c9fcab075223.tar.gz scummvm-rg350-f35298f9eed0c98a9ec839e80f95c9fcab075223.tar.bz2 scummvm-rg350-f35298f9eed0c98a9ec839e80f95c9fcab075223.zip |
NEVERHOOD: Move module-specific Klaymen code to its respective module
Diffstat (limited to 'engines/neverhood/modules/module1900_sprites.cpp')
-rw-r--r-- | engines/neverhood/modules/module1900_sprites.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/engines/neverhood/modules/module1900_sprites.cpp b/engines/neverhood/modules/module1900_sprites.cpp index 176731aa3d..09c0b132d5 100644 --- a/engines/neverhood/modules/module1900_sprites.cpp +++ b/engines/neverhood/modules/module1900_sprites.cpp @@ -414,4 +414,43 @@ void AsScene1907WaterHint::hide() { SetMessageHandler(&Sprite::handleMessage); } +KmScene1901::KmScene1901(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y) + : Klaymen(vm, parentScene, x, y) { + + // Empty +} + +uint32 KmScene1901::xHandleMessage(int messageNum, const MessageParam ¶m) { + switch (messageNum) { + case 0x4001: + case 0x4800: + startWalkToX(param.asPoint().x, false); + break; + case 0x4004: + GotoState(&Klaymen::stTryStandIdle); + break; + case 0x4817: + setDoDeltaX(param.asInteger()); + gotoNextStateExt(); + break; + case 0x481D: + GotoState(&Klaymen::stTurnToUse); + break; + case 0x481E: + GotoState(&Klaymen::stReturnFromUse); + break; + case 0x482D: + setDoDeltaX(_x > (int16)param.asInteger() ? 1 : 0); + gotoNextStateExt(); + break; + case 0x483F: + startSpecialWalkRight(param.asInteger()); + break; + case 0x4840: + startSpecialWalkLeft(param.asInteger()); + break; + } + return 0; +} + } // End of namespace Neverhood |