From 4c3972d68a3a120bec6f7e327990949c82689792 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 19 Oct 2013 23:48:36 +0300 Subject: NEVERHOOD: Fixes for museum walls in Russian version --- engines/neverhood/resourceman.cpp | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/resourceman.cpp b/engines/neverhood/resourceman.cpp index b7d560bbb3..f6937384c0 100644 --- a/engines/neverhood/resourceman.cpp +++ b/engines/neverhood/resourceman.cpp @@ -94,22 +94,30 @@ struct EntrySizeFix { }; static const EntrySizeFix entrySizeFixes[] = { - // fileHash offset diskSize size fixedSize + // fileHash offset diskSize size fixedSize // Fixes for the Russian "Dyadyushka Risech" version - { 0x41137051, 667019, 23391, 41398, 41401 }, // "Options" menu header text - { 0x0f960021, 402268, 1704, 4378, 1870 }, // "Save" menu - { 0x1301a7ea, 1220008, 2373, 4146, 2877 }, // "Load" menu - { 0x84181e81, 201409, 1622, 5058, 1833 }, // "Delete" menu - { 0x08C0AC24, 1031009, 3030, 6498, 3646 }, // Overwrite dialog - { 0xc6604282, 12813649, 19623, 35894, 35895 }, // One of the fonts when reading Willie's notes - { 0x80283101, 13104841, 1961, 3712, 3511 }, // The first message from Willie - { 0x00918480, 17676417, 581, 916, 706 }, // The first wall in the museum - { 0x00800090C,16064875, 19555, 38518, 38526 }, // The first wall in the museum - { 0x058208810,46010519, 24852, 131874, 131776}, // The entry to hut with musical lock + { 0x041137051, 667019, 23391, 41398, 41401 }, // "Options" menu header text + { 0x00f960021, 402268, 1704, 4378, 1870 }, // "Save" menu + { 0x01301a7ea, 1220008, 2373, 4146, 2877 }, // "Load" menu + { 0x084181e81, 201409, 1622, 5058, 1833 }, // "Delete" menu + { 0x008C0AC24, 1031009, 3030, 6498, 3646 }, // Overwrite dialog + { 0x0c6604282, 12813649, 19623, 35894, 35895 }, // One of the fonts when reading Willie's notes + { 0x080283101, 13104841, 1961, 3712, 3511 }, // First message from Willie + { 0x000918480, 17676417, 581, 916, 706 }, // First wall in the museum + { 0x00800090C, 16064875, 19555, 38518, 38526 }, // First wall in the museum + { 0x058208810, 46010519, 24852, 131874, 131776 }, // Entry to hut with musical lock + { 0x00008E486, 39600019, 240, 454, 271 }, // Second wall in the museum + { 0x003086004, 39621755, 482, 614, 600 }, // Second wall in the museum + { 0x02008048E, 39611075, 3798, 21089, 21087 }, // Next couple of walls in the museum + { 0x008586283, 39587864, 12155, 29731, 29730 }, // Next couple of walls in the museum + { 0x030A84C80, 39606142, 4933, 16305, 16275 }, // Next couple of walls in the museum + { 0x000C9A480, 39614873, 6882, 23915, 23913 }, // Next couple of walls in the museum + { 0x000098880, 39603114, 3028, 10860, 10859 }, // Next couple of walls in the museum + { 0x040080183, 39600259, 2855, 13400, 13395 }, // Last buggy wall in the museum // Fixes for the Russian "Fargus" version - { 0x41137051, 758264, 29037, 49590, 49591 }, // "Options" menu header text - { 0xc10b2015, 787304, 4414, 15848, 15853 }, // Text on option buttons + { 0x041137051, 758264, 29037, 49590, 49591 }, // "Options" menu header text + { 0x0c10b2015, 787304, 4414, 15848, 15853 }, // Text on option buttons // { 0, 0, 0, 0, 0 } }; -- cgit v1.2.3 From 1a40387d0d0bbbf2661a5885a4458887c1871181 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 31 Oct 2013 08:24:03 +0200 Subject: NEVERHOOD: Add an option to skip the Hall of Records storyboard scenes Quoting from the Neverhood wiki: "The Hall of Records is considered to be one of the longest and most tedious elements of the Neverhood, and takes approximately nine to ten minutes to walk through". This option allows the player to just skip past all of these tedious storyboard scenes --- engines/neverhood/detection.cpp | 12 ++++++++++-- engines/neverhood/modules/module2200.cpp | 14 ++++++++++++++ engines/neverhood/neverhood.cpp | 1 + 3 files changed, 25 insertions(+), 2 deletions(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/detection.cpp b/engines/neverhood/detection.cpp index 96c87ab3ae..efd0699d58 100644 --- a/engines/neverhood/detection.cpp +++ b/engines/neverhood/detection.cpp @@ -152,13 +152,20 @@ static const NeverhoodGameDescription gameDescriptions[] = { } // End of namespace Neverhood -static const ExtraGuiOption neverhoodExtraGuiOption = { +static const ExtraGuiOption neverhoodExtraGuiOption1 = { _s("Use original save/load screens"), _s("Use the original save/load screens, instead of the ScummVM ones"), "originalsaveload", false }; +static const ExtraGuiOption neverhoodExtraGuiOption2 = { + _s("Skip the Hall of Records storyboard scenes"), + _s("Allows the player to skip past the Hall of Records storyboard scenes"), + "skiphallofrecordsscenes", + false +}; + class NeverhoodMetaEngine : public AdvancedMetaEngine { public: NeverhoodMetaEngine() : AdvancedMetaEngine(Neverhood::gameDescriptions, sizeof(Neverhood::NeverhoodGameDescription), neverhoodGames) { @@ -212,7 +219,8 @@ bool NeverhoodMetaEngine::createInstance(OSystem *syst, Engine **engine, const A const ExtraGuiOptions NeverhoodMetaEngine::getExtraGuiOptions(const Common::String &target) const { ExtraGuiOptions options; - options.push_back(neverhoodExtraGuiOption); + options.push_back(neverhoodExtraGuiOption1); + options.push_back(neverhoodExtraGuiOption2); return options; } diff --git a/engines/neverhood/modules/module2200.cpp b/engines/neverhood/modules/module2200.cpp index 745af42f72..eecddf904c 100644 --- a/engines/neverhood/modules/module2200.cpp +++ b/engines/neverhood/modules/module2200.cpp @@ -20,6 +20,8 @@ * */ +#include "common/config-manager.h" + #include "neverhood/diskplayerscene.h" #include "neverhood/gamemodule.h" #include "neverhood/modules/module1000_sprites.h" @@ -46,6 +48,18 @@ Module2200::~Module2200() { } void Module2200::createScene(int sceneNum, int which) { + if (sceneNum == 46 && ConfMan.getBool("skiphallofrecordsscenes")) { + // Skip the whole Hall of Records storyboard scenes, + // and teleport to the last scene + sceneNum = 41; + } + + if (sceneNum == 40 && ConfMan.getBool("skiphallofrecordsscenes")) { + // Skip the whole Hall of Records storyboard scenes, + // and teleport back to the first scene + sceneNum = 5; + } + debug(1, "Module2200::createScene(%d, %d)", sceneNum, which); _sceneNum = sceneNum; switch (_sceneNum) { diff --git a/engines/neverhood/neverhood.cpp b/engines/neverhood/neverhood.cpp index 1fb32a1834..b961bccea7 100644 --- a/engines/neverhood/neverhood.cpp +++ b/engines/neverhood/neverhood.cpp @@ -79,6 +79,7 @@ Common::Error NeverhoodEngine::run() { // Assign default values to the config manager, in case settings are missing ConfMan.registerDefault("originalsaveload", "false"); + ConfMan.registerDefault("skiphallofrecordsscenes", "false"); _staticData = new StaticData(); _staticData->load("neverhood.dat"); -- cgit v1.2.3 From 20e5bf10178a0e1da8f17dccc509e64272bc755b Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 31 Oct 2013 08:38:17 +0200 Subject: NEVERHOOD: Fix bug #3615124 - "NEVERHOOD: Music from Credits continues to play" --- engines/neverhood/menumodule.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines/neverhood') diff --git a/engines/neverhood/menumodule.cpp b/engines/neverhood/menumodule.cpp index 5ad2dd69d7..6b0635598f 100644 --- a/engines/neverhood/menumodule.cpp +++ b/engines/neverhood/menumodule.cpp @@ -405,6 +405,7 @@ CreditsScene::CreditsScene(NeverhoodEngine *vm, Module *parentModule, bool canAb _ticksTime = _vm->_system->getMillis() + 202100; + _vm->toggleSoundUpdate(true); _musicResource = new MusicResource(_vm); _musicResource->load(0x30812225); _musicResource->play(0); @@ -414,6 +415,7 @@ CreditsScene::CreditsScene(NeverhoodEngine *vm, Module *parentModule, bool canAb CreditsScene::~CreditsScene() { _musicResource->unload(); delete _musicResource; + _vm->toggleSoundUpdate(false); } void CreditsScene::update() { -- cgit v1.2.3 From 1a59030b71cf1eefc1bac257e0ac67d7cb3a50dc Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 2 Nov 2013 16:20:55 +0200 Subject: NEVERHOOD: Really stop the radio music during the radio tower cutscene --- engines/neverhood/modules/module2800.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/modules/module2800.cpp b/engines/neverhood/modules/module2800.cpp index 0578a5df2e..d51515ce81 100644 --- a/engines/neverhood/modules/module2800.cpp +++ b/engines/neverhood/modules/module2800.cpp @@ -208,6 +208,8 @@ void Module2800::createScene(int sceneNum, int which) { break; case 1001: _vm->_soundMan->stopMusic(0xD2FA4D14, 0, 0); + _musicResource->stop(0); + _currentMusicFileHash = 0; createSmackerScene(0x00800801, true, true, false); break; } @@ -354,7 +356,6 @@ void Module2800::updateScene() { } void Module2800::updateMusic(bool halfVolume) { - uint32 newMusicFileHash = _vm->_gameModule->getCurrRadioMusicFileHash(); if (!_musicResource) -- cgit v1.2.3 From 5510a285edbe276e6c52d30d3a98154d4407f004 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 2 Nov 2013 16:38:58 +0200 Subject: NEVERHOOD: Move some Klaymen animations specific to scene 1002 Also, reorganize some of the functions in modules/module1000_sprites.cpp --- engines/neverhood/klaymen.cpp | 65 ------- engines/neverhood/klaymen.h | 7 - engines/neverhood/modules/module1000_sprites.cpp | 229 +++++++++++++++-------- engines/neverhood/modules/module1000_sprites.h | 5 + 4 files changed, 152 insertions(+), 154 deletions(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/klaymen.cpp b/engines/neverhood/klaymen.cpp index 666b20a08a..a942bcae8c 100644 --- a/engines/neverhood/klaymen.cpp +++ b/engines/neverhood/klaymen.cpp @@ -2438,47 +2438,6 @@ uint32 Klaymen::hmStandIdleSpecial(int messageNum, const MessageParam ¶m, En return 0; } -uint32 Klaymen::hmPressDoorButton(int messageNum, const MessageParam ¶m, Entity *sender) { - uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); - switch (messageNum) { - case 0x100D: - if (param.asInteger() == 0x942D2081) { - _acceptInput = false; - sendMessage(_attachedSprite, 0x2003, 0); - } else if (param.asInteger() == 0xDA600012) { - stHitByBoxingGlove(); - } else if (param.asInteger() == 0x0D01B294) { - _acceptInput = false; - sendMessage(_attachedSprite, 0x480B, 0); - } - break; - } - return messageResult; -} - -uint32 Klaymen::hmHitByBoxingGlove(int messageNum, const MessageParam ¶m, Entity *sender) { - int16 speedUpFrameIndex; - uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); - switch (messageNum) { - case 0x1008: - speedUpFrameIndex = getFrameIndex(kKlaymenSpeedUpHash); - if (_currFrameIndex < speedUpFrameIndex) { - startAnimation(0x35AA8059, speedUpFrameIndex, -1); - _y = 435; - } - messageResult = 0; - break; - case 0x100D: - if (param.asInteger() == 0x1A1A0785) { - playSound(0, 0x40F0A342); - } else if (param.asInteger() == 0x60428026) { - playSound(0, 0x40608A59); - } - break; - } - return messageResult; -} - void Klaymen::suFallDown() { AnimatedSprite::updateDeltaXY(); HitRect *hitRect = _parentScene->findHitRectAtPos(_x, _y + 10); @@ -2546,30 +2505,6 @@ void Klaymen::stFallTouchdown() { stTryStandIdle(); } -void Klaymen::stPressDoorButton() { - _busyStatus = 2; - _acceptInput = true; - setDoDeltaX(0); - startAnimation(0x1CD89029, 0, -1); - SetUpdateHandler(&Klaymen::update); - SetMessageHandler(&Klaymen::hmPressDoorButton); - SetSpriteUpdate(&Klaymen::suAction); -} - -void Klaymen::stHitByBoxingGlove() { - _busyStatus = 1; - _acceptInput = false; - startAnimation(0x35AA8059, 0, -1); - SetUpdateHandler(&Klaymen::update); - SetMessageHandler(&Klaymen::hmHitByBoxingGlove); - SetSpriteUpdate(&AnimatedSprite::updateDeltaXY); - FinalizeState(&Klaymen::evHitByBoxingGloveDone); -} - -void Klaymen::evHitByBoxingGloveDone() { - sendMessage(_parentScene, 0x1024, 1); -} - void Klaymen::suFallSkipJump() { updateDeltaXY(); HitRect *hitRect = _parentScene->findHitRectAtPos(_x, _y + 10); diff --git a/engines/neverhood/klaymen.h b/engines/neverhood/klaymen.h index 524bb9a9f2..a614560fc0 100644 --- a/engines/neverhood/klaymen.h +++ b/engines/neverhood/klaymen.h @@ -248,10 +248,6 @@ public: uint32 hmMoveObject(int messageNum, const MessageParam ¶m, Entity *sender); void upMoveObject(); - void stHitByBoxingGlove(); - uint32 hmHitByBoxingGlove(int messageNum, const MessageParam ¶m, Entity *sender); - void evHitByBoxingGloveDone(); - void stStandIdleSmall(); void stWonderAboutSmall(); void stWonderAboutHalfSmall(); @@ -271,9 +267,6 @@ public: void stStandIdleSpecial(); uint32 hmStandIdleSpecial(int messageNum, const MessageParam ¶m, Entity *sender); - void stPressDoorButton(); - uint32 hmPressDoorButton(int messageNum, const MessageParam ¶m, Entity *sender); - void stSpitOutFall0(); void stSpitOutFall2(); void suFallDown(); diff --git a/engines/neverhood/modules/module1000_sprites.cpp b/engines/neverhood/modules/module1000_sprites.cpp index 55618f0124..573474de02 100644 --- a/engines/neverhood/modules/module1000_sprites.cpp +++ b/engines/neverhood/modules/module1000_sprites.cpp @@ -1112,23 +1112,6 @@ KmScene1002::KmScene1002(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 setKlaymenIdleTable1(); } -void KmScene1002::setupJumpToRing() { - _acceptInput = false; - SetUpdateHandler(&Klaymen::update); - SetMessageHandler(&KmScene1002::hmJumpToRing); - SetSpriteUpdate(&Klaymen::suUpdateDestX); - NextState(&KmScene1002::stHangOnRing); - sendMessage(_attachedSprite, 0x482B, 0); -} - -void KmScene1002::stJumpToRing1() { - if (!stStartAction(AnimationCallback(&KmScene1002::stJumpToRing1))) { - _busyStatus = 0; - startAnimation(0xD82890BA, 0, -1); - setupJumpToRing(); - } -} - void KmScene1002::xUpdate() { if (_x >= 250 && _x <= 435 && _y >= 420) { if (_idleTableNum == 0) { @@ -1189,7 +1172,7 @@ uint32 KmScene1002::xHandleMessage(int messageNum, const MessageParam ¶m) { break; case 0x4816: if (param.asInteger() == 0) - GotoState(&Klaymen::stPressDoorButton); + GotoState(&KmScene1002::stPressDoorButton); break; case 0x4817: setDoDeltaX(param.asInteger()); @@ -1238,70 +1221,13 @@ uint32 KmScene1002::xHandleMessage(int messageNum, const MessageParam ¶m) { return 0; } -KmScene1004::KmScene1004(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y) - : Klaymen(vm, parentScene, x, y) { - - _dataResource.load(0x01900A04); -} - -uint32 KmScene1004::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 0x4818: - startWalkToX(_dataResource.getPoint(param.asInteger()).x, false); - break; - case 0x481E: - GotoState(&KmScene1004::stReadNote); - break; - case 0x4820: - sendMessage(_parentScene, 0x2000, 0); - GotoState(&Klaymen::stContinueClimbLadderUp); - break; - case 0x4821: - sendMessage(_parentScene, 0x2000, 0); - _destY = param.asInteger(); - GotoState(&Klaymen::stStartClimbLadderDown); - break; - case 0x4822: - sendMessage(_parentScene, 0x2000, 0); - _destY = param.asInteger(); - GotoState(&Klaymen::stStartClimbLadderUp); - break; - case 0x4823: - sendMessage(_parentScene, 0x2001, 0); - GotoState(&Klaymen::stClimbLadderHalf); - break; - case 0x4824: - sendMessage(_parentScene, 0x2000, 0); - _destY = _dataResource.getPoint(param.asInteger()).y; - GotoState(&Klaymen::stStartClimbLadderDown); - break; - case 0x4825: - sendMessage(_parentScene, 0x2000, 0); - _destY = _dataResource.getPoint(param.asInteger()).y; - GotoState(&Klaymen::stStartClimbLadderUp); - break; - case 0x4828: - GotoState(&Klaymen::stTurnToBackToUse); - break; - case 0x483F: - startSpecialWalkRight(param.asInteger()); - break; - case 0x4840: - startSpecialWalkLeft(param.asInteger()); - break; - } - return 0; +void KmScene1002::setupJumpToRing() { + _acceptInput = false; + SetUpdateHandler(&Klaymen::update); + SetMessageHandler(&KmScene1002::hmJumpToRing); + SetSpriteUpdate(&Klaymen::suUpdateDestX); + NextState(&KmScene1002::stHangOnRing); + sendMessage(_attachedSprite, 0x482B, 0); } uint32 KmScene1002::hmJumpToRing(int messageNum, const MessageParam ¶m, Entity *sender) { @@ -1332,6 +1258,14 @@ void KmScene1002::stHangOnRing() { SetSpriteUpdate(NULL); } +void KmScene1002::stJumpToRing1() { + if (!stStartAction(AnimationCallback(&KmScene1002::stJumpToRing1))) { + _busyStatus = 0; + startAnimation(0xD82890BA, 0, -1); + setupJumpToRing(); + } +} + void KmScene1002::stJumpToRing2() { if (!stStartAction(AnimationCallback(&KmScene1002::stJumpToRing2))) { _busyStatus = 0; @@ -1542,6 +1476,137 @@ uint32 KmScene1002::hmFirstMoveVenusFlyTrap(int messageNum, const MessageParam & return messageResult; } +void KmScene1002::stPressDoorButton() { + _busyStatus = 2; + _acceptInput = true; + setDoDeltaX(0); + startAnimation(0x1CD89029, 0, -1); + SetUpdateHandler(&Klaymen::update); + SetMessageHandler(&KmScene1002::hmPressDoorButton); + SetSpriteUpdate(&Klaymen::suAction); +} + +void KmScene1002::stHitByBoxingGlove() { + _busyStatus = 1; + _acceptInput = false; + startAnimation(0x35AA8059, 0, -1); + SetUpdateHandler(&Klaymen::update); + SetMessageHandler(&KmScene1002::hmHitByBoxingGlove); + SetSpriteUpdate(&AnimatedSprite::updateDeltaXY); + FinalizeState(&KmScene1002::evHitByBoxingGloveDone); +} + +void KmScene1002::evHitByBoxingGloveDone() { + sendMessage(_parentScene, 0x1024, 1); +} + +uint32 KmScene1002::hmPressDoorButton(int messageNum, const MessageParam ¶m, Entity *sender) { + uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); + switch (messageNum) { + case 0x100D: + if (param.asInteger() == 0x942D2081) { + _acceptInput = false; + sendMessage(_attachedSprite, 0x2003, 0); + } else if (param.asInteger() == 0xDA600012) { + stHitByBoxingGlove(); + } else if (param.asInteger() == 0x0D01B294) { + _acceptInput = false; + sendMessage(_attachedSprite, 0x480B, 0); + } + break; + } + return messageResult; +} + +uint32 KmScene1002::hmHitByBoxingGlove(int messageNum, const MessageParam ¶m, Entity *sender) { + int16 speedUpFrameIndex; + uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); + switch (messageNum) { + case 0x1008: + speedUpFrameIndex = getFrameIndex(kKlaymenSpeedUpHash); + if (_currFrameIndex < speedUpFrameIndex) { + startAnimation(0x35AA8059, speedUpFrameIndex, -1); + _y = 435; + } + messageResult = 0; + break; + case 0x100D: + if (param.asInteger() == 0x1A1A0785) { + playSound(0, 0x40F0A342); + } else if (param.asInteger() == 0x60428026) { + playSound(0, 0x40608A59); + } + break; + } + return messageResult; +} + +KmScene1004::KmScene1004(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y) + : Klaymen(vm, parentScene, x, y) { + + _dataResource.load(0x01900A04); +} + +uint32 KmScene1004::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 0x4818: + startWalkToX(_dataResource.getPoint(param.asInteger()).x, false); + break; + case 0x481E: + GotoState(&KmScene1004::stReadNote); + break; + case 0x4820: + sendMessage(_parentScene, 0x2000, 0); + GotoState(&Klaymen::stContinueClimbLadderUp); + break; + case 0x4821: + sendMessage(_parentScene, 0x2000, 0); + _destY = param.asInteger(); + GotoState(&Klaymen::stStartClimbLadderDown); + break; + case 0x4822: + sendMessage(_parentScene, 0x2000, 0); + _destY = param.asInteger(); + GotoState(&Klaymen::stStartClimbLadderUp); + break; + case 0x4823: + sendMessage(_parentScene, 0x2001, 0); + GotoState(&Klaymen::stClimbLadderHalf); + break; + case 0x4824: + sendMessage(_parentScene, 0x2000, 0); + _destY = _dataResource.getPoint(param.asInteger()).y; + GotoState(&Klaymen::stStartClimbLadderDown); + break; + case 0x4825: + sendMessage(_parentScene, 0x2000, 0); + _destY = _dataResource.getPoint(param.asInteger()).y; + GotoState(&Klaymen::stStartClimbLadderUp); + break; + case 0x4828: + GotoState(&Klaymen::stTurnToBackToUse); + break; + case 0x483F: + startSpecialWalkRight(param.asInteger()); + break; + case 0x4840: + startSpecialWalkLeft(param.asInteger()); + break; + } + return 0; +} + uint32 KmScene1004::hmReadNote(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { diff --git a/engines/neverhood/modules/module1000_sprites.h b/engines/neverhood/modules/module1000_sprites.h index 540a258ddc..564b3cc335 100644 --- a/engines/neverhood/modules/module1000_sprites.h +++ b/engines/neverhood/modules/module1000_sprites.h @@ -230,6 +230,9 @@ protected: void stMoveVenusFlyTrap(); void stContinueMovingVenusFlyTrap(); void evMoveVenusFlyTrapDone(); + void stPressDoorButton(); + void stHitByBoxingGlove(); + void evHitByBoxingGloveDone(); uint32 hmJumpToRing(int messageNum, const MessageParam ¶m, Entity *sender); uint32 hmJumpToRing3(int messageNum, const MessageParam ¶m, Entity *sender); @@ -238,6 +241,8 @@ protected: uint32 hmJumpAndFall(int messageNum, const MessageParam ¶m, Entity *sender); uint32 hmMoveVenusFlyTrap(int messageNum, const MessageParam ¶m, Entity *sender); uint32 hmFirstMoveVenusFlyTrap(int messageNum, const MessageParam ¶m, Entity *sender); + uint32 hmPressDoorButton(int messageNum, const MessageParam ¶m, Entity *sender); + uint32 hmHitByBoxingGlove(int messageNum, const MessageParam ¶m, Entity *sender); void xUpdate(); uint32 xHandleMessage(int messageNum, const MessageParam ¶m); -- cgit v1.2.3 From bee9e1bfd7877035b582d32df52aea1ec9859353 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 3 Nov 2013 04:18:20 +0200 Subject: NEVERHOOD: Remove unused method drawShadowSurface() --- engines/neverhood/screen.h | 1 - 1 file changed, 1 deletion(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/screen.h b/engines/neverhood/screen.h index c778066152..a9b5af02f6 100644 --- a/engines/neverhood/screen.h +++ b/engines/neverhood/screen.h @@ -79,7 +79,6 @@ public: void drawSurface2(const Graphics::Surface *surface, NDrawRect &drawRect, NRect &clipRect, bool transparent, byte version, const Graphics::Surface *shadowSurface = NULL); void drawSurface3(const Graphics::Surface *surface, int16 x, int16 y, NDrawRect &drawRect, NRect &clipRect, bool transparent, byte version); - void drawShadowSurface(const Graphics::Surface *surface, const Graphics::Surface *shadowSurface, int16 x, int16 y, NDrawRect &drawRect, NRect &clipRect); void drawDoubleSurface2(const Graphics::Surface *surface, NDrawRect &drawRect); void drawUnk(const Graphics::Surface *surface, NDrawRect &drawRect, NDrawRect &sysRect, NRect &clipRect, bool transparent, byte version); void drawSurfaceClipRects(const Graphics::Surface *surface, NDrawRect &drawRect, NRect *clipRects, uint clipRectsCount, bool transparent, byte version); -- cgit v1.2.3 From 4b1f426103497f2bf6d1e9fd002dfb14ff1a3c31 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 3 Nov 2013 04:19:17 +0200 Subject: NEVERHOOD: Fix Klaymen's idle blinking animation in the teleporter The wrong animation hash was used in stSitIdleTeleporterBlinkSecond() --- engines/neverhood/klaymen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/klaymen.cpp b/engines/neverhood/klaymen.cpp index a942bcae8c..e1a0d72d50 100644 --- a/engines/neverhood/klaymen.cpp +++ b/engines/neverhood/klaymen.cpp @@ -300,7 +300,7 @@ void Klaymen::stSitIdleTeleporterBlink() { void Klaymen::stSitIdleTeleporterBlinkSecond() { _busyStatus = 0; _acceptInput = true; - startAnimation(0x5C24C018, 0, -1); + startAnimation(0x582EC138, 0, -1); SetUpdateHandler(&Klaymen::upSitIdleTeleporter); SetMessageHandler(&Klaymen::hmLowLevel); SetSpriteUpdate(NULL); -- cgit v1.2.3 From aa947c9474ad83aa9315bc585d1f0b79060fee61 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 7 Nov 2013 12:58:33 +0100 Subject: BUILD: Split configure.engines down to a single file per engine. This is the first part of allowing engines to be added dynamically. They are placed into a folder in engines/ which must contain a file named "configure.engine" to add the engine, which is pulled into the top level configure script automatically. --- engines/neverhood/configure.engine | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 engines/neverhood/configure.engine (limited to 'engines/neverhood') diff --git a/engines/neverhood/configure.engine b/engines/neverhood/configure.engine new file mode 100644 index 0000000000..0767a631f9 --- /dev/null +++ b/engines/neverhood/configure.engine @@ -0,0 +1,3 @@ +# This file is included from the main "configure" script +# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps] +add_engine neverhood "Neverhood" no -- cgit v1.2.3 From d77cf95a185a6c8f201f417d08f246727784f728 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 7 Nov 2013 12:58:34 +0100 Subject: BUILD: Split engines.mk down to a single file per engine. This is the second part of allowing engines to be added dynamically. Each folder in engines/ which must contain a file named "engine.mk" containing the make definitions for that engine. --- engines/neverhood/engine.mk | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 engines/neverhood/engine.mk (limited to 'engines/neverhood') diff --git a/engines/neverhood/engine.mk b/engines/neverhood/engine.mk new file mode 100644 index 0000000000..52b032a5d8 --- /dev/null +++ b/engines/neverhood/engine.mk @@ -0,0 +1,4 @@ +ifdef ENABLE_NEVERHOOD +DEFINES += -DENABLE_NEVERHOOD=$(ENABLE_NEVERHOOD) +MODULES += engines/neverhood +endif -- cgit v1.2.3 From 00c27a28f91cc2bbf512461e69c86be998462728 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 7 Nov 2013 12:58:34 +0100 Subject: BUILD: Split engines/plugins_table header down to a file per engine. This is the third and final commit enabling fully pluggable engines. Now providing an engine folder contains a configure.engine, engine.mk and engine-plugin.h file, it will be picked up automatically by the configure script. --- engines/neverhood/engine-plugin.h | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 engines/neverhood/engine-plugin.h (limited to 'engines/neverhood') diff --git a/engines/neverhood/engine-plugin.h b/engines/neverhood/engine-plugin.h new file mode 100644 index 0000000000..7857703d07 --- /dev/null +++ b/engines/neverhood/engine-plugin.h @@ -0,0 +1,3 @@ +#if PLUGIN_ENABLED_STATIC(NEVERHOOD) +LINK_PLUGIN(NEVERHOOD) +#endif -- cgit v1.2.3 From 1ac01d2333af11d403ef84dd5192abb18814e5b3 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 7 Nov 2013 12:58:34 +0100 Subject: BUILD: Remove need for engine-plugin.h in engines. This is now generated automatically by the configure script from the engine directory names. --- engines/neverhood/engine-plugin.h | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 engines/neverhood/engine-plugin.h (limited to 'engines/neverhood') diff --git a/engines/neverhood/engine-plugin.h b/engines/neverhood/engine-plugin.h deleted file mode 100644 index 7857703d07..0000000000 --- a/engines/neverhood/engine-plugin.h +++ /dev/null @@ -1,3 +0,0 @@ -#if PLUGIN_ENABLED_STATIC(NEVERHOOD) -LINK_PLUGIN(NEVERHOOD) -#endif -- cgit v1.2.3 From ef85456859e466adc8913041e4f31809485c45ab Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 7 Nov 2013 12:58:34 +0100 Subject: BUILD: Remove need for engine.mk in each engine directory. Each engine now only has to provide a single configure.engine file adding the engine into the configure script, which then produces the required other files automatically. --- engines/neverhood/engine.mk | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 engines/neverhood/engine.mk (limited to 'engines/neverhood') diff --git a/engines/neverhood/engine.mk b/engines/neverhood/engine.mk deleted file mode 100644 index 52b032a5d8..0000000000 --- a/engines/neverhood/engine.mk +++ /dev/null @@ -1,4 +0,0 @@ -ifdef ENABLE_NEVERHOOD -DEFINES += -DENABLE_NEVERHOOD=$(ENABLE_NEVERHOOD) -MODULES += engines/neverhood -endif -- cgit v1.2.3 From 29659ba9486df35ede7eb9ee501aa91307924cd1 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sun, 24 Nov 2013 18:32:59 +0100 Subject: NEVERHOOD: Fix spacing errors --- engines/neverhood/detection.cpp | 2 +- engines/neverhood/gamemodule.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/detection.cpp b/engines/neverhood/detection.cpp index efd0699d58..e5486bbcf5 100644 --- a/engines/neverhood/detection.cpp +++ b/engines/neverhood/detection.cpp @@ -196,7 +196,7 @@ bool NeverhoodMetaEngine::hasFeature(MetaEngineFeature f) const { (f == kSupportsListSaves) || (f == kSupportsLoadingDuringStartup) || (f == kSupportsDeleteSave) || - (f == kSavesSupportMetaInfo) || + (f == kSavesSupportMetaInfo) || (f == kSavesSupportThumbnail) || (f == kSavesSupportCreationDate) || (f == kSavesSupportPlayTime); diff --git a/engines/neverhood/gamemodule.cpp b/engines/neverhood/gamemodule.cpp index 50c7c503d3..699df2ae7d 100644 --- a/engines/neverhood/gamemodule.cpp +++ b/engines/neverhood/gamemodule.cpp @@ -216,7 +216,7 @@ void GameModule::initRadioPuzzle() { setGlobalVar(V_RADIO_ROOM_LEFT_DOOR, 1); setGlobalVar(V_RADIO_ROOM_RIGHT_DOOR, 0); setSubVar(VA_IS_PUZZLE_INIT, 0x08C80800, 1); - } + } } void GameModule::initTestTubes1Puzzle() { -- cgit v1.2.3 From 521b1c729cc25941a48ecc56f899247a895b407c Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sat, 7 Dec 2013 01:26:42 +0000 Subject: NEVERHOOD: Add missing getDebugger() for engine API. --- engines/neverhood/neverhood.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/neverhood.h b/engines/neverhood/neverhood.h index 0561aa251e..4d923d1f0e 100644 --- a/engines/neverhood/neverhood.h +++ b/engines/neverhood/neverhood.h @@ -32,6 +32,8 @@ #include "common/system.h" #include "audio/mixer.h" #include "engines/engine.h" +#include "gui/debugger.h" +#include "neverhood/console.h" #include "neverhood/messages.h" namespace Neverhood { @@ -48,7 +50,6 @@ class Screen; class SoundMan; class AudioResourceMan; class StaticData; -class Console; struct NPoint; struct GameState { @@ -90,6 +91,7 @@ public: GameModule *_gameModule; StaticData *_staticData; Console *_console; + GUI::Debugger *getDebugger() { return _console; } SoundMan *_soundMan; AudioResourceMan *_audioResourceMan; -- cgit v1.2.3 From 7ea0386307828af4f4866261eb28b7faad0a6489 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 20 Dec 2013 01:57:03 +0200 Subject: NEVERHOOD: Disable the fanmade Russian Fargus release for now This version has broken resources that corrupt the heap (e.g. the menu header). --- engines/neverhood/detection.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'engines/neverhood') diff --git a/engines/neverhood/detection.cpp b/engines/neverhood/detection.cpp index e5486bbcf5..10f2bc1e00 100644 --- a/engines/neverhood/detection.cpp +++ b/engines/neverhood/detection.cpp @@ -130,6 +130,9 @@ static const NeverhoodGameDescription gameDescriptions[] = { 0, }, +// FIXME: Disabled for now, as it has broken resources that corrupt the heap +// (e.g. the menu header). +#if 0 { // Neverhood Russian version. Fargus { @@ -146,6 +149,7 @@ static const NeverhoodGameDescription gameDescriptions[] = { 0, 0, }, +#endif { AD_TABLE_END_MARKER, 0, 0, 0, 0 } }; -- cgit v1.2.3 From 1dde17b0eed87ca7f09f9a2fdd02d2624a4caf9f Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 20 Dec 2013 01:58:41 +0200 Subject: NEVERHOOD: Allow skipping of the introductory credits with the space key --- engines/neverhood/modules/module1500.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/modules/module1500.cpp b/engines/neverhood/modules/module1500.cpp index 3ce9783b69..ec3b67a6c5 100644 --- a/engines/neverhood/modules/module1500.cpp +++ b/engines/neverhood/modules/module1500.cpp @@ -102,11 +102,11 @@ void Scene1501::update() { Scene::update(); if (_countdown1 != 0) { _countdown1--; - if (_countdown1 == 0) { + if (_countdown1 == 0 || _skip) { _vm->_screen->clear(); leaveScene(0); } - } else if ((_countdown2 != 0 && (--_countdown2 == 0)) || (_countdown2 == 0 && !isSoundPlaying(0))) { + } else if ((_countdown2 != 0 && (--_countdown2 == 0)) || (_countdown2 == 0 && !isSoundPlaying(0)) || _skip) { _countdown1 = 12; _palette->startFadeToBlack(11); } -- cgit v1.2.3 From 8d7b10f7c3463390a928b7aca889a4bfae5dc8ad Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 23 Dec 2013 21:03:35 +0200 Subject: NEVERHOOD: Add names to some message IDs --- engines/neverhood/diskplayerscene.cpp | 4 +- engines/neverhood/gamemodule.cpp | 4 +- engines/neverhood/klaymen.cpp | 94 ++++++++++---------- engines/neverhood/menumodule.cpp | 8 +- engines/neverhood/messages.h | 9 ++ engines/neverhood/modules/module1000.cpp | 30 +++---- engines/neverhood/modules/module1000_sprites.cpp | 106 +++++++++++------------ engines/neverhood/modules/module1100.cpp | 4 +- engines/neverhood/modules/module1100_sprites.cpp | 8 +- engines/neverhood/modules/module1200.cpp | 4 +- engines/neverhood/modules/module1200_sprites.cpp | 34 ++++---- engines/neverhood/modules/module1300.cpp | 58 ++++++------- engines/neverhood/modules/module1300_sprites.cpp | 54 ++++++------ engines/neverhood/modules/module1400.cpp | 20 ++--- engines/neverhood/modules/module1400_sprites.cpp | 36 ++++---- engines/neverhood/modules/module1500.cpp | 2 +- engines/neverhood/modules/module1600.cpp | 8 +- engines/neverhood/modules/module1600_sprites.cpp | 8 +- engines/neverhood/modules/module1700.cpp | 2 +- engines/neverhood/modules/module1700_sprites.cpp | 4 +- engines/neverhood/modules/module1900.cpp | 2 +- engines/neverhood/modules/module1900_sprites.cpp | 4 +- engines/neverhood/modules/module2000.cpp | 2 +- engines/neverhood/modules/module2000_sprites.cpp | 2 +- engines/neverhood/modules/module2100.cpp | 12 +-- engines/neverhood/modules/module2100_sprites.cpp | 16 ++-- engines/neverhood/modules/module2200.cpp | 28 +++--- engines/neverhood/modules/module2200_sprites.cpp | 72 +++++++-------- engines/neverhood/modules/module2400.cpp | 20 ++--- engines/neverhood/modules/module2400_sprites.cpp | 44 +++++----- engines/neverhood/modules/module2500.cpp | 2 +- engines/neverhood/modules/module2500_sprites.cpp | 2 +- engines/neverhood/modules/module2600.cpp | 2 +- engines/neverhood/modules/module2800.cpp | 26 +++--- engines/neverhood/modules/module2800_sprites.cpp | 54 ++++++------ engines/neverhood/modules/module2900.cpp | 2 +- engines/neverhood/modules/module3000.cpp | 6 +- engines/neverhood/modules/module3000_sprites.cpp | 2 +- engines/neverhood/navigationscene.cpp | 4 +- engines/neverhood/scene.cpp | 2 +- engines/neverhood/smackerplayer.cpp | 2 +- engines/neverhood/smackerscene.cpp | 6 +- engines/neverhood/sprite.cpp | 6 +- 43 files changed, 412 insertions(+), 403 deletions(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/diskplayerscene.cpp b/engines/neverhood/diskplayerscene.cpp index ef2b856b2f..80aff269cf 100644 --- a/engines/neverhood/diskplayerscene.cpp +++ b/engines/neverhood/diskplayerscene.cpp @@ -169,7 +169,7 @@ AsDiskplayerSceneKey::AsDiskplayerSceneKey(NeverhoodEngine *vm) uint32 AsDiskplayerSceneKey::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; } @@ -460,7 +460,7 @@ uint32 DiskplayerScene::handleMessage(int messageNum, const MessageParam ¶m, } } break; - case 0x2000: + case NM_ANIMATION_UPDATE: tuneIn(); break; case 0x2001: diff --git a/engines/neverhood/gamemodule.cpp b/engines/neverhood/gamemodule.cpp index 699df2ae7d..54205f23d7 100644 --- a/engines/neverhood/gamemodule.cpp +++ b/engines/neverhood/gamemodule.cpp @@ -122,7 +122,7 @@ void GameModule::handleMouseUp(int16 x, int16 y) { void GameModule::handleSpaceKey() { if (_childObject) { debug(2, "GameModule::handleSpaceKey()"); - sendMessage(_childObject, 0x0009, 0); + sendMessage(_childObject, NM_KEYPRESS_SPACE, 0); } } @@ -150,7 +150,7 @@ void GameModule::handleEscapeKey() { else if (!_prevChildObject && _canRequestMainMenu) _mainMenuRequested = true; else if (_childObject) - sendMessage(_childObject, 0x000C, 0); + sendMessage(_childObject, NM_KEYPRESS_ESC, 0); } void GameModule::initKeySlotsPuzzle() { diff --git a/engines/neverhood/klaymen.cpp b/engines/neverhood/klaymen.cpp index e1a0d72d50..e1be606dab 100644 --- a/engines/neverhood/klaymen.cpp +++ b/engines/neverhood/klaymen.cpp @@ -126,7 +126,7 @@ void Klaymen::stIdlePickEar() { uint32 Klaymen::hmIdlePickEar(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x04DBC02C) { playSound(0, 0x44528AA1); } @@ -152,7 +152,7 @@ void Klaymen::stIdleSpinHead() { uint32 Klaymen::hmIdleSpinHead(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x808A0008) { playSound(0, 0xD948A340); } @@ -179,7 +179,7 @@ void Klaymen::evIdleArmsDone() { uint32 Klaymen::hmIdleArms(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x5A0F0104) { playSound(0, 0x7970A100); } else if (param.asInteger() == 0x9A9A0109) { @@ -205,7 +205,7 @@ void Klaymen::stIdleChest() { uint32 Klaymen::hmIdleChest(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x0D2A0288) { playSound(0, 0xD192A368); } @@ -227,7 +227,7 @@ void Klaymen::stIdleHeadOff() { uint32 Klaymen::hmIdleHeadOff(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0xC006000C) { playSound(0, 0x9D406340); } else if (param.asInteger() == 0x2E4A2940) { @@ -333,7 +333,7 @@ void Klaymen::stPickUpTube() { uint32 Klaymen::hmPickUpTube(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0xC1380080) { sendMessage(_attachedSprite, 0x4806, 0); playSound(0, 0xC8004340); @@ -394,7 +394,7 @@ void Klaymen::stSitInTeleporter() { uint32 Klaymen::hmSitInTeleporter(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x001A2832) { playSound(0, 0xC0E4884C); } @@ -556,7 +556,7 @@ void Klaymen::stIdleBlink() { uint32 Klaymen::hmLowLevelAnimation(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevel(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: gotoNextStateExt(); break; } @@ -575,7 +575,7 @@ void Klaymen::stStandAround() { uint32 Klaymen::hmStartAction(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x271AA210) { playSound(0, 0x4924AAC4); } else if (param.asInteger() == 0x2B22AA81) { @@ -730,7 +730,7 @@ void Klaymen::evSneakingDone() { uint32 Klaymen::hmSneaking(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevel(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x32180101) { playSound(0, 0x4924AAC4); } else if (param.asInteger() == 0x0A2A9098) { @@ -741,7 +741,7 @@ uint32 Klaymen::hmSneaking(int messageNum, const MessageParam ¶m, Entity *se playSound(0, _soundFlag ? 0x50399F64 : 0x0460E2FA); } break; - case 0x3002: + case NM_ANIMATION_STOP: _x = _destX; gotoNextStateExt(); break; @@ -771,7 +771,7 @@ void Klaymen::evStartWalkingDone() { uint32 Klaymen::hmStartWalking(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x32180101) { playSound(0, _soundFlag ? 0x48498E46 : 0x405002D8); } else if (param.asInteger() == 0x0A2A9098) { @@ -802,7 +802,7 @@ void Klaymen::suWalkingFirst() { uint32 Klaymen::hmWalking(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevel(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x32180101) { playSound(0, _soundFlag ? 0x48498E46 : 0x405002D8); } else if (param.asInteger() == 0x0A2A9098) { @@ -893,7 +893,7 @@ void Klaymen::suWalkingTestExit() { uint32 Klaymen::hmLever(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x4AB28209) { sendMessage(_attachedSprite, 0x482A, 0); } else if (param.asInteger() == 0x88001184) { @@ -919,7 +919,7 @@ void Klaymen::stPickUpGeneric() { uint32 Klaymen::hmPickUpObject(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0xC1380080) { sendMessage(_attachedSprite, 0x4806, 0); playSound(0, 0x40208200); @@ -954,7 +954,7 @@ void Klaymen::stPressButton() { uint32 Klaymen::hmPressButton(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x0D01B294) { sendMessage(_attachedSprite, 0x480B, 0); } else if (param.asInteger() == 0x32180101) { @@ -1048,7 +1048,7 @@ void Klaymen::stStartWalkingSmall() { uint32 Klaymen::hmWalkingSmall(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevel(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x32180101) playSound(0, 0x4924AAC4); else if (param.asInteger() == 0x0A2A9098) @@ -1105,7 +1105,7 @@ void Klaymen::stWalkToFrontNoStepSmall() { uint32 Klaymen::hmWalkFrontBackSmall(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x80C110B5) sendMessage(_parentScene, 0x482A, 0); else if (param.asInteger() == 0x110010D1) @@ -1187,10 +1187,10 @@ void Klaymen::stReleaseCord() { uint32 Klaymen::hmPullReleaseCord(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x4AB28209) { sendMessage(_attachedSprite, 0x482A, 0); - sendMessage(_attachedSprite, 0x480F, 0); + sendMessage(_attachedSprite, NM_LEVER_DOWN, 0); } else if (param.asInteger() == 0x88001184) { sendMessage(_attachedSprite, 0x482B, 0); } @@ -1213,7 +1213,7 @@ void Klaymen::stUseTube() { uint32 Klaymen::hmUseTube(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x02B20220) playSound(0, 0xC5408620); else if (param.asInteger() == 0x0A720138) @@ -1369,14 +1369,14 @@ void Klaymen::suLargeStep() { uint32 Klaymen::hmLargeStep(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevel(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x32180101) { playSound(0, 0x4924AAC4); } else if (param.asInteger() == 0x0A2A9098) { playSound(0, 0x0A2AA8E0); } break; - case 0x3002: + case NM_ANIMATION_STOP: _x = _destX; gotoNextStateExt(); break; @@ -1414,7 +1414,7 @@ void Klaymen::stTurnToUseHalf() { uint32 Klaymen::hmTurnToUse(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x32180101) { playSound(0, 0x4924AAC4); } else if (param.asInteger() == 0x0A2A9098) { @@ -1460,7 +1460,7 @@ uint32 Klaymen::hmPeekWall(int messageNum, const MessageParam ¶m, Entity *se if (_currFrameIndex < speedUpFrameIndex) startAnimation(0xAC20C012, speedUpFrameIndex, -1); return 0; - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x32180101) { playSound(0, 0x405002D8); } else if (param.asInteger() == 0x0A2A9098) { @@ -1479,7 +1479,7 @@ void Klaymen::suUpdateDestX() { void Klaymen::stReleaseRing() { _busyStatus = 1; _acceptInput = false; - sendMessage(_attachedSprite, 0x4807, 0); + sendMessage(_attachedSprite, NM_LEVER_UP, 0); _attachedSprite = NULL; startAnimation(0xB869A4B9, 0, -1); SetUpdateHandler(&Klaymen::update); @@ -1559,7 +1559,7 @@ void Klaymen::stClimbLadderHalf() { uint32 Klaymen::hmClimbLadderHalf(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x489B025C) { playSound(0, 0x52C4C2D7); } else if (param.asInteger() == 0x400A0E64) { @@ -1577,7 +1577,7 @@ uint32 Klaymen::hmClimbLadderHalf(int messageNum, const MessageParam ¶m, Ent uint32 Klaymen::hmClimbLadderUpDown(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevel(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x01084280) { _acceptInput = true; } else if (param.asInteger() == 0x489B025C) { @@ -1639,7 +1639,7 @@ void Klaymen::stWalkToFrontNoStep() { uint32 Klaymen::hmWalkToFront(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x80C110B5) { sendMessage(_parentScene, 0x482A, 0); } else if (param.asInteger() == 0x110010D1) { @@ -1699,7 +1699,7 @@ void Klaymen::stLandOnFeet() { uint32 Klaymen::hmLandOnFeet(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x320AC306) { playSound(0, 0x5860C640); } @@ -1722,7 +1722,7 @@ void Klaymen::stTurnToBackToUse() { uint32 Klaymen::hmTurnToBackToUse(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0xC61A0119) { playSound(0, 0x402338C2); } else if (param.asInteger() == 0x32180101) { @@ -1783,12 +1783,12 @@ void Klaymen::stMoveObjectSkipTurnFaceObject() { } void Klaymen::evMoveObjectTurnDone() { - sendMessage(_attachedSprite, 0x4807, 0); + sendMessage(_attachedSprite, NM_LEVER_UP, 0); } uint32 Klaymen::hmMoveObjectTurn(int messageNum, const MessageParam ¶m, Entity *sender) { switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x01084280) { sendMessage(_attachedSprite, 0x480B, _doDeltaX ? 1 : 0); } else if (param.asInteger() == 0x02421405) { @@ -1853,7 +1853,7 @@ void Klaymen::stUseLever() { // Exactly the same code as sub420DA0 which was removed void Klaymen::stPullLeverDown() { startAnimation(0x0D318140, 0, -1); - sendMessage(_attachedSprite, 0x480F, 0); + sendMessage(_attachedSprite, NM_LEVER_DOWN, 0); NextState(&Klaymen::stHoldLeverDown); } @@ -1871,7 +1871,7 @@ void Klaymen::stUseLeverRelease() { SetUpdateHandler(&Klaymen::update); SetMessageHandler(&Klaymen::hmLever); SetSpriteUpdate(&Klaymen::suUpdateDestX); - sendMessage(_attachedSprite, 0x4807, 0); + sendMessage(_attachedSprite, NM_LEVER_UP, 0); NextState(&Klaymen::stPullLeverDown); _acceptInput = false; } @@ -1883,7 +1883,7 @@ void Klaymen::stReleaseLever() { SetUpdateHandler(&Klaymen::update); SetMessageHandler(&Klaymen::hmLever); SetSpriteUpdate(&Klaymen::suUpdateDestX); - sendMessage(_attachedSprite, 0x4807, 0); + sendMessage(_attachedSprite, NM_LEVER_UP, 0); NextState(&Klaymen::stLetGoOfLever); _acceptInput = false; _isLeverDown = false; @@ -1929,7 +1929,7 @@ void Klaymen::stInsertDisk() { uint32 Klaymen::hmInsertDisk(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Klaymen::hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (_tapesToInsert == 0 && param.asInteger() == 0x06040580) { nextAnimationByHash(0xD8C8D100, calcHash("GoToStartLoop/Finish"), 0); } else if (_tapesToInsert != 0 && param.asInteger() == calcHash("GoToStartLoop/Finish")) { @@ -2033,7 +2033,7 @@ void Klaymen::suJumpToGrab() { uint32 Klaymen::hmJumpToGrab(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevel(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x168050A0) sendMessage(_attachedSprite, 0x4806, 0); else if (param.asInteger() == 0x320AC306) @@ -2059,7 +2059,7 @@ void Klaymen::stFinishGrow() { uint32 Klaymen::hmFinishGrow(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x040C4C01) playSound(0, 0x01E11140); break; @@ -2103,7 +2103,7 @@ void Klaymen::stJumpToGrabRelease() { uint32 Klaymen::hmJumpToGrabRelease(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x320AC306) playSound(0, 0x5860C640); break; @@ -2152,7 +2152,7 @@ void Klaymen::teleporterDisappear(uint32 fileHash) { uint32 Klaymen::hmTeleporterAppearDisappear(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x4E0A2C24) { playSound(0, 0x85B10BB8); } else if (param.asInteger() == 0x4E6A0CA0) { @@ -2185,7 +2185,7 @@ uint32 Klaymen::hmDrinkPotion(int messageNum, const MessageParam ¶m, Entity } else _potionFlag2 = true; break; - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x0002418E) sendMessage(_parentScene, 0x2000, 0); else if (param.asInteger() == 0x924090C2) { @@ -2230,7 +2230,7 @@ uint32 Klaymen::hmDrinkPotion(int messageNum, const MessageParam ¶m, Entity uint32 Klaymen::hmGrow(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x32180101) playSound(0, 0x405002D8); else if (param.asInteger() == 0x0A2A9098) @@ -2283,7 +2283,7 @@ void Klaymen::stDrinkPotion() { uint32 Klaymen::hmInsertKey(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Klaymen::hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (_keysToInsert == 0 && param.asInteger() == 0x06040580) { nextAnimationByHash(0xDC409440, 0x46431401, 0); } else if (_keysToInsert != 0 && param.asInteger() == 0x46431401) { @@ -2344,7 +2344,7 @@ void Klaymen::stInsertKey() { uint32 Klaymen::hmPeekWallReturn(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == calcHash("PopBalloon")) { sendMessage(_parentScene, 0x2000, 0); } else if (param.asInteger() == 0x02B20220) { @@ -2533,7 +2533,7 @@ void Klaymen::upMoveObject() { uint32 Klaymen::hmMoveObject(int messageNum, const MessageParam ¶m, Entity *sender) { switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x01084280) { playSound(0, 0x405002D8); sendMessage(_attachedSprite, 0x480B, 0); @@ -2607,7 +2607,7 @@ void Klaymen::stInteractLever() { void Klaymen::stPullLever() { startAnimation(0x0D318140, 0, -1); NextState(&Klaymen::stLookLeverDown); - sendMessage(_attachedSprite, 0x480F, 0); + sendMessage(_attachedSprite, NM_LEVER_DOWN, 0); } void Klaymen::stLookLeverDown() { diff --git a/engines/neverhood/menumodule.cpp b/engines/neverhood/menumodule.cpp index 6b0635598f..925b6aaa4a 100644 --- a/engines/neverhood/menumodule.cpp +++ b/engines/neverhood/menumodule.cpp @@ -374,7 +374,7 @@ MainMenu::MainMenu(NeverhoodEngine *vm, Module *parentModule) uint32 MainMenu::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2000: + case NM_ANIMATION_UPDATE: leaveScene(param.asInteger()); break; } @@ -448,7 +448,7 @@ void CreditsScene::update() { uint32 CreditsScene::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0009: + case NM_KEYPRESS_SPACE: leaveScene(0); break; case 0x000B: @@ -997,7 +997,7 @@ uint32 GameStateMenu::handleMessage(int messageNum, const MessageParam ¶m, E setCurrWidget(_textEditWidget); } break; - case 0x2000: + case NM_ANIMATION_UPDATE: // Handle menu button click switch (param.asInteger()) { case 0: @@ -1166,7 +1166,7 @@ QueryOverwriteMenu::QueryOverwriteMenu(NeverhoodEngine *vm, Module *parentModule uint32 QueryOverwriteMenu::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2000: + case NM_ANIMATION_UPDATE: // Handle menu button click leaveScene(param.asInteger()); break; diff --git a/engines/neverhood/messages.h b/engines/neverhood/messages.h index 78c66868d5..8dd98801e4 100644 --- a/engines/neverhood/messages.h +++ b/engines/neverhood/messages.h @@ -26,6 +26,15 @@ namespace Neverhood { enum NeverhoodMessage { + NM_KEYPRESS_SPACE = 0x0009, + NM_KEYPRESS_ESC = 0x000C, + NM_ANIMATION_START = 0x100D, + NM_ANIMATION_UPDATE = 0x2000, + NM_ANIMATION_STOP = 0x3002, + NM_LEVER_UP = 0x4807, + NM_DOOR_OPEN = 0x4808, + NM_DOOR_CLOSE = 0x4809, + NM_LEVER_DOWN = 0x480F, NM_KLAYMEN_PICKUP = 0x4812, NM_KLAYMEN_PRESS_BUTTON = 0x4816, NM_KLAYMEN_INSERT_DISK = 0x481A, diff --git a/engines/neverhood/modules/module1000.cpp b/engines/neverhood/modules/module1000.cpp index 534fb2ec2f..15426a5de3 100644 --- a/engines/neverhood/modules/module1000.cpp +++ b/engines/neverhood/modules/module1000.cpp @@ -192,7 +192,7 @@ uint32 Scene1001::handleMessage(int messageNum, const MessageParam ¶m, Entit uint32 messageResult = 0; Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x00342624) { sendEntityMessage(_klaymen, 0x1014, _asLever); setMessageList2(0x004B4910); @@ -220,7 +220,7 @@ uint32 Scene1001::handleMessage(int messageNum, const MessageParam ¶m, Entit case 0x480B: sendMessage(_asWindow, 0x2001, 0); break; - case 0x480F: + case NM_LEVER_DOWN: sendMessage(_asHammer, 0x2000, 0); break; } @@ -347,7 +347,7 @@ uint32 Scene1002::handleMessage(int messageNum, const MessageParam ¶m, Entit uint32 messageResult = 0; Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0xE6EE60E1) { if (getGlobalVar(V_FLYTRAP_RING_DOOR)) setMessageList(0x004B4428); @@ -381,7 +381,7 @@ uint32 Scene1002::handleMessage(int messageNum, const MessageParam ¶m, Entit case 0x1024: sendMessage(_parentModule, 0x1024, param.asInteger()); break; - case 0x2000: + case NM_ANIMATION_UPDATE: if (_isClimbingLadder) { setMessageList2(0x004B43D0); } else { @@ -416,8 +416,8 @@ uint32 Scene1002::handleMessage(int messageNum, const MessageParam ¶m, Entit } else if (sender == _asRing3) { setGlobalVar(V_RADIO_ENABLED, 0); playSound(1); - sendMessage(_asDoor, 0x4808, 0); - sendMessage(_asOutsideDoorBackground, 0x4808, 0); + sendMessage(_asDoor, NM_DOOR_OPEN, 0); + sendMessage(_asOutsideDoorBackground, NM_DOOR_OPEN, 0); } else if (sender == _asRing4) { setGlobalVar(V_RADIO_ENABLED, 0); playSound(0, 0xE0558848); @@ -426,25 +426,25 @@ uint32 Scene1002::handleMessage(int messageNum, const MessageParam ¶m, Entit playSound(0, 0x44014282); } break; - case 0x4807: + case NM_LEVER_UP: if (sender == _asRing3) { playSound(2); - sendMessage(_asDoor, 0x4809, 0); - sendMessage(_asOutsideDoorBackground, 0x4809, 0); + sendMessage(_asDoor, NM_DOOR_CLOSE, 0); + sendMessage(_asOutsideDoorBackground, NM_DOOR_CLOSE, 0); } else if (sender == _asVenusFlyTrap) { if (getGlobalVar(V_FLYTRAP_RING_DOOR)) { - sendMessage(_asRing3, 0x4807, 0); + sendMessage(_asRing3, NM_LEVER_UP, 0); } } break; case 0x480B: sendEntityMessage(_klaymen, 0x1014, _asDoorSpy); break; - case 0x480F: + case NM_LEVER_DOWN: setGlobalVar(V_RADIO_ENABLED, 0); playSound(1); - sendMessage(_asDoor, 0x4808, 0); - sendMessage(_asOutsideDoorBackground, 0x4808, 0); + sendMessage(_asDoor, NM_DOOR_OPEN, 0); + sendMessage(_asOutsideDoorBackground, NM_DOOR_OPEN, 0); break; case 0x8000: setSpriteSurfacePriority(_ssCeiling, 995); @@ -521,13 +521,13 @@ uint32 Scene1004::handleMessage(int messageNum, const MessageParam ¶m, Entit uint32 messageResult = 0; Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x926500A1) { setMessageList(0x004B7C20); messageResult = 1; } break; - case 0x2000: + case NM_ANIMATION_UPDATE: loadDataResource(0x01900A04); break; case 0x2001: diff --git a/engines/neverhood/modules/module1000_sprites.cpp b/engines/neverhood/modules/module1000_sprites.cpp index 573474de02..4238040fbe 100644 --- a/engines/neverhood/modules/module1000_sprites.cpp +++ b/engines/neverhood/modules/module1000_sprites.cpp @@ -39,10 +39,10 @@ AsScene1001Door::AsScene1001Door(NeverhoodEngine *vm) uint32 AsScene1001Door::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2000: + case NM_ANIMATION_UPDATE: hammerHitsDoor(); break; - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; } @@ -118,13 +118,13 @@ AsScene1001Hammer::AsScene1001Hammer(NeverhoodEngine *vm, Sprite *asDoor) uint32 AsScene1001Hammer::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x00352100) sendMessage(_asDoor, 0x2000, 0); else if (param.asInteger() == 0x0A1A0109) playSound(0, 0x66410886); break; - case 0x2000: + case NM_ANIMATION_UPDATE: startAnimation(0x022C90D4, 1, -1); playSound(0, 0xE741020A); _newStickFrameIndex = STICK_LAST_FRAME; @@ -148,14 +148,14 @@ AsScene1001Window::AsScene1001Window(NeverhoodEngine *vm) uint32 AsScene1001Window::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x0E0A1410) playSound(0, 0x60803F10); break; case 0x2001: startAnimation(0xC68C2299, 0, -1); break; - case 0x3002: + case NM_ANIMATION_STOP: SetMessageHandler(NULL); setGlobalVar(V_WINDOW_OPEN, 1); setVisible(false); @@ -180,9 +180,9 @@ AsScene1001Lever::AsScene1001Lever(NeverhoodEngine *vm, Scene *parentScene, int1 uint32 AsScene1001Lever::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x00C0C444) - sendMessage(_parentScene, 0x480F, 0); + sendMessage(_parentScene, NM_LEVER_DOWN, 0); else if (param.asInteger() == 0xC41A02C0) playSound(0, 0x40581882); break; @@ -190,11 +190,11 @@ uint32 AsScene1001Lever::handleMessage(int messageNum, const MessageParam ¶m sendMessage(_parentScene, 0x4826, 0); messageResult = 1; break; - case 0x3002: + case NM_ANIMATION_STOP: startAnimation(0x04A98C36, 0, -1); _newStickFrameIndex = 0; break; - case 0x480F: + case NM_LEVER_DOWN: startAnimation(0x04A98C36, 0, -1); break; case 0x482A: @@ -278,9 +278,9 @@ uint32 AsScene1002Ring::hmRingIdle(int messageNum, const MessageParam ¶m, En SetMessageHandler(&AsScene1002Ring::hmRingPulled1); startAnimation(_isSpecial ? 0x87502558 : 0x80DD4010, 0, -1); break; - case 0x480F: + case NM_LEVER_DOWN: setDoDeltaX(((Sprite*)sender)->isDoDeltaX() ? 1 : 0); - sendMessage(_parentScene, 0x480F, 0); + sendMessage(_parentScene, NM_LEVER_DOWN, 0); SetMessageHandler(&AsScene1002Ring::hmRingPulled2); startAnimation(0x861A2020, 0, -1); break; @@ -297,12 +297,12 @@ uint32 AsScene1002Ring::hmRingIdle(int messageNum, const MessageParam ¶m, En uint32 AsScene1002Ring::hmRingPulled1(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: startAnimation(_isSpecial ? 0x78D0A812 : 0xB85D2A10, 0, -1); SetMessageHandler(&AsScene1002Ring::hmRingHangingLow); break; - case 0x4807: - sendMessage(_parentScene, 0x4807, 0); + case NM_LEVER_UP: + sendMessage(_parentScene, NM_LEVER_UP, 0); setDoDeltaX(_vm->_rnd->getRandomNumber(1)); startAnimation(0x8258A030, 0, -1); SetMessageHandler(&AsScene1002Ring::hmRingReleased); @@ -320,7 +320,7 @@ uint32 AsScene1002Ring::hmRingPulled1(int messageNum, const MessageParam ¶m, uint32 AsScene1002Ring::hmRingPulled2(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: startAnimation(0x04103090, 0, -1); SetMessageHandler(&AsScene1002Ring::hmRingHangingLow); break; @@ -337,8 +337,8 @@ uint32 AsScene1002Ring::hmRingPulled2(int messageNum, const MessageParam ¶m, uint32 AsScene1002Ring::hmRingHangingLow(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x4807: - sendMessage(_parentScene, 0x4807, 0); + case NM_LEVER_UP: + sendMessage(_parentScene, NM_LEVER_UP, 0); setDoDeltaX(_vm->_rnd->getRandomNumber(1)); startAnimation(0x8258A030, 0, -1); SetMessageHandler(&AsScene1002Ring::hmRingReleased); @@ -356,11 +356,11 @@ uint32 AsScene1002Ring::hmRingHangingLow(int messageNum, const MessageParam &par uint32 AsScene1002Ring::hmRingReleased(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmRingIdle(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x05410F72) playSound(0, 0x21EE40A9); break; - case 0x3002: + case NM_ANIMATION_STOP: startAnimation(0xA85C4011, 0, -1); break; case 0x482A: @@ -391,11 +391,11 @@ void AsScene1002Door::update() { uint32 AsScene1002Door::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x4808: + case NM_DOOR_OPEN: setGlobalVar(V_FLYTRAP_RING_DOOR, 1); SetSpriteUpdate(&AsScene1002Door::suOpenDoor); break; - case 0x4809: + case NM_DOOR_CLOSE: setGlobalVar(V_FLYTRAP_RING_DOOR, 0); SetSpriteUpdate(&AsScene1002Door::suCloseDoor); break; @@ -443,7 +443,7 @@ uint32 AsScene1002BoxingGloveHitEffect::handleMessage(int messageNum, const Mess startAnimation(0x0422255A, 0, -1); setVisible(true); break; - case 0x3002: + case NM_ANIMATION_STOP: stopAnimation(); setVisible(false); break; @@ -467,7 +467,7 @@ AsScene1002DoorSpy::AsScene1002DoorSpy(NeverhoodEngine *vm, NRect &clipRect, Sce uint32 AsScene1002DoorSpy::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0xA61CA1C2) sendMessage(_asBoxingGloveHitEffect, 0x2004, 0); else if (param.asInteger() == 0x14CE0620) @@ -483,7 +483,7 @@ uint32 AsScene1002DoorSpy::handleMessage(int messageNum, const MessageParam &par uint32 AsScene1002DoorSpy::hmDoorSpyAnimation(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; } @@ -607,7 +607,7 @@ void AsScene1002VenusFlyTrap::upIdle() { uint32 AsScene1002VenusFlyTrap::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x000890C4) playSound(0, 0xC21190D8); else if (param.asInteger() == 0x522200A0) @@ -673,7 +673,7 @@ uint32 AsScene1002VenusFlyTrap::handleMessage(int messageNum, const MessageParam uint32 AsScene1002VenusFlyTrap::hmAnimationSimple(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; } @@ -683,7 +683,7 @@ uint32 AsScene1002VenusFlyTrap::hmAnimationSimple(int messageNum, const MessageP uint32 AsScene1002VenusFlyTrap::hmAnimationExt(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x000890C4) playSound(0, 0xC21190D8); else if (param.asInteger() == 0x41881801) { @@ -698,7 +698,7 @@ uint32 AsScene1002VenusFlyTrap::hmAnimationExt(int messageNum, const MessagePara } else if (param.asInteger() == 0x522200A0) playSound(0, 0x931080C8); break; - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; case 0x482A: @@ -727,7 +727,7 @@ void AsScene1002VenusFlyTrap::stWalk() { } void AsScene1002VenusFlyTrap::stRelease() { - sendMessage(_parentScene, 0x4807, 0); + sendMessage(_parentScene, NM_LEVER_UP, 0); startAnimation(0x82292851, 0, -1); SetUpdateHandler(&AsScene1002VenusFlyTrap::update); SetMessageHandler(&AsScene1002VenusFlyTrap::hmAnimationSimple); @@ -833,11 +833,11 @@ void AsScene1002OutsideDoorBackground::update() { uint32 AsScene1002OutsideDoorBackground::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageResult) { - case 0x4808: + case NM_DOOR_OPEN: _isDoorClosed = false; _countdown = 2; break; - case 0x4809: + case NM_DOOR_CLOSE: _isDoorClosed = true; _countdown = 2; break; @@ -848,7 +848,7 @@ uint32 AsScene1002OutsideDoorBackground::handleMessage(int messageNum, const Mes uint32 AsScene1002OutsideDoorBackground::hmAnimation(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = handleMessage(messageNum, param, sender); switch (messageResult) { - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; } @@ -930,7 +930,7 @@ void AsScene1002KlaymenPeekHand::update() { uint32 AsScene1002KlaymenPeekHand::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x4AB28209) { sendMessage(_parentScene, 0x1022, 1200); _isClipRectSaved = true; @@ -960,7 +960,7 @@ AsScene1004TrashCan::AsScene1004TrashCan(NeverhoodEngine *vm) uint32 AsScene1004TrashCan::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x225A8587) playSound(0, 0x109AFC4C); break; @@ -968,7 +968,7 @@ uint32 AsScene1004TrashCan::handleMessage(int messageNum, const MessageParam &pa startAnimation(0xEB312C11, 0, -1); setVisible(true); break; - case 0x3002: + case NM_ANIMATION_STOP: stopAnimation(); setVisible(false); break; @@ -1001,10 +1001,10 @@ uint32 KmScene1001::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x480D: GotoState(&KmScene1001::stPullHammerLever); break; - case 0x4812: + case NM_KLAYMEN_PICKUP: GotoState(&Klaymen::stPickUpGeneric); break; - case 0x4816: + case NM_KLAYMEN_PRESS_BUTTON: if (param.asInteger() == 1) GotoState(&Klaymen::stPressButton); else if (param.asInteger() == 2) @@ -1075,7 +1075,7 @@ void KmScene1001::stSleeping() { uint32 KmScene1001::hmSleeping(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevel(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x03060012) { playSound(0, 0xC0238244); } @@ -1098,9 +1098,9 @@ void KmScene1001::stPullHammerLever() { uint32 KmScene1001::hmPullHammerLever(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Klaymen::hmLever(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x4AB28209) - sendMessage(_attachedSprite, 0x480F, 0); + sendMessage(_attachedSprite, NM_LEVER_DOWN, 0); break; } return messageResult; @@ -1170,7 +1170,7 @@ uint32 KmScene1002::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x480D: GotoState(&KmScene1002::stJumpToRingVenusFlyTrap); break; - case 0x4816: + case NM_KLAYMEN_PRESS_BUTTON: if (param.asInteger() == 0) GotoState(&KmScene1002::stPressDoorButton); break; @@ -1233,7 +1233,7 @@ void KmScene1002::setupJumpToRing() { uint32 KmScene1002::hmJumpToRing(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x168050A0) { sendMessage(_attachedSprite, 0x4806, 0); _acceptInput = true; @@ -1290,7 +1290,7 @@ void KmScene1002::stJumpToRing3() { uint32 KmScene1002::hmJumpToRing3(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x168050A0) { sendMessage(_attachedSprite, 0x4806, 0); } else if (param.asInteger() == 0x320AC306) { @@ -1346,9 +1346,9 @@ void KmScene1002::stJumpToRingVenusFlyTrap() { uint32 KmScene1002::hmJumpToRingVenusFlyTrap(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x168050A0) { - sendMessage(_attachedSprite, 0x480F, 0); + sendMessage(_attachedSprite, NM_LEVER_DOWN, 0); } else if (param.asInteger() == 0x586B0300) { sendMessage(_otherSprite, 0x480E, 1); } else if (param.asInteger() == 0x4AB28209) { @@ -1377,7 +1377,7 @@ void KmScene1002::stJumpAndFall() { void KmScene1002::stDropFromRing() { if (_attachedSprite) { _x = _attachedSprite->getX(); - sendMessage(_attachedSprite, 0x4807, 0); + sendMessage(_attachedSprite, NM_LEVER_UP, 0); _attachedSprite = NULL; } _busyStatus = 2; @@ -1392,7 +1392,7 @@ void KmScene1002::stDropFromRing() { uint32 KmScene1002::hmJumpAndFall(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevel(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x1307050A) { playSound(0, 0x40428A09); } @@ -1431,7 +1431,7 @@ void KmScene1002::evMoveVenusFlyTrapDone() { uint32 KmScene1002::hmMoveVenusFlyTrap(int messageNum, const MessageParam ¶m, Entity *sender) { switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x01084280) { sendMessage(_attachedSprite, 0x480B, (uint32)_doDeltaX); } else if (param.asInteger() == 0x02421405) { @@ -1461,7 +1461,7 @@ uint32 KmScene1002::hmMoveVenusFlyTrap(int messageNum, const MessageParam ¶m uint32 KmScene1002::hmFirstMoveVenusFlyTrap(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x4AB28209) { sendMessage(_attachedSprite, 0x482A, 0); } else if (param.asInteger() == 0x88001184) { @@ -1503,7 +1503,7 @@ void KmScene1002::evHitByBoxingGloveDone() { uint32 KmScene1002::hmPressDoorButton(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x942D2081) { _acceptInput = false; sendMessage(_attachedSprite, 0x2003, 0); @@ -1530,7 +1530,7 @@ uint32 KmScene1002::hmHitByBoxingGlove(int messageNum, const MessageParam ¶m } messageResult = 0; break; - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x1A1A0785) { playSound(0, 0x40F0A342); } else if (param.asInteger() == 0x60428026) { @@ -1610,7 +1610,7 @@ uint32 KmScene1004::xHandleMessage(int messageNum, const MessageParam ¶m) { uint32 KmScene1004::hmReadNote(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x04684052) { _acceptInput = true; sendMessage(_parentScene, 0x2002, 0); diff --git a/engines/neverhood/modules/module1100.cpp b/engines/neverhood/modules/module1100.cpp index af2df2e742..693f64d6ba 100644 --- a/engines/neverhood/modules/module1100.cpp +++ b/engines/neverhood/modules/module1100.cpp @@ -309,7 +309,7 @@ uint32 Scene1105::handleMessage(int messageNum, const MessageParam ¶m, Entit _leaveResult = 1; SetUpdateHandler(&Scene1105::upClosePanel); break; - case 0x4807: + case NM_LEVER_UP: if (sender == _ssActionButton) { if (getSubVar(VA_GOOD_DICE_NUMBERS, 0) == getSubVar(VA_CURR_DICE_NUMBERS, 0) && getSubVar(VA_GOOD_DICE_NUMBERS, 1) == getSubVar(VA_CURR_DICE_NUMBERS, 1) && @@ -513,7 +513,7 @@ Scene1109::Scene1109(NeverhoodEngine *vm, Module *parentModule, int which) uint32 Scene1109::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2000: + case NM_ANIMATION_UPDATE: if (param.asInteger()) { setRectList(0x004B63A8); _klaymen->setKlaymenIdleTable3(); diff --git a/engines/neverhood/modules/module1100_sprites.cpp b/engines/neverhood/modules/module1100_sprites.cpp index 51e0bb3f49..0741f58a37 100644 --- a/engines/neverhood/modules/module1100_sprites.cpp +++ b/engines/neverhood/modules/module1100_sprites.cpp @@ -48,7 +48,7 @@ SsScene1105Button::SsScene1105Button(NeverhoodEngine *vm, Scene *parentScene, ui void SsScene1105Button::update() { if (_countdown != 0 && (--_countdown == 0)) { - sendMessage(_parentScene, 0x4807, 0); + sendMessage(_parentScene, NM_LEVER_UP, 0); setVisible(false); } } @@ -96,7 +96,7 @@ SsScene1105SymbolDie::SsScene1105SymbolDie(NeverhoodEngine *vm, uint dieIndex, i uint32 SsScene1105SymbolDie::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2000: + case NM_ANIMATION_UPDATE: loadSymbolSprite(); break; } @@ -142,7 +142,7 @@ uint32 AsScene1105TeddyBear::handleMessage(int messageNum, const MessageParam &p playSound(1); } break; - case 0x3002: + case NM_ANIMATION_STOP: sendMessage(_parentScene, 0x2003, 0); stopAnimation(); break; @@ -206,7 +206,7 @@ KmScene1109::KmScene1109(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 uint32 KmScene1109::xHandleMessage(int messageNum, const MessageParam ¶m) { uint32 messageResult = 0; switch (messageNum) { - case 0x2000: + case NM_ANIMATION_UPDATE: _isSittingInTeleporter = param.asInteger() != 0; messageResult = 1; break; diff --git a/engines/neverhood/modules/module1200.cpp b/engines/neverhood/modules/module1200.cpp index 975545091d..eaa48c6ec5 100644 --- a/engines/neverhood/modules/module1200.cpp +++ b/engines/neverhood/modules/module1200.cpp @@ -296,7 +296,7 @@ void Scene1201::update() { uint32 Scene1201::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x07053000) { _creatureExploded = true; sendMessage(_asCreature, 0x2004, 0); @@ -431,7 +431,7 @@ uint32 Scene1202::handleMessage(int messageNum, const MessageParam ¶m, Entit if ((param.asPoint().x <= 20 || param.asPoint().x >= 620) && !_isPuzzleSolved) leaveScene(0); break; - case 0x2000: + case NM_ANIMATION_UPDATE: _clickedIndex = (int)param.asInteger(); break; case 0x2002: diff --git a/engines/neverhood/modules/module1200_sprites.cpp b/engines/neverhood/modules/module1200_sprites.cpp index da38924d9a..3914f0b622 100644 --- a/engines/neverhood/modules/module1200_sprites.cpp +++ b/engines/neverhood/modules/module1200_sprites.cpp @@ -101,7 +101,7 @@ AsScene1201TntManRope::AsScene1201TntManRope(NeverhoodEngine *vm, bool isDummyHa uint32 AsScene1201TntManRope::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x02060018) playSound(0, 0x47900E06); break; @@ -141,7 +141,7 @@ void AsScene1201RightDoor::update() { uint32 AsScene1201RightDoor::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; case 0x4829: @@ -190,7 +190,7 @@ uint32 AsScene1201KlaymenHead::handleMessage(int messageNum, const MessageParam startAnimation(0xA060C599, 0, -1); setVisible(true); break; - case 0x3002: + case NM_ANIMATION_STOP: stopAnimation(); setVisible(false); gotoNextState(); @@ -223,7 +223,7 @@ AsScene1201TntMan::~AsScene1201TntMan() { uint32 AsScene1201TntMan::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x092870C0) sendMessage(_asTntManRope, 0x2006, 0); else if (param.asInteger() == 0x11CA0144) @@ -247,7 +247,7 @@ uint32 AsScene1201TntMan::handleMessage(int messageNum, const MessageParam ¶ uint32 AsScene1201TntMan::hmComingDown(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = AsScene1201TntMan::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; } @@ -353,7 +353,7 @@ void AsScene1201Match::update() { uint32 AsScene1201Match::hmOnDoorFrameAboutToMove(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x86668011) playSound(0); break; @@ -364,7 +364,7 @@ uint32 AsScene1201Match::hmOnDoorFrameAboutToMove(int messageNum, const MessageP uint32 AsScene1201Match::hmOnDoorFrameMoving(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmOnDoorFrameAboutToMove(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; } @@ -459,7 +459,7 @@ void AsScene1201Creature::update() { uint32 AsScene1201Creature::hmWaiting(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x02060018) playSound(0, 0xCD298116); break; @@ -476,7 +476,7 @@ uint32 AsScene1201Creature::hmWaiting(int messageNum, const MessageParam ¶m, uint32 AsScene1201Creature::hmPincerSnap(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmWaiting(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; } @@ -486,14 +486,14 @@ uint32 AsScene1201Creature::hmPincerSnap(int messageNum, const MessageParam &par uint32 AsScene1201Creature::hmPincerSnapKlaymen(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x02060018) { playSound(0, 0xCD298116); sendMessage(_parentScene, 0x4814, 0); sendMessage(_klaymen, 0x4814, 0); } break; - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; } @@ -556,7 +556,7 @@ AsScene1201LeftDoor::AsScene1201LeftDoor(NeverhoodEngine *vm, Sprite *klaymen) uint32 AsScene1201LeftDoor::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x4809: + case NM_DOOR_CLOSE: stCloseDoor(); break; } @@ -619,7 +619,7 @@ uint32 AsScene1202TntItem::hmShowIdle(int messageNum, const MessageParam ¶m, uint32 AsScene1202TntItem::hmChangePosition(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; } @@ -677,7 +677,7 @@ uint32 KmScene1201::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x480A: GotoState(&Klaymen::stMoveObject); break; - case 0x4812: + case NM_KLAYMEN_PICKUP: GotoState(&Klaymen::stPickUpGeneric); break; case 0x4813: @@ -689,7 +689,7 @@ uint32 KmScene1201::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4815: GotoState(&KmScene1201::stCloseEyes); break; - case 0x4816: + case NM_KLAYMEN_PRESS_BUTTON: if (param.asInteger() == 0) GotoState(&Klaymen::stPressButtonSide); break; @@ -755,7 +755,7 @@ void KmScene1201::stCloseEyes() { uint32 KmScene1201::hmMatch(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Klaymen::hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x51281850) { setGlobalVar(V_TNT_DUMMY_FUSE_LIT, 1); } else if (param.asInteger() == 0x43000538) { @@ -798,7 +798,7 @@ void KmScene1201::stLightMatch() { uint32 KmScene1201::hmTumbleHeadless(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Klaymen::hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x000F0082) { playSound(0, 0x74E2810F); } diff --git a/engines/neverhood/modules/module1300.cpp b/engines/neverhood/modules/module1300.cpp index 312fb85ae7..033b19f22f 100644 --- a/engines/neverhood/modules/module1300.cpp +++ b/engines/neverhood/modules/module1300.cpp @@ -358,7 +358,7 @@ uint32 Scene1302::handleMessage(int messageNum, const MessageParam ¶m, Entit uint32 messageResult = 0; Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x4A845A00) sendEntityMessage(_klaymen, 0x1014, _asRing1); else if (param.asInteger() == 0x43807801) { @@ -402,7 +402,7 @@ uint32 Scene1302::handleMessage(int messageNum, const MessageParam ¶m, Entit setMessageList(0x004B0978); } break; - case 0x2000: + case NM_ANIMATION_UPDATE: if (_klaymen->getY() > 360) { sendEntityMessage(_klaymen, 0x1014, _asVenusFlyTrap); setMessageList2(0x004B08F0); @@ -421,39 +421,39 @@ uint32 Scene1302::handleMessage(int messageNum, const MessageParam ¶m, Entit if (sender == _asRing1) playSound(0, 0x665198C0); else if (sender == _asRing2) { - sendMessage(_asBridge, 0x4808, 0); + sendMessage(_asBridge, NM_DOOR_OPEN, 0); setGlobalVar(V_FLYTRAP_RING_BRIDGE, 1); } else if (sender == _asRing3) playSound(0, 0xE2D389C0); else if (sender == _asRing4) { - sendMessage(_ssFence, 0x4808, 0); + sendMessage(_ssFence, NM_DOOR_OPEN, 0); setGlobalVar(V_FLYTRAP_RING_FENCE, 1); } else if (sender == _asRing5) playSound(0, 0x40428A09); break; - case 0x4807: + case NM_LEVER_UP: if (sender == _asRing2) { - sendMessage(_asBridge, 0x4809, 0); + sendMessage(_asBridge, NM_DOOR_CLOSE, 0); setGlobalVar(V_FLYTRAP_RING_BRIDGE, 0); _sprite2->setVisible(false); } else if (sender == _asRing4) { - sendMessage(_ssFence, 0x4809, 0); + sendMessage(_ssFence, NM_DOOR_CLOSE, 0); setGlobalVar(V_FLYTRAP_RING_FENCE, 0); } else if (sender == _asVenusFlyTrap) { if (getGlobalVar(V_FLYTRAP_RING_BRIDGE)) - sendMessage(_asRing2, 0x4807, 0); + sendMessage(_asRing2, NM_LEVER_UP, 0); else - sendMessage(_asRing4, 0x4807, 0); + sendMessage(_asRing4, NM_LEVER_UP, 0); } break; - case 0x480F: + case NM_LEVER_DOWN: if (sender == _asRing2) { playSound(0, 0x60755842); - sendMessage(_asBridge, 0x4808, 0); + sendMessage(_asBridge, NM_DOOR_OPEN, 0); setGlobalVar(V_FLYTRAP_RING_BRIDGE, 1); } else if (sender == _asRing4) { playSound(0, 0x60755842); - sendMessage(_ssFence, 0x4808, 0); + sendMessage(_ssFence, NM_DOOR_OPEN, 0); setGlobalVar(V_FLYTRAP_RING_FENCE, 1); } break; @@ -500,7 +500,7 @@ Scene1303::Scene1303(NeverhoodEngine *vm, Module *parentModule) uint32 Scene1303::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2000: + case NM_ANIMATION_UPDATE: setGlobalVar(V_BALLOON_POPPED, 1); sendMessage(_asBalloon, 0x2000, 0); break; @@ -555,7 +555,7 @@ Scene1304::Scene1304(NeverhoodEngine *vm, Module *parentModule, int which) uint32 Scene1304::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x415634A4) { if (getGlobalVar(V_BALLOON_POPPED)) cancelMessageList(); @@ -681,7 +681,7 @@ Scene1306::Scene1306(NeverhoodEngine *vm, Module *parentModule, int which) sendMessage(this, 0x2000, 0); SetMessageHandler(&Scene1306::handleMessage416EB0); clearRectList(); - sendMessage(_asElevator, 0x4808, 0); + sendMessage(_asElevator, NM_DOOR_OPEN, 0); } } @@ -693,7 +693,7 @@ Scene1306::~Scene1306() { uint32 Scene1306::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x402064D8) sendEntityMessage(_klaymen, 0x1014, _ssButton); else if (param.asInteger() == 0x01C66840) { @@ -707,7 +707,7 @@ uint32 Scene1306::handleMessage(int messageNum, const MessageParam ¶m, Entit SetMessageHandler(&Scene1306::handleMessage416EB0); } break; - case 0x2000: + case NM_ANIMATION_UPDATE: if (param.asInteger() != 0) { setRectList(0x004AFD28); _klaymen->setKlaymenIdleTable3(); @@ -718,7 +718,7 @@ uint32 Scene1306::handleMessage(int messageNum, const MessageParam ¶m, Entit break; case 0x480B: if (sender == _ssButton) - sendMessage(_asElevator, 0x4808, 0); + sendMessage(_asElevator, NM_DOOR_OPEN, 0); break; case 0x4826: if (sender == _asKey) { @@ -752,11 +752,11 @@ uint32 Scene1306::handleMessage(int messageNum, const MessageParam ¶m, Entit uint32 Scene1306::handleMessage416EB0(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x4808: + case NM_DOOR_OPEN: setMessageList(0x004AFBD0); SetMessageHandler(&Scene1306::handleMessage); break; - case 0x4809: + case NM_DOOR_CLOSE: leaveScene(1); break; case 0x482A: @@ -981,7 +981,7 @@ Scene1308::Scene1308(NeverhoodEngine *vm, Module *parentModule, int which) // Klaymen entering from the left insertKlaymen(41, 440); setMessageList(0x004B57D0); - sendMessage(_asJaggyDoor, 0x4808, 0); + sendMessage(_asJaggyDoor, NM_DOOR_OPEN, 0); _sprite1->setVisible(false); if (getGlobalVar(V_KEYDOOR_UNLOCKED)) { _sprite4 = insertStaticSprite(0x0101A624, 1100); @@ -1009,7 +1009,7 @@ Scene1308::Scene1308(NeverhoodEngine *vm, Module *parentModule, int which) uint32 Scene1308::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x88C11390) { setRectList(0x004B59A0); _isProjecting = true; @@ -1022,7 +1022,7 @@ uint32 Scene1308::handleMessage(int messageNum, const MessageParam ¶m, Entit _isProjecting = false; } else if (param.asInteger() == 0x4AC68808) { clearRectList(); - sendMessage(_asJaggyDoor, 0x4809, 0); + sendMessage(_asJaggyDoor, NM_DOOR_CLOSE, 0); _sprite1->setVisible(false); _klaymen->setVisible(false); } @@ -1035,7 +1035,7 @@ uint32 Scene1308::handleMessage(int messageNum, const MessageParam ¶m, Entit setSurfacePriority(_sprite3->getSurface(), 995); } break; - case 0x2000: + case NM_ANIMATION_UPDATE: if (getGlobalVar(V_KEYDOOR_UNLOCKED)) setRectList(0x004B5990); else @@ -1056,10 +1056,10 @@ uint32 Scene1308::handleMessage(int messageNum, const MessageParam ¶m, Entit _sprite4->setVisible(true); setRectList(0x004B5990); break; - case 0x4807: + case NM_LEVER_UP: sendMessage(_asLightWallSymbols, 0x2003, 0); break; - case 0x480F: + case NM_LEVER_DOWN: sendMessage(_asLightWallSymbols, 0x2002, 0); _ssNumber1->setVisible(true); _ssNumber2->setVisible(true); @@ -1141,7 +1141,7 @@ void Scene1317::upChooseKing() { uint32 Scene1317::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: stChooseKing(); break; } @@ -1170,7 +1170,7 @@ uint32 Scene1317::hmChooseKing(int messageNum, const MessageParam ¶m, Entity uint32 Scene1317::hmHoborgAsKing(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: stEndMovie(); break; } @@ -1180,7 +1180,7 @@ uint32 Scene1317::hmHoborgAsKing(int messageNum, const MessageParam ¶m, Enti uint32 Scene1317::hmEndMovie(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: leaveScene(0); break; } diff --git a/engines/neverhood/modules/module1300_sprites.cpp b/engines/neverhood/modules/module1300_sprites.cpp index a65f2363a3..275249726e 100644 --- a/engines/neverhood/modules/module1300_sprites.cpp +++ b/engines/neverhood/modules/module1300_sprites.cpp @@ -46,13 +46,13 @@ AsScene1302Bridge::AsScene1302Bridge(NeverhoodEngine *vm, Scene *parentScene) uint32 AsScene1302Bridge::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; - case 0x4808: + case NM_DOOR_OPEN: stLowerBridge(); break; - case 0x4809: + case NM_DOOR_CLOSE: stRaiseBridge(); break; } @@ -99,12 +99,12 @@ void SsScene1302Fence::update() { uint32 SsScene1302Fence::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x4808: + case NM_DOOR_OPEN: playSound(0); SetMessageHandler(NULL); SetSpriteUpdate(&SsScene1302Fence::suMoveDown); break; - case 0x4809: + case NM_DOOR_CLOSE: playSound(1); SetMessageHandler(NULL); SetSpriteUpdate(&SsScene1302Fence::suMoveUp); @@ -150,7 +150,7 @@ uint32 AsScene1303Balloon::handleMessage(int messageNum, const MessageParam &par sendMessage(_parentScene, 0x4826, 0); messageResult = 1; break; - case 0x2000: + case NM_ANIMATION_UPDATE: stPopBalloon(); break; } @@ -160,11 +160,11 @@ uint32 AsScene1303Balloon::handleMessage(int messageNum, const MessageParam &par uint32 AsScene1303Balloon::hmBalloonPopped(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x020B0003) playSound(0, 0x742B0055); break; - case 0x3002: + case NM_ANIMATION_STOP: playSound(0, 0x470007EE); stopAnimation(); setVisible(false); @@ -241,10 +241,10 @@ uint32 AsScene1306Elevator::handleMessage(int messageNum, const MessageParam &pa _countdown = 144; messageResult = _isUp ? 1 : 0; break; - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; - case 0x4808: + case NM_DOOR_OPEN: if (_isDown) stGoingUp(); break; @@ -262,7 +262,7 @@ void AsScene1306Elevator::stGoingUp() { } void AsScene1306Elevator::cbGoingUpEvent() { - sendMessage(_parentScene, 0x4808, 0); + sendMessage(_parentScene, NM_DOOR_OPEN, 0); _isUp = true; _countdown = 144; stopAnimation(); @@ -282,7 +282,7 @@ void AsScene1306Elevator::stGoingDown() { void AsScene1306Elevator::cbGoingDownEvent() { _isDown = true; - sendMessage(_parentScene, 0x4809, 0); + sendMessage(_parentScene, NM_DOOR_CLOSE, 0); stopAnimation(); SetUpdateHandler(&AsScene1306Elevator::update); } @@ -361,7 +361,7 @@ uint32 AsScene1307Key::handleMessage(int messageNum, const MessageParam ¶m, messageResult = 1; } break; - case 0x2000: + case NM_ANIMATION_UPDATE: _isClickable = param.asInteger() != 0; break; case 0x2001: @@ -480,13 +480,13 @@ AsScene1308JaggyDoor::AsScene1308JaggyDoor(NeverhoodEngine *vm, Scene *parentSce uint32 AsScene1308JaggyDoor::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; - case 0x4808: + case NM_DOOR_OPEN: stOpenDoor(); break; - case 0x4809: + case NM_DOOR_CLOSE: stCloseDoor(); break; } @@ -530,7 +530,7 @@ AsScene1308KeyboardDoor::AsScene1308KeyboardDoor(NeverhoodEngine *vm, Scene *par uint32 AsScene1308KeyboardDoor::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; } @@ -568,7 +568,7 @@ uint32 AsScene1308LightWallSymbols::handleMessage(int messageNum, const MessageP case 0x2003: stFadeOut(); break; - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; } @@ -615,7 +615,7 @@ AsScene1308Mouse::AsScene1308Mouse(NeverhoodEngine *vm) uint32 AsScene1308Mouse::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x66382026) playSound(0, 0x0CD84468); else if (param.asInteger() == 0x6E28061C) @@ -663,7 +663,7 @@ uint32 KmScene1304::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4004: GotoState(&Klaymen::stTryStandIdle); break; - case 0x4812: + case NM_KLAYMEN_PICKUP: if (param.asInteger() == 2) GotoState(&Klaymen::stPickUpNeedle); else if (param.asInteger() == 1) @@ -750,7 +750,7 @@ KmScene1306::KmScene1306(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 uint32 KmScene1306::xHandleMessage(int messageNum, const MessageParam ¶m) { uint32 messageResult = 0; switch (messageNum) { - case 0x2000: + case NM_ANIMATION_UPDATE: _isSittingInTeleporter = param.asInteger() != 0; messageResult = 1; break; @@ -764,7 +764,7 @@ uint32 KmScene1306::xHandleMessage(int messageNum, const MessageParam ¶m) { else GotoState(&Klaymen::stTryStandIdle); break; - case 0x4812: + case NM_KLAYMEN_PICKUP: if (param.asInteger() == 2) GotoState(&Klaymen::stPickUpNeedle); else if (param.asInteger() == 1) @@ -772,7 +772,7 @@ uint32 KmScene1306::xHandleMessage(int messageNum, const MessageParam ¶m) { else GotoState(&Klaymen::stPickUpGeneric); break; - case 0x4816: + case NM_KLAYMEN_PRESS_BUTTON: if (param.asInteger() == 1) GotoState(&Klaymen::stPressButton); else if (param.asInteger() == 2) @@ -784,7 +784,7 @@ uint32 KmScene1306::xHandleMessage(int messageNum, const MessageParam ¶m) { setDoDeltaX(param.asInteger()); gotoNextStateExt(); break; - case 0x481A: + case NM_KLAYMEN_INSERT_DISK: GotoState(&Klaymen::stInsertDisk); break; case 0x481B: @@ -886,7 +886,7 @@ uint32 KmScene1308::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x480D: GotoState(&Klaymen::stUseLever); break; - case 0x4812: + case NM_KLAYMEN_PICKUP: if (param.asInteger() == 2) GotoState(&Klaymen::stPickUpNeedle); else if (param.asInteger() == 1) @@ -898,7 +898,7 @@ uint32 KmScene1308::xHandleMessage(int messageNum, const MessageParam ¶m) { setDoDeltaX(param.asInteger()); gotoNextStateExt(); break; - case 0x481A: + case NM_KLAYMEN_INSERT_DISK: if (param.asInteger() == 1) GotoState(&Klaymen::stInsertKey); else @@ -916,7 +916,7 @@ uint32 KmScene1308::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x481E: GotoState(&Klaymen::stReturnFromUse); break; - case 0x4827: + case NM_KLAYMEN_RELEASE_LEVER: GotoState(&Klaymen::stReleaseLever); break; case 0x4834: diff --git a/engines/neverhood/modules/module1400.cpp b/engines/neverhood/modules/module1400.cpp index 2fc1052ab1..50a36d62bd 100644 --- a/engines/neverhood/modules/module1400.cpp +++ b/engines/neverhood/modules/module1400.cpp @@ -225,7 +225,7 @@ void Scene1401::update() { uint32 Scene1401::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x02144CB1) sendEntityMessage(_klaymen, 0x1014, _ssFloorButton); else if (param.asInteger() == 0x402064D8) @@ -254,7 +254,7 @@ uint32 Scene1401::handleMessage(int messageNum, const MessageParam ¶m, Entit if (_asProjector && _asProjector->getX() > 404 && _asProjector->getX() < 504) sendMessage(_asProjector , 0x4839, 0); } else if (sender == _ssButton) - sendMessage(_asBackDoor, 0x4808, 0); + sendMessage(_asBackDoor, NM_DOOR_OPEN, 0); break; case 0x4826: if (sender == _asProjector) { @@ -375,7 +375,7 @@ void Scene1402::upShaking() { uint32 Scene1402::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x00F43389) { if (getGlobalVar(V_MOUSE_PUZZLE_SOLVED)) leaveScene(0); @@ -394,7 +394,7 @@ uint32 Scene1402::handleMessage(int messageNum, const MessageParam ¶m, Entit else leaveScene(1); break; - case 0x2000: + case NM_ANIMATION_UPDATE: stopShaking(); showMouse(true); setRectList(0x004B0C48); @@ -473,7 +473,7 @@ uint32 Scene1407::handleMessage(int messageNum, const MessageParam ¶m, Entit } } break; - case 0x2000: + case NM_ANIMATION_UPDATE: // The mouse got the cheese (nomnom) setGlobalVar(V_MOUSE_PUZZLE_SOLVED, 1); playSound(0, 0x68E25540); @@ -534,7 +534,7 @@ Scene1403::Scene1403(NeverhoodEngine *vm, Module *parentModule, int which) uint32 Scene1403::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x88C11390) { setRectList(0x004B2008); _isProjecting = true; @@ -555,10 +555,10 @@ uint32 Scene1403::handleMessage(int messageNum, const MessageParam ¶m, Entit setSurfacePriority(_sprite3->getSurface(), 995); } break; - case 0x4807: + case NM_LEVER_UP: _sprite1->setVisible(false); break; - case 0x480F: + case NM_LEVER_DOWN: _sprite1->setVisible(true); break; case 0x4826: @@ -655,7 +655,7 @@ Scene1404::~Scene1404() { uint32 Scene1404::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x410650C2) { if (_asProjector && _asProjector->getX() == 220) setMessageList(0x004B8C40); @@ -729,7 +729,7 @@ uint32 Scene1405::handleMessage(int messageNum, const MessageParam ¶m, Entit if (param.asPoint().x <= 20 || param.asPoint().x >= 620) leaveScene(0); break; - case 0x2000: + case NM_ANIMATION_UPDATE: if (_selectFirstTile) { _firstTileIndex = param.asInteger(); _selectFirstTile = false; diff --git a/engines/neverhood/modules/module1400_sprites.cpp b/engines/neverhood/modules/module1400_sprites.cpp index c0ab73c93d..2cc1af8d81 100644 --- a/engines/neverhood/modules/module1400_sprites.cpp +++ b/engines/neverhood/modules/module1400_sprites.cpp @@ -59,11 +59,11 @@ void AsScene1401Pipe::upSuckInProjector() { uint32 AsScene1401Pipe::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x0A8A1490) playSound(1, 0x6AB6666F); break; - case 0x2000: + case NM_ANIMATION_UPDATE: _countdown1 = 70; _countdown2 = 8; stStartSucking(); @@ -78,7 +78,7 @@ uint32 AsScene1401Pipe::handleMessage(int messageNum, const MessageParam ¶m, uint32 AsScene1401Pipe::hmSuckInProjector(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: if (_countdown1 != 0) stStartSucking(); else @@ -121,7 +121,7 @@ AsScene1401Mouse::AsScene1401Mouse(NeverhoodEngine *vm) uint32 AsScene1401Mouse::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x66382026) playSound(0, 0x0CD84468); else if (param.asInteger() == 0x6E28061C) @@ -222,10 +222,10 @@ uint32 AsScene1401BackDoor::handleMessage(int messageNum, const MessageParam &pa _countdown = 168; messageResult = _isOpen ? 1 : 0; break; - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; - case 0x4808: + case NM_DOOR_OPEN: _countdown = 168; if (!_isOpen) stOpenDoor(); @@ -292,7 +292,7 @@ uint32 AsCommonProjector::handleMessage(int messageNum, const MessageParam ¶ sendMessage(_parentScene, 0x4826, 0); messageResult = 1; break; - case 0x4807: + case NM_LEVER_UP: setGlobalVar(V_PROJECTOR_SLOT, (_x - _asProjectorItem->point.x) / 108); if ((int8)getGlobalVar(V_PROJECTOR_SLOT) == _asProjectorItem->lockSlotIndex) stStartLockedInSlot(); @@ -338,8 +338,8 @@ uint32 AsCommonProjector::hmLockedInSlot(int messageNum, const MessageParam &par sendMessage(_parentScene, 0x4826, 0); messageResult = 1; break; - case 0x4807: - sendMessage(_parentScene, 0x4807, 0); + case NM_LEVER_UP: + sendMessage(_parentScene, NM_LEVER_UP, 0); stStopProjecting(); break; case 0x480B: @@ -357,7 +357,7 @@ uint32 AsCommonProjector::hmLockedInSlot(int messageNum, const MessageParam &par else messageResult = getGlobalVar(V_PROJECTOR_SLOT) > 0 ? 1 : 0; break; - case 0x480F: + case NM_LEVER_DOWN: stStartProjecting(); break; case 0x482A: @@ -373,7 +373,7 @@ uint32 AsCommonProjector::hmLockedInSlot(int messageNum, const MessageParam &par uint32 AsCommonProjector::hmAnimation(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; } @@ -481,7 +481,7 @@ void AsCommonProjector::stStartProjecting() { } void AsCommonProjector::stLockedInSlot() { - sendMessage(_parentScene, 0x480F, 0); + sendMessage(_parentScene, NM_LEVER_DOWN, 0); startAnimation(0xD833207F, 0, -1); SetMessageHandler(&AsCommonProjector::hmLockedInSlot); SetSpriteUpdate(NULL); @@ -559,7 +559,7 @@ uint32 AsScene1402PuzzleBox::handleMessage(int messageNum, const MessageParam &p _playBackwards = true; NextState(&AsScene1402PuzzleBox::stMoveDownDone); break; - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; } @@ -902,7 +902,7 @@ uint32 KmScene1401::xHandleMessage(int messageNum, const MessageParam ¶m) { else GotoState(&Klaymen::stMoveObjectFaceObject); break; - case 0x4816: + case NM_KLAYMEN_PRESS_BUTTON: if (param.asInteger() == 1) GotoState(&Klaymen::stPressButton); else if (param.asInteger() == 2) @@ -1019,7 +1019,7 @@ uint32 KmScene1403::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x480D: GotoState(&Klaymen::stUseLever); break; - case 0x4812: + case NM_KLAYMEN_PICKUP: if (param.asInteger() == 2) GotoState(&Klaymen::stPickUpNeedle); else if (param.asInteger() == 1) @@ -1037,7 +1037,7 @@ uint32 KmScene1403::xHandleMessage(int messageNum, const MessageParam ¶m) { else startWalkToAttachedSpriteXDistance(param.asPoint().x); break; - case 0x4827: + case NM_KLAYMEN_RELEASE_LEVER: GotoState(&Klaymen::stReleaseLever); break; case 0x483F: @@ -1073,7 +1073,7 @@ uint32 KmScene1404::xHandleMessage(int messageNum, const MessageParam ¶m) { else GotoState(&Klaymen::stMoveObjectFaceObject); break; - case 0x4812: + case NM_KLAYMEN_PICKUP: if (param.asInteger() == 2) GotoState(&Klaymen::stPickUpNeedle); else if (param.asInteger() == 1) @@ -1085,7 +1085,7 @@ uint32 KmScene1404::xHandleMessage(int messageNum, const MessageParam ¶m) { setDoDeltaX(param.asInteger()); gotoNextStateExt(); break; - case 0x481A: + case NM_KLAYMEN_INSERT_DISK: GotoState(&Klaymen::stInsertDisk); break; case 0x481B: diff --git a/engines/neverhood/modules/module1500.cpp b/engines/neverhood/modules/module1500.cpp index ec3b67a6c5..eaa23e586b 100644 --- a/engines/neverhood/modules/module1500.cpp +++ b/engines/neverhood/modules/module1500.cpp @@ -124,7 +124,7 @@ void Scene1501::update() { uint32 Scene1501::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0009: + case NM_KEYPRESS_SPACE: _skip = true; break; } diff --git a/engines/neverhood/modules/module1600.cpp b/engines/neverhood/modules/module1600.cpp index 0df7dd8925..63978b1d5d 100644 --- a/engines/neverhood/modules/module1600.cpp +++ b/engines/neverhood/modules/module1600.cpp @@ -417,13 +417,13 @@ void Scene1608::upRidingCar() { uint32 Scene1608::hmLowerFloor(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x20250B1A) { clearRectList(); _klaymen->setVisible(false); showMouse(false); _sprite1->setVisible(false); - //sendMessage(_asDoor, 0x4809, 0); // Play sound? + //sendMessage(_asDoor, NM_DOOR_CLOSE, 0); // Play sound? _countdown1 = 28; } break; @@ -444,7 +444,7 @@ uint32 Scene1608::hmLowerFloor(int messageNum, const MessageParam ¶m, Entity uint32 Scene1608::hmUpperFloor(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x60842040) _carStatus = 1; break; @@ -548,7 +548,7 @@ uint32 Scene1609::handleMessage(int messageNum, const MessageParam ¶m, Entit if (param.asPoint().x <= 20 || param.asPoint().x >= 620) leaveScene(0); break; - case 0x2000: + case NM_ANIMATION_UPDATE: if (!_isSolved) { if (_changeCurrentSymbol) _asSymbols[_symbolPosition]->change(_currentSymbolIndex + 12, false); diff --git a/engines/neverhood/modules/module1600_sprites.cpp b/engines/neverhood/modules/module1600_sprites.cpp index 06a00c82c0..e930d1fdc3 100644 --- a/engines/neverhood/modules/module1600_sprites.cpp +++ b/engines/neverhood/modules/module1600_sprites.cpp @@ -211,11 +211,11 @@ uint32 AsCommonCar::handleMessage(int messageNum, const MessageParam ¶m, Ent uint32 AsCommonCar::hmAnimation(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = AsCommonCar::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (_isBusy && param.asInteger() == 0x025424A2) gotoNextState(); break; - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; } @@ -227,7 +227,7 @@ uint32 AsCommonCar::hmLeaveCar(int messageNum, const MessageParam ¶m, Entity case 0x2009: stEnterCar(); break; - case 0x3002: + case NM_ANIMATION_STOP: sendMessage(_parentScene, 0x200A, 0); SetMessageHandler(&AsCommonCar::handleMessage); break; @@ -866,7 +866,7 @@ uint32 KmScene1608::xHandleMessage(int messageNum, const MessageParam ¶m) { else GotoState(&Klaymen::stTryStandIdle); break; - case 0x4812: + case NM_KLAYMEN_PICKUP: if (param.asInteger() == 2) GotoState(&Klaymen::stPickUpNeedle); else if (param.asInteger() == 1) diff --git a/engines/neverhood/modules/module1700.cpp b/engines/neverhood/modules/module1700.cpp index e3a5fc3663..1062691cd2 100644 --- a/engines/neverhood/modules/module1700.cpp +++ b/engines/neverhood/modules/module1700.cpp @@ -215,7 +215,7 @@ void Scene1705::update() { uint32 Scene1705::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2000: + case NM_ANIMATION_UPDATE: if (param.asInteger()) { setRectList(0x004B6B40); _klaymen->setKlaymenIdleTable3(); diff --git a/engines/neverhood/modules/module1700_sprites.cpp b/engines/neverhood/modules/module1700_sprites.cpp index 6274e5a8cc..d5c4deb752 100644 --- a/engines/neverhood/modules/module1700_sprites.cpp +++ b/engines/neverhood/modules/module1700_sprites.cpp @@ -74,7 +74,7 @@ KmScene1705::KmScene1705(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 uint32 KmScene1705::xHandleMessage(int messageNum, const MessageParam ¶m) { uint32 messageResult = 0; switch (messageNum) { - case 0x2000: + case NM_ANIMATION_UPDATE: _isSittingInTeleporter = param.asInteger() != 0; messageResult = 1; break; @@ -91,7 +91,7 @@ uint32 KmScene1705::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4803: GotoState(&Klaymen::stFallSkipJump); break; - case 0x4812: + case NM_KLAYMEN_PICKUP: if (param.asInteger() == 2) GotoState(&Klaymen::stPickUpNeedle); else if (param.asInteger() == 1) diff --git a/engines/neverhood/modules/module1900.cpp b/engines/neverhood/modules/module1900.cpp index a920893755..1ec342d817 100644 --- a/engines/neverhood/modules/module1900.cpp +++ b/engines/neverhood/modules/module1900.cpp @@ -204,7 +204,7 @@ uint32 Scene1907::handleMessage(int messageNum, const MessageParam ¶m, Entit leaveScene(0); } break; - case 0x2000: + case NM_ANIMATION_UPDATE: if (getGlobalVar(V_STAIRS_DOWN)) { playSound(0); for (int i = 0; i < 9; i++) diff --git a/engines/neverhood/modules/module1900_sprites.cpp b/engines/neverhood/modules/module1900_sprites.cpp index 09c0b132d5..7bc160b2c1 100644 --- a/engines/neverhood/modules/module1900_sprites.cpp +++ b/engines/neverhood/modules/module1900_sprites.cpp @@ -122,7 +122,7 @@ uint32 AsScene1907Symbol::handleMessage(int messageNum, const MessageParam ¶ uint32 AsScene1907Symbol::hmTryToPlugIn(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; } @@ -394,7 +394,7 @@ void AsScene1907WaterHint::update() { uint32 AsScene1907WaterHint::hmShowing(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; } diff --git a/engines/neverhood/modules/module2000.cpp b/engines/neverhood/modules/module2000.cpp index 3364f60f8b..ad18e65cdd 100644 --- a/engines/neverhood/modules/module2000.cpp +++ b/engines/neverhood/modules/module2000.cpp @@ -144,7 +144,7 @@ Scene2001::Scene2001(NeverhoodEngine *vm, Module *parentModule, int which) uint32 Scene2001::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2000: + case NM_ANIMATION_UPDATE: if (param.asInteger()) { setRectList(0x004B3680); _klaymen->setKlaymenIdleTable3(); diff --git a/engines/neverhood/modules/module2000_sprites.cpp b/engines/neverhood/modules/module2000_sprites.cpp index c9c1481aa7..0f0faff69c 100644 --- a/engines/neverhood/modules/module2000_sprites.cpp +++ b/engines/neverhood/modules/module2000_sprites.cpp @@ -33,7 +33,7 @@ KmScene2001::KmScene2001(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 uint32 KmScene2001::xHandleMessage(int messageNum, const MessageParam ¶m) { uint32 messageResult = 0; switch (messageNum) { - case 0x2000: + case NM_ANIMATION_UPDATE: _isSittingInTeleporter = param.asInteger() != 0; messageResult = 1; break; diff --git a/engines/neverhood/modules/module2100.cpp b/engines/neverhood/modules/module2100.cpp index db7258b066..f27acc4391 100644 --- a/engines/neverhood/modules/module2100.cpp +++ b/engines/neverhood/modules/module2100.cpp @@ -147,7 +147,7 @@ void Scene2101::update() { if (_countdown1 != 0) { if (_doorStatus == 2) { if (--_countdown1 == 0) { - sendMessage(_asDoor, 0x4809, 0); + sendMessage(_asDoor, NM_DOOR_CLOSE, 0); _doorStatus = 1; } } else { @@ -155,12 +155,12 @@ void Scene2101::update() { _canAcceptInput = false; if (--_countdown1 == 0) { if (_klaymen->getX() < 480) { - sendMessage(_asDoor, 0x4809, 0); + sendMessage(_asDoor, NM_DOOR_CLOSE, 0); _doorStatus = 1; } else if (_klaymen->getX() >= 480 && _klaymen->getX() <= 575) { _klaymen->setDoDeltaX(0); setMessageList2(0x004B8F48); - sendMessage(_asDoor, 0x4809, 0); + sendMessage(_asDoor, NM_DOOR_CLOSE, 0); sendMessage(_asHitByDoorEffect, 0x2001, 0); _doorStatus = 1; } @@ -174,7 +174,7 @@ void Scene2101::update() { uint32 Scene2101::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x02144CB1) sendEntityMessage(_klaymen, 0x1014, _ssFloorButton); else if (param.asInteger() == 0x21E64A00) { @@ -185,7 +185,7 @@ uint32 Scene2101::handleMessage(int messageNum, const MessageParam ¶m, Entit } else if (param.asInteger() == 0x41442820) cancelMessageList(); break; - case 0x2000: + case NM_ANIMATION_UPDATE: if (param.asInteger() != 0) { setRectList(0x004B9008); _klaymen->setKlaymenIdleTable3(); @@ -196,7 +196,7 @@ uint32 Scene2101::handleMessage(int messageNum, const MessageParam ¶m, Entit break; case 0x480B: if (sender == _ssFloorButton && _doorStatus == 1) { - sendMessage(_asDoor, 0x4808, 0); + sendMessage(_asDoor, NM_DOOR_OPEN, 0); _doorStatus = 0; _countdown1 = 90; } diff --git a/engines/neverhood/modules/module2100_sprites.cpp b/engines/neverhood/modules/module2100_sprites.cpp index 707ebe342f..e5628d92ce 100644 --- a/engines/neverhood/modules/module2100_sprites.cpp +++ b/engines/neverhood/modules/module2100_sprites.cpp @@ -42,13 +42,13 @@ AsScene2101Door::AsScene2101Door(NeverhoodEngine *vm, bool isOpen) uint32 AsScene2101Door::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; - case 0x4808: + case NM_DOOR_OPEN: stOpenDoor(); break; - case 0x4809: + case NM_DOOR_CLOSE: stCloseDoor(); break; } @@ -93,7 +93,7 @@ uint32 AsScene2101HitByDoorEffect::handleMessage(int messageNum, const MessagePa startAnimation(0x0422255A, 0, -1); setVisible(true); break; - case 0x3002: + case NM_ANIMATION_STOP: stopAnimation(); setVisible(false); break; @@ -150,7 +150,7 @@ KmScene2101::KmScene2101(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 uint32 KmScene2101::xHandleMessage(int messageNum, const MessageParam ¶m) { uint32 messageResult = 0; switch (messageNum) { - case 0x2000: + case NM_ANIMATION_UPDATE: _isSittingInTeleporter = param.asInteger() != 0; messageResult = 1; break; @@ -167,7 +167,7 @@ uint32 KmScene2101::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4811: GotoState(&KmScene2101::stHitByDoor); break; - case 0x4812: + case NM_KLAYMEN_PICKUP: if (param.asInteger() == 2) GotoState(&Klaymen::stPickUpNeedle); else if (param.asInteger() == 1) @@ -175,7 +175,7 @@ uint32 KmScene2101::xHandleMessage(int messageNum, const MessageParam ¶m) { else GotoState(&Klaymen::stPickUpGeneric); break; - case 0x4816: + case NM_KLAYMEN_PRESS_BUTTON: if (param.asInteger() == 1) GotoState(&Klaymen::stPressButton); else if (param.asInteger() == 2) @@ -236,7 +236,7 @@ uint32 KmScene2101::hmHitByDoor(int messageNum, const MessageParam ¶m, Entit } messageResult = 0; break; - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x1A1A0785) { playSound(0, 0x40F0A342); } else if (param.asInteger() == 0x60428026) { diff --git a/engines/neverhood/modules/module2200.cpp b/engines/neverhood/modules/module2200.cpp index eecddf904c..fc84b8792f 100644 --- a/engines/neverhood/modules/module2200.cpp +++ b/engines/neverhood/modules/module2200.cpp @@ -551,7 +551,7 @@ void Scene2201::update() { uint32 Scene2201::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x402064D8) sendEntityMessage(_klaymen, 0x1014, _ssDoorButton); else if (param.asInteger() == 0x35803198) { @@ -575,7 +575,7 @@ uint32 Scene2201::handleMessage(int messageNum, const MessageParam ¶m, Entit break; case 0x480B: if (sender == _ssDoorButton) - sendMessage(_asDoor, 0x4808, 0); + sendMessage(_asDoor, NM_DOOR_OPEN, 0); break; case 0x4826: if (sender == _asTape) { @@ -666,7 +666,7 @@ uint32 Scene2202::handleMessage(int messageNum, const MessageParam ¶m, Entit if (param.asPoint().x <= 20 || param.asPoint().x >= 620) leaveScene(0); break; - case 0x2000: + case NM_ANIMATION_UPDATE: _movingCubePosition = (int16)param.asInteger(); _ssMovingCube = (Sprite*)sender; break; @@ -798,7 +798,7 @@ uint32 Scene2203::handleMessage(int messageNum, const MessageParam ¶m, Entit else _ssSmallRightDoor->setVisible(false); break; - case 0x4808: + case NM_DOOR_OPEN: if (sender == _asLeftDoor) { _ssSmallLeftDoor->setVisible(true); _klaymen->setClipRect(_leftDoorClipRect); @@ -911,7 +911,7 @@ void Scene2205::update() { uint32 Scene2205::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x6449569A) setMessageList(0x004B0690); else if (param.asInteger() == 0x2841369C) @@ -1012,7 +1012,7 @@ Scene2206::~Scene2206() { uint32 Scene2206::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x800C6694) readClickedColumn(); else if (param.asInteger() == 0x402064D8) @@ -1031,9 +1031,9 @@ uint32 Scene2206::handleMessage(int messageNum, const MessageParam ¶m, Entit if (sender == _ssButton) { setGlobalVar(V_SPIKES_RETRACTED, getGlobalVar(V_SPIKES_RETRACTED) ? 0 : 1); if (getGlobalVar(V_SPIKES_RETRACTED)) - sendMessage(_asDoorSpikes, 0x4808, 0); + sendMessage(_asDoorSpikes, NM_DOOR_OPEN, 0); else - sendMessage(_asDoorSpikes, 0x4809, 0); + sendMessage(_asDoorSpikes, NM_DOOR_CLOSE, 0); } break; case 0x4826: @@ -1179,7 +1179,7 @@ void Scene2207::update() { uint32 Scene2207::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x0014F275) { if (_klaymenAtElevator) { sendMessage(_asElevator, 0x2000, _mouseClickPos.y); @@ -1221,7 +1221,7 @@ uint32 Scene2207::handleMessage(int messageNum, const MessageParam ¶m, Entit case 0x2003: _isKlaymenBusy = false; break; - case 0x4807: + case NM_LEVER_UP: sendMessage(_asWallRobotAnimation, 0x2007, 0); sendMessage(_asWallCannonAnimation, 0x2007, 0); break; @@ -1236,7 +1236,7 @@ uint32 Scene2207::handleMessage(int messageNum, const MessageParam ¶m, Entit } } break; - case 0x480F: + case NM_LEVER_DOWN: sendMessage(_asWallRobotAnimation, 0x2006, 0); sendMessage(_asWallCannonAnimation, 0x2006, 0); _asWallRobotAnimation->setVisible(true); @@ -1519,7 +1519,7 @@ void Scene2242::update() { uint32 Scene2242::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x800C6694) readClickedColumn(); break; @@ -1620,7 +1620,7 @@ HallOfRecordsScene::~HallOfRecordsScene() { uint32 HallOfRecordsScene::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x800C6694) readClickedColumn(); break; @@ -1708,7 +1708,7 @@ Scene2247::~Scene2247() { uint32 Scene2247::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x800C6694) readClickedColumn(); break; diff --git a/engines/neverhood/modules/module2200_sprites.cpp b/engines/neverhood/modules/module2200_sprites.cpp index 30f0404cf1..bd2b658a7f 100644 --- a/engines/neverhood/modules/module2200_sprites.cpp +++ b/engines/neverhood/modules/module2200_sprites.cpp @@ -62,7 +62,7 @@ void AsScene2201Door::update() { uint32 AsScene2201Door::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x11001090) { if (_isOpen) _ssDoorLight->setVisible(true); @@ -71,15 +71,15 @@ uint32 AsScene2201Door::handleMessage(int messageNum, const MessageParam ¶m, _ssDoorLight->setVisible(false); } break; - case 0x2000: + case NM_ANIMATION_UPDATE: if (_isOpen) _countdown = 144; messageResult = _isOpen ? 1 : 0; break; - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; - case 0x4808: + case NM_DOOR_OPEN: _countdown = 144; if (!_isOpen) stOpenDoor(); @@ -382,20 +382,20 @@ uint32 AsScene2203Door::handleMessage(int messageNum, const MessageParam ¶m, sendMessage(_parentScene, 0x2001, 0); messageResult = 1; break; - case 0x2000: + case NM_ANIMATION_UPDATE: _otherDoor = (Sprite*)param.asEntity(); break; - case 0x3002: + case NM_ANIMATION_STOP: if (_doorIndex == getGlobalVar(V_LARGE_DOOR_NUMBER)) - sendMessage(_parentScene, 0x4808, 0); + sendMessage(_parentScene, NM_DOOR_OPEN, 0); stopAnimation(); break; - case 0x4808: + case NM_DOOR_OPEN: setGlobalVar(V_LARGE_DOOR_NUMBER, _doorIndex); - sendMessage(_otherDoor, 0x4809, 0); + sendMessage(_otherDoor, NM_DOOR_CLOSE, 0); openDoor(); break; - case 0x4809: + case NM_DOOR_CLOSE: closeDoor(); sendMessage(_parentScene, 0x2003, 0); break; @@ -425,7 +425,7 @@ SsScene2205DoorFrame::SsScene2205DoorFrame(NeverhoodEngine *vm) uint32 SsScene2205DoorFrame::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2000: + case NM_ANIMATION_UPDATE: loadSprite(getGlobalVar(V_LIGHTS_ON) ? 0x24306227 : 0xD90032A0, kSLFDefDrawOffset | kSLFDefPosition); break; } @@ -458,13 +458,13 @@ void AsScene2206DoorSpikes::update() { uint32 AsScene2206DoorSpikes::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x4808: + case NM_DOOR_OPEN: _deltaIndex = 0; playSound(0, 0x032746E0); SetMessageHandler(NULL); SetSpriteUpdate(&AsScene2206DoorSpikes::suOpen); break; - case 0x4809: + case NM_DOOR_CLOSE: _deltaIndex = 0; playSound(0, 0x002642C0); SetMessageHandler(NULL); @@ -629,7 +629,7 @@ void AsScene2207Elevator::suSetPosition() { uint32 AsScene2207Elevator::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2000: + case NM_ANIMATION_UPDATE: moveToY(param.asInteger()); break; } @@ -685,14 +685,14 @@ uint32 AsScene2207Lever::handleMessage(int messageNum, const MessageParam ¶m sendMessage(_parentScene, 0x4826, 0); messageResult = 1; break; - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); stopAnimation(); break; - case 0x4807: + case NM_LEVER_UP: stLeverUp(); break; - case 0x480F: + case NM_LEVER_DOWN: stLeverDown(); break; case 0x482A: @@ -712,7 +712,7 @@ void AsScene2207Lever::stLeverDown() { } void AsScene2207Lever::stLeverDownEvent() { - sendMessage(_parentScene, 0x480F, 0); + sendMessage(_parentScene, NM_LEVER_DOWN, 0); } void AsScene2207Lever::stLeverUp() { @@ -723,7 +723,7 @@ void AsScene2207Lever::stLeverUp() { } void AsScene2207Lever::stLeverUpEvent() { - sendMessage(_parentScene, 0x4807, 0); + sendMessage(_parentScene, NM_LEVER_UP, 0); } AsScene2207WallRobotAnimation::AsScene2207WallRobotAnimation(NeverhoodEngine *vm, Scene *parentScene) @@ -748,7 +748,7 @@ AsScene2207WallRobotAnimation::~AsScene2207WallRobotAnimation() { uint32 AsScene2207WallRobotAnimation::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (!_idle) { if (param.asInteger() == 0x3423093) { _vm->_soundMan->addSound(0x80D00820, 0x12121943); @@ -775,7 +775,7 @@ uint32 AsScene2207WallRobotAnimation::handleMessage(int messageNum, const Messag case 0x2007: stStopAnimation(); break; - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; } @@ -828,7 +828,7 @@ uint32 AsScene2207WallCannonAnimation::handleMessage(int messageNum, const Messa case 0x2007: stStopAnimation(); break; - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; } @@ -879,10 +879,10 @@ uint32 KmScene2201::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4004: GotoState(&Klaymen::stTryStandIdle); break; - case 0x4812: + case NM_KLAYMEN_PICKUP: GotoState(&Klaymen::stPickUpGeneric); break; - case 0x4816: + case NM_KLAYMEN_PRESS_BUTTON: if (param.asInteger() == 0) GotoState(&Klaymen::stPressButtonSide); break; @@ -946,7 +946,7 @@ uint32 KmScene2203::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4004: GotoState(&Klaymen::stTryStandIdle); break; - case 0x4812: + case NM_KLAYMEN_PICKUP: if (param.asInteger() == 2) GotoState(&Klaymen::stPickUpNeedle); else if (param.asInteger() == 1) @@ -954,7 +954,7 @@ uint32 KmScene2203::xHandleMessage(int messageNum, const MessageParam ¶m) { else GotoState(&Klaymen::stPickUpGeneric); break; - case 0x4816: + case NM_KLAYMEN_PRESS_BUTTON: if (param.asInteger() == 1) GotoState(&Klaymen::stPressButton); else if (param.asInteger() == 2) @@ -972,7 +972,7 @@ uint32 KmScene2203::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4819: GotoState(&KmScene2203::stClayDoorOpen); break; - case 0x481A: + case NM_KLAYMEN_INSERT_DISK: GotoState(&Klaymen::stInsertDisk); break; case 0x481B: @@ -1015,9 +1015,9 @@ void KmScene2203::stClayDoorOpen() { uint32 KmScene2203::hmClayDoorOpen(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x040D4186) { - sendMessage(_attachedSprite, 0x4808, 0); + sendMessage(_attachedSprite, NM_DOOR_OPEN, 0); } break; } @@ -1050,7 +1050,7 @@ uint32 KmScene2205::xHandleMessage(int messageNum, const MessageParam ¶m) { } else GotoState(&Klaymen::stPeekWall); break; - case 0x4816: + case NM_KLAYMEN_PRESS_BUTTON: if (param.asInteger() == 0) GotoState(&Klaymen::stPressButtonSide); break; @@ -1105,13 +1105,13 @@ uint32 KmScene2206::xHandleMessage(int messageNum, const MessageParam ¶m) { } else GotoState(&Klaymen::stPeekWall); break; - case 0x4812: + case NM_KLAYMEN_PICKUP: if (param.asInteger() == 1) GotoState(&Klaymen::stPickUpTube); else GotoState(&Klaymen::stPickUpGeneric); break; - case 0x4816: + case NM_KLAYMEN_PRESS_BUTTON: if (param.asInteger() == 1) GotoState(&Klaymen::stPressButton); else if (param.asInteger() == 2) @@ -1216,10 +1216,10 @@ uint32 KmScene2207::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x480D: GotoState(&Klaymen::stInteractLever); break; - case 0x4812: + case NM_KLAYMEN_PICKUP: GotoState(&Klaymen::stPickUpGeneric); break; - case 0x4816: + case NM_KLAYMEN_PRESS_BUTTON: if (param.asInteger() == 1) GotoState(&Klaymen::stPressButton); else if (param.asInteger() == 2) @@ -1237,7 +1237,7 @@ uint32 KmScene2207::xHandleMessage(int messageNum, const MessageParam ¶m) { else startWalkToAttachedSpriteXDistance(param.asPoint().x); break; - case 0x4827: + case NM_KLAYMEN_RELEASE_LEVER: GotoState(&Klaymen::stReleaseLever); break; case 0x482D: @@ -1280,7 +1280,7 @@ uint32 KmScene2242::xHandleMessage(int messageNum, const MessageParam ¶m) { } else GotoState(&Klaymen::stPeekWall); break; - case 0x4812: + case NM_KLAYMEN_PICKUP: if (param.asInteger() == 2) GotoState(&Klaymen::stPickUpNeedle); else if (param.asInteger() == 1) diff --git a/engines/neverhood/modules/module2400.cpp b/engines/neverhood/modules/module2400.cpp index dab39b24f6..ac66698886 100644 --- a/engines/neverhood/modules/module2400.cpp +++ b/engines/neverhood/modules/module2400.cpp @@ -253,7 +253,7 @@ void Scene2401::update() { if (puzzleSolved) { setGlobalVar(V_NOTES_DOOR_UNLOCKED, 1); setGlobalVar(V_NOTES_PUZZLE_SOLVED, 1); - sendMessage(_asDoor, 0x4808, 0); + sendMessage(_asDoor, NM_DOOR_OPEN, 0); } else if (waterInside) { playPipeSound(0xD0431020); for (uint i = 0; i < 5; i++) { @@ -283,7 +283,7 @@ void Scene2401::update() { uint32 Scene2401::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x402064D8) sendEntityMessage(_klaymen, 0x1014, _ssButton); else if (param.asInteger() == 0x02144CB1) @@ -313,7 +313,7 @@ uint32 Scene2401::handleMessage(int messageNum, const MessageParam ¶m, Entit } else if (param.asInteger() == 0x09C4B40A && _countdown2 > 12) _countdown2 = 12; break; - case 0x2000: + case NM_ANIMATION_UPDATE: messageResult = 0; for (uint32 i = 0; i < 5; i++) if (kScene2401Rects[i].contains(_mouseClickPos.x, _mouseClickPos.y)) { @@ -411,7 +411,7 @@ Scene2402::~Scene2402() { void Scene2402::update() { if (_countdown != 0 && (--_countdown) == 0) { if (_pipeStatus >= 10) { - sendMessage(_asDoor, 0x4808, 0); + sendMessage(_asDoor, NM_DOOR_OPEN, 0); _ssDoorFrame->loadSprite(0x00B415E0, kSLFDefDrawOffset | kSLFDefPosition); } else if (_pipeStatus >= 5) { _countdown = 8; @@ -428,7 +428,7 @@ void Scene2402::update() { uint32 Scene2402::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x402064D8) sendEntityMessage(_klaymen, 0x1014, _ssButton); else if (param.asInteger() == 0x01C66840) { @@ -516,13 +516,13 @@ Scene2403::Scene2403(NeverhoodEngine *vm, Module *parentModule, int which) uint32 Scene2403::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x040424D0) sendEntityMessage(_klaymen, 0x1014, _ssButton); else if (param.asInteger() == 0x180CE614) sendEntityMessage(_klaymen, 0x1014, _asLightCord); break; - case 0x2000: + case NM_ANIMATION_UPDATE: _isClimbingLadder = true; setRectList(0x004B5E28); break; @@ -541,7 +541,7 @@ uint32 Scene2403::handleMessage(int messageNum, const MessageParam ¶m, Entit } } break; - case 0x480F: + case NM_LEVER_DOWN: if (sender == _asLightCord) leaveScene(2); break; @@ -637,7 +637,7 @@ Scene2406::Scene2406(NeverhoodEngine *vm, Module *parentModule, int which) uint32 Scene2406::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x41062804) { if (getGlobalVar(V_SPIKES_RETRACTED)) setMessageList(0x004B7758); @@ -645,7 +645,7 @@ uint32 Scene2406::handleMessage(int messageNum, const MessageParam ¶m, Entit setMessageList(0x004B7738); } break; - case 0x2000: + case NM_ANIMATION_UPDATE: _isClimbingLadder = true; setRectList(0x004B78D8); break; diff --git a/engines/neverhood/modules/module2400_sprites.cpp b/engines/neverhood/modules/module2400_sprites.cpp index bf85b0dc37..c98a5c83c5 100644 --- a/engines/neverhood/modules/module2400_sprites.cpp +++ b/engines/neverhood/modules/module2400_sprites.cpp @@ -49,11 +49,11 @@ AsScene2401WaterSpit::AsScene2401WaterSpit(NeverhoodEngine *vm) uint32 AsScene2401WaterSpit::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x120A0013) playSound(0, kAsScene2401WaterSpitFileHashes1[_soundIndex]); break; - case 0x2000: + case NM_ANIMATION_UPDATE: _x = 240; _y = 447; _soundIndex = getSubVar(VA_CURR_WATER_PIPES_LEVEL, param.asInteger()); @@ -61,7 +61,7 @@ uint32 AsScene2401WaterSpit::handleMessage(int messageNum, const MessageParam &p setVisible(true); playSound(0, 0x48640244); break; - case 0x3002: + case NM_ANIMATION_STOP: stopAnimation(); setVisible(false); break; @@ -87,7 +87,7 @@ AsScene2401FlowingWater::~AsScene2401FlowingWater() { uint32 AsScene2401FlowingWater::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (_isWaterFlowing && param.asInteger() == 0x02421405) startAnimationByHash(0x10203116, 0x01084280, 0); break; @@ -104,7 +104,7 @@ uint32 AsScene2401FlowingWater::handleMessage(int messageNum, const MessageParam _vm->_soundMan->deleteSound(0x980C1420); _isWaterFlowing = false; break; - case 0x3002: + case NM_ANIMATION_STOP: stopAnimation(); setVisible(false); break; @@ -135,7 +135,7 @@ void AsScene2401WaterFlushing::update() { uint32 AsScene2401WaterFlushing::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (_flushLoopCount > 0 && param.asInteger() == 0x02421405) { startAnimationByHash(0xB8596884, 0x01084280, 0); _flushLoopCount--; @@ -147,7 +147,7 @@ uint32 AsScene2401WaterFlushing::handleMessage(int messageNum, const MessagePara _countdown = _vm->_rnd->getRandomNumber(3) + 1; } break; - case 0x3002: + case NM_ANIMATION_STOP: stopAnimation(); setVisible(false); break; @@ -194,10 +194,10 @@ uint32 AsScene2401Door::handleMessage(int messageNum, const MessageParam ¶m, _countdown = 168; messageResult = _isOpen ? 1 : 0; break; - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; - case 0x4808: + case NM_DOOR_OPEN: if (!_isOpen) { _countdown = 168; _isOpen = true; @@ -249,15 +249,15 @@ void AsScene2402Door::update() { uint32 AsScene2402Door::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2000: + case NM_ANIMATION_UPDATE: if (_isOpen) _countdown = 144; messageResult = _isOpen ? 1 : 0; break; - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; - case 0x4808: + case NM_DOOR_OPEN: _countdown = 144; _isOpen = true; setVisible(true); @@ -342,11 +342,11 @@ void AsScene2402TV::stJokeFinished() { uint32 AsScene2402TV::hmJoke(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x431EA0B0) playSound(0); break; - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; } @@ -371,7 +371,7 @@ uint32 KmScene2401::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4004: GotoState(&Klaymen::stTryStandIdle); break; - case 0x4816: + case NM_KLAYMEN_PRESS_BUTTON: if (param.asInteger() == 1) GotoState(&Klaymen::stPressButton); else if (param.asInteger() == 2) @@ -437,7 +437,7 @@ uint32 KmScene2401::xHandleMessage(int messageNum, const MessageParam ¶m) { uint32 KmScene2401::hmSpit(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Klaymen::hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x16401CA6) { _canSpitPipe = true; if (_contSpitPipe) @@ -521,10 +521,10 @@ uint32 KmScene2402::xHandleMessage(int messageNum, const MessageParam ¶m) { } else GotoState(&Klaymen::stPeekWall); break; - case 0x4812: + case NM_KLAYMEN_PICKUP: GotoState(&Klaymen::stPickUpGeneric); break; - case 0x4816: + case NM_KLAYMEN_PRESS_BUTTON: if (param.asInteger() == 1) GotoState(&Klaymen::stPressButton); else if (param.asInteger() == 2) @@ -583,10 +583,10 @@ uint32 KmScene2403::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x480D: GotoState(&Klaymen::stPullCord); break; - case 0x4812: + case NM_KLAYMEN_PICKUP: GotoState(&Klaymen::stPickUpGeneric); break; - case 0x4816: + case NM_KLAYMEN_PRESS_BUTTON: if (param.asInteger() == 1) GotoState(&Klaymen::stPressButton); else if (param.asInteger() == 2) @@ -671,7 +671,7 @@ uint32 KmScene2406::xHandleMessage(int messageNum, const MessageParam ¶m) { } else GotoState(&Klaymen::stPeekWall); break; - case 0x4812: + case NM_KLAYMEN_PICKUP: if (param.asInteger() == 2) GotoState(&Klaymen::stPickUpNeedle); else if (param.asInteger() == 1) @@ -683,7 +683,7 @@ uint32 KmScene2406::xHandleMessage(int messageNum, const MessageParam ¶m) { setDoDeltaX(param.asInteger()); gotoNextStateExt(); break; - case 0x481A: + case NM_KLAYMEN_INSERT_DISK: GotoState(&Klaymen::stInsertDisk); break; case 0x481B: diff --git a/engines/neverhood/modules/module2500.cpp b/engines/neverhood/modules/module2500.cpp index d0e60adf65..468545fd80 100644 --- a/engines/neverhood/modules/module2500.cpp +++ b/engines/neverhood/modules/module2500.cpp @@ -385,7 +385,7 @@ void Scene2501::upRidingCar() { uint32 Scene2501::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x60842040) _carStatus = 1; break; diff --git a/engines/neverhood/modules/module2500_sprites.cpp b/engines/neverhood/modules/module2500_sprites.cpp index ab6b3dcfbe..989847223e 100644 --- a/engines/neverhood/modules/module2500_sprites.cpp +++ b/engines/neverhood/modules/module2500_sprites.cpp @@ -81,7 +81,7 @@ KmScene2501::KmScene2501(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 uint32 KmScene2501::xHandleMessage(int messageNum, const MessageParam ¶m) { uint32 messageResult = 0; switch (messageNum) { - case 0x2000: + case NM_ANIMATION_UPDATE: _isSittingInTeleporter = param.asInteger() != 0; messageResult = 1; break; diff --git a/engines/neverhood/modules/module2600.cpp b/engines/neverhood/modules/module2600.cpp index a6484a4926..d45d1bb420 100644 --- a/engines/neverhood/modules/module2600.cpp +++ b/engines/neverhood/modules/module2600.cpp @@ -243,7 +243,7 @@ uint32 Scene2609::handleMessage(int messageNum, const MessageParam ¶m, Entit if ((param.asPoint().x <= 20 || param.asPoint().x >= 620) && !_isBusy) leaveScene(0); break; - case 0x2000: + case NM_ANIMATION_UPDATE: _isBusy = true; break; case 0x2001: diff --git a/engines/neverhood/modules/module2800.cpp b/engines/neverhood/modules/module2800.cpp index d51515ce81..b71fcab49c 100644 --- a/engines/neverhood/modules/module2800.cpp +++ b/engines/neverhood/modules/module2800.cpp @@ -779,10 +779,10 @@ void Scene2803::upKlaymenStairs() { uint32 Scene2803::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x480F: + case NM_LEVER_DOWN: toggleBackground(); // NOTE Intentional fall-through - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x84251F82) setMessageList(0x004B7A50); else if (param.asInteger() == 0x4254A2D2) @@ -1015,7 +1015,7 @@ Scene2803Small::Scene2803Small(NeverhoodEngine *vm, Module *parentModule, int wh uint32 Scene2803Small::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0xB4E4884C) { setMessageList(0x004B6180); } else if (param.asInteger() == 0xB1FDAB2E) { @@ -1211,7 +1211,7 @@ uint32 Scene2804::handleMessage(int messageNum, const MessageParam ¶m, Entit leaveScene(0); } break; - case 0x2000: + case NM_ANIMATION_UPDATE: _isWorking = true; sendMessage(_asCoil, 0x2002, 0); if (getGlobalVar(V_SHRINK_LIGHTS_ON)) { @@ -1317,7 +1317,7 @@ Scene2805::Scene2805(NeverhoodEngine *vm, Module *parentModule, int which) uint32 Scene2805::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2000: + case NM_ANIMATION_UPDATE: if (param.asInteger()) { setRectList(0x004AE318); _klaymen->setKlaymenIdleTable3(); @@ -1407,12 +1407,12 @@ Scene2806::Scene2806(NeverhoodEngine *vm, Module *parentModule, int which) uint32 Scene2806::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x44262B12) { setMessageList(0x004AF0E0); } break; - case 0x2000: + case NM_ANIMATION_UPDATE: sendMessage(_asSpew, 0x2000, 0); break; } @@ -1562,7 +1562,7 @@ uint32 Scene2808::handleMessage(int messageNum, const MessageParam ¶m, Entit leaveScene(1); } break; - case 0x2000: + case NM_ANIMATION_UPDATE: if (!_isFlowing) _asTestTubes[param.asInteger()]->fill(); break; @@ -1697,12 +1697,12 @@ void Scene2809::update() { uint32 Scene2809::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x160DA937) { setMessageList(0x004B5B98); } break; - case 0x2000: + case NM_ANIMATION_UPDATE: sendMessage(_asSpew, 0x2000, 0); break; } @@ -1904,7 +1904,7 @@ void Scene2810::insertKlaymenLadder() { uint32 Scene2810::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0xE574F14C) setMessageList(0x004AE458); else if (param.asInteger() == 0x7214A05C || param.asInteger() == 0x2905E574) @@ -1934,7 +1934,7 @@ uint32 Scene2810::handleMessage(int messageNum, const MessageParam ¶m, Entit else if (param.asInteger() == 0x2064294C || param.asInteger() == 0x2194E053) setMessageList(0x004AE688); break; - case 0x2000: + case NM_ANIMATION_UPDATE: setRectList(0x004AE800); _isRopingDown = true; break; @@ -2037,7 +2037,7 @@ void Scene2812::update() { uint32 Scene2812::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x0004269B) sendEntityMessage(_klaymen, 0x1014, _asRope); break; diff --git a/engines/neverhood/modules/module2800_sprites.cpp b/engines/neverhood/modules/module2800_sprites.cpp index a600c55dd3..14273abc2d 100644 --- a/engines/neverhood/modules/module2800_sprites.cpp +++ b/engines/neverhood/modules/module2800_sprites.cpp @@ -40,13 +40,13 @@ AsScene2803LightCord::AsScene2803LightCord(NeverhoodEngine *vm, Scene *parentSce uint32 AsScene2803LightCord::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (!_isBusy && param.asInteger() == calcHash("ClickSwitch")) { - sendMessage(_parentScene, 0x480F, 0); + sendMessage(_parentScene, NM_LEVER_DOWN, 0); playSound(0, 0x4E1CA4A0); } break; - case 0x480F: + case NM_LEVER_DOWN: stPulled(); break; case 0x482A: @@ -62,7 +62,7 @@ uint32 AsScene2803LightCord::handleMessage(int messageNum, const MessageParam &p uint32 AsScene2803LightCord::hmPulled(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; } @@ -107,7 +107,7 @@ AsScene2803TestTubeOne::AsScene2803TestTubeOne(NeverhoodEngine *vm, uint32 fileH uint32 AsScene2803TestTubeOne::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2000: + case NM_ANIMATION_UPDATE: if (param.asInteger()) startAnimation(_fileHash2, 0, -1); else @@ -133,7 +133,7 @@ AsScene2803Rope::AsScene2803Rope(NeverhoodEngine *vm, Scene *parentScene, int16 uint32 AsScene2803Rope::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: startAnimation(0x9D098C23, 50, -1); SetMessageHandler(&AsScene2803Rope::hmReleased); break; @@ -150,7 +150,7 @@ uint32 AsScene2803Rope::handleMessage(int messageNum, const MessageParam ¶m, uint32 AsScene2803Rope::hmReleased(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; case 0x482A: @@ -509,7 +509,7 @@ void AsScene2804BeamCoil::stBeaming() { uint32 AsScene2804BeamCoil::hmBeaming(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; } @@ -561,12 +561,12 @@ AsScene2806Spew::AsScene2806Spew(NeverhoodEngine *vm) uint32 AsScene2806Spew::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2000: + case NM_ANIMATION_UPDATE: playSound(0, 0x48640244); startAnimation(0x04211490, 0, -1); setVisible(true); break; - case 0x3002: + case NM_ANIMATION_STOP: stopAnimation(); setVisible(false); break; @@ -774,7 +774,7 @@ uint32 AsScene2808Handle::handleMessage(int messageNum, const MessageParam ¶ uint32 AsScene2808Handle::hmActivating(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; } @@ -817,7 +817,7 @@ AsScene2808Flow::AsScene2808Flow(NeverhoodEngine *vm, Scene *parentScene, int te uint32 AsScene2808Flow::hmFlowing(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; } @@ -875,12 +875,12 @@ AsScene2809Spew::AsScene2809Spew(NeverhoodEngine *vm) uint32 AsScene2809Spew::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2000: + case NM_ANIMATION_UPDATE: playSound(0, 0x48640244); startAnimation(0x04211490, 0, -1); setVisible(true); break; - case 0x3002: + case NM_ANIMATION_STOP: stopAnimation(); setVisible(false); break; @@ -903,7 +903,7 @@ AsScene2810Rope::AsScene2810Rope(NeverhoodEngine *vm, Scene *parentScene, int16 uint32 AsScene2810Rope::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: startAnimation(0x9D098C23, 35, 53); break; case 0x482A: @@ -934,13 +934,13 @@ AsScene2812Winch::~AsScene2812Winch() { uint32 AsScene2812Winch::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2000: + case NM_ANIMATION_UPDATE: startAnimation(0x20DA08A0, 0, -1); setVisible(true); _vm->_soundMan->addSound(0x00B000E2, 0xC874EE6C); _vm->_soundMan->playSoundLooping(0xC874EE6C); break; - case 0x3002: + case NM_ANIMATION_STOP: startAnimation(0x20DA08A0, 7, -1); break; } @@ -979,7 +979,7 @@ uint32 AsScene2812Rope::handleMessage(int messageNum, const MessageParam ¶m, uint32 AsScene2812Rope::hmRopingDown(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; } @@ -1002,7 +1002,7 @@ AsScene2812TrapDoor::AsScene2812TrapDoor(NeverhoodEngine *vm) uint32 AsScene2812TrapDoor::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2000: + case NM_ANIMATION_UPDATE: startAnimation(0x805D0029, 0, -1); playSound(0, 0xEA005F40); _newStickFrameIndex = STICK_LAST_FRAME; @@ -1026,7 +1026,7 @@ uint32 KmScene2801::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4004: GotoState(&Klaymen::stTryStandIdle); break; - case 0x4812: + case NM_KLAYMEN_PICKUP: GotoState(&Klaymen::stPickUpGeneric); break; case 0x4817: @@ -1198,7 +1198,7 @@ uint32 KmScene2803Small::xHandleMessage(int messageNum, const MessageParam ¶ uint32 KmScene2803Small::hmShrink(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender); switch (messageNum) { - case 0x100D: + case NM_ANIMATION_START: if (param.asInteger() == 0x80C110B5) sendMessage(_parentScene, 0x482A, 0); else if (param.asInteger() == 0x33288344) @@ -1227,7 +1227,7 @@ KmScene2805::KmScene2805(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 uint32 KmScene2805::xHandleMessage(int messageNum, const MessageParam ¶m) { uint32 messageResult = 0; switch (messageNum) { - case 0x2000: + case NM_ANIMATION_UPDATE: _isSittingInTeleporter = param.asInteger() != 0; messageResult = 1; break; @@ -1310,7 +1310,7 @@ uint32 KmScene2806::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x480D: GotoState(&Klaymen::stPullCord); break; - case 0x4816: + case NM_KLAYMEN_PRESS_BUTTON: if (param.asInteger() == 0) GotoState(&Klaymen::stPressButtonSide); break; @@ -1368,7 +1368,7 @@ uint32 KmScene2809::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x480D: GotoState(&Klaymen::stPullCord); break; - case 0x4816: + case NM_KLAYMEN_PRESS_BUTTON: if (param.asInteger() == 0) GotoState(&Klaymen::stPressButtonSide); break; @@ -1464,7 +1464,7 @@ uint32 KmScene2810::xHandleMessage(int messageNum, const MessageParam ¶m) { if (param.asInteger() == 3) GotoState(&Klaymen::stFinishGrow); break; - case 0x4812: + case NM_KLAYMEN_PICKUP: GotoState(&Klaymen::stPickUpGeneric); break; case 0x4817: @@ -1552,7 +1552,7 @@ uint32 KmScene2812::xHandleMessage(int messageNum, const MessageParam ¶m) { _destY = param.asInteger(); GotoState(&Klaymen::stJumpToGrabFall); break; - case 0x4812: + case NM_KLAYMEN_PICKUP: if (param.asInteger() == 2) GotoState(&Klaymen::stPickUpNeedle); else if (param.asInteger() == 1) @@ -1564,7 +1564,7 @@ uint32 KmScene2812::xHandleMessage(int messageNum, const MessageParam ¶m) { setDoDeltaX(param.asInteger()); gotoNextStateExt(); break; - case 0x481A: + case NM_KLAYMEN_INSERT_DISK: GotoState(&Klaymen::stInsertDisk); break; case 0x481B: diff --git a/engines/neverhood/modules/module2900.cpp b/engines/neverhood/modules/module2900.cpp index bb0b69f35d..a68be3994f 100644 --- a/engines/neverhood/modules/module2900.cpp +++ b/engines/neverhood/modules/module2900.cpp @@ -215,7 +215,7 @@ uint32 Scene2901::handleMessage(int messageNum, const MessageParam ¶m, Entit if (param.asPoint().x <= 20 || param.asPoint().x >= 620) leaveScene((uint32)-1); break; - case 0x2000: + case NM_ANIMATION_UPDATE: if (_currLocationButtonNum != _selectedButtonNum) leaveScene(_selectedButtonNum); break; diff --git a/engines/neverhood/modules/module3000.cpp b/engines/neverhood/modules/module3000.cpp index a12776611e..33b56018c4 100644 --- a/engines/neverhood/modules/module3000.cpp +++ b/engines/neverhood/modules/module3000.cpp @@ -558,7 +558,7 @@ uint32 Scene3009::handleMessage(int messageNum, const MessageParam ¶m, Entit leaveScene(0); } break; - case 0x2000: + case NM_ANIMATION_UPDATE: if (!getGlobalVar(V_CANNON_RAISED)) { if (!getGlobalVar(V_WALL_BROKEN)) { _cannonTargetStatus = kCTSBreakWall; @@ -749,7 +749,7 @@ uint32 Scene3010::handleMessage(int messageNum, const MessageParam ¶m, Entit } } break; - case 0x2000: + case NM_ANIMATION_UPDATE: if (!_boltUnlocked[param.asInteger()] && !_checkUnlocked && _countdown == 0) { _asDeadBolts[param.asInteger()]->unlock(false); _boltUnlocking[param.asInteger()] = true; @@ -858,7 +858,7 @@ uint32 Scene3011::handleMessage(int messageNum, const MessageParam ¶m, Entit leaveScene(0); } break; - case 0x2000: + case NM_ANIMATION_UPDATE: _buttonClicked = true; if (_countdown == 0) _countdown = 1; diff --git a/engines/neverhood/modules/module3000_sprites.cpp b/engines/neverhood/modules/module3000_sprites.cpp index 7d0162d7d0..5e675f6ecb 100644 --- a/engines/neverhood/modules/module3000_sprites.cpp +++ b/engines/neverhood/modules/module3000_sprites.cpp @@ -565,7 +565,7 @@ void AsScene3010DeadBolt::update() { uint32 AsScene3010DeadBolt::hmAnimation(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x3002: + case NM_ANIMATION_STOP: gotoNextState(); break; } diff --git a/engines/neverhood/navigationscene.cpp b/engines/neverhood/navigationscene.cpp index a15c00de07..a1eb66d63e 100644 --- a/engines/neverhood/navigationscene.cpp +++ b/engines/neverhood/navigationscene.cpp @@ -114,11 +114,11 @@ uint32 NavigationScene::handleMessage(int messageNum, const MessageParam ¶m, if (_interactive) handleNavigation(param.asPoint()); break; - case 0x0009: + case NM_KEYPRESS_SPACE: if (!_interactive) _smackerDone = true; break; - case 0x3002: + case NM_ANIMATION_STOP: _smackerDone = true; break; } diff --git a/engines/neverhood/scene.cpp b/engines/neverhood/scene.cpp index 9a7e87ac8d..b3a2194716 100644 --- a/engines/neverhood/scene.cpp +++ b/engines/neverhood/scene.cpp @@ -451,7 +451,7 @@ void Scene::processMessageList() { _isKlaymenBusy = true; sendPointMessage(_klaymen, 0x4001, _mouseClickPos); } else if (messageNum == 0x100D) { - if (this->hasMessageHandler() && sendMessage(this, 0x100D, messageParam) != 0) + if (this->hasMessageHandler() && sendMessage(this, NM_ANIMATION_START, messageParam) != 0) continue; } else if (messageNum == 0x101A) { _messageListStatus = 0; diff --git a/engines/neverhood/smackerplayer.cpp b/engines/neverhood/smackerplayer.cpp index 187939faee..4b4982f68e 100644 --- a/engines/neverhood/smackerplayer.cpp +++ b/engines/neverhood/smackerplayer.cpp @@ -204,7 +204,7 @@ void SmackerPlayer::update() { } else if (!_keepLastFrame) { // Inform the scene about the end of the video playback if (_scene) - sendMessage(_scene, 0x3002, 0); + sendMessage(_scene, NM_ANIMATION_STOP, 0); _videoDone = true; } else { rewind(); diff --git a/engines/neverhood/smackerscene.cpp b/engines/neverhood/smackerscene.cpp index d9d032a3b5..c3915200b5 100644 --- a/engines/neverhood/smackerscene.cpp +++ b/engines/neverhood/smackerscene.cpp @@ -104,15 +104,15 @@ void SmackerScene::update() { uint32 SmackerScene::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0009: + case NM_KEYPRESS_SPACE: if ((_videoPlayedBefore && _canSkip) || (_canAbort && _canSkip)) _playNextVideoFlag = true; break; - case 0x000C: + case NM_KEYPRESS_ESC: if (_canAbort) sendMessage(_parentModule, 0x1009, 0); break; - case 0x3002: + case NM_ANIMATION_STOP: _playNextVideoFlag = true; break; } diff --git a/engines/neverhood/sprite.cpp b/engines/neverhood/sprite.cpp index 1a432461fb..05fc9b256f 100644 --- a/engines/neverhood/sprite.cpp +++ b/engines/neverhood/sprite.cpp @@ -372,7 +372,7 @@ void AnimatedSprite::updateFrameIndex() { } else { // Inform self about end of current animation // The caller can then e.g. set a new animation fileHash - sendMessage(this, 0x3002, 0); + sendMessage(this, NM_ANIMATION_STOP, 0); if (_newAnimFileHash == 0) _currFrameIndex = 0; } @@ -380,7 +380,7 @@ void AnimatedSprite::updateFrameIndex() { if (_currFrameIndex > 0) { _currFrameIndex--; } else { - sendMessage(this, 0x3002, 0); + sendMessage(this, NM_ANIMATION_STOP, 0); if (_newAnimFileHash == 0) _currFrameIndex = _lastFrameIndex; } @@ -399,7 +399,7 @@ void AnimatedSprite::updateFrameInfo() { updateBounds(); _needRefresh = true; if (frameInfo.frameHash != 0) - sendMessage(this, 0x100D, frameInfo.frameHash); + sendMessage(this, NM_ANIMATION_START, frameInfo.frameHash); } void AnimatedSprite::createSurface1(uint32 fileHash, int surfacePriority) { -- cgit v1.2.3 From 962e2fd550bad06bf3328a0964d29f79b7da242d Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 25 Dec 2013 17:10:14 +0200 Subject: NEVERHOOD: Change more message values to enums --- engines/neverhood/diskplayerscene.cpp | 2 +- engines/neverhood/gamemodule.cpp | 6 +- engines/neverhood/klaymen.cpp | 62 ++++----- engines/neverhood/menumodule.cpp | 4 +- engines/neverhood/messages.h | 35 ++++- engines/neverhood/modules/module1000.cpp | 30 ++--- engines/neverhood/modules/module1000_sprites.cpp | 158 +++++++++++------------ engines/neverhood/modules/module1100.cpp | 4 +- engines/neverhood/modules/module1100_sprites.cpp | 8 +- engines/neverhood/modules/module1200.cpp | 10 +- engines/neverhood/modules/module1200_sprites.cpp | 22 ++-- engines/neverhood/modules/module1300.cpp | 80 ++++++------ engines/neverhood/modules/module1300_sprites.cpp | 42 +++--- engines/neverhood/modules/module1400.cpp | 30 ++--- engines/neverhood/modules/module1400_sprites.cpp | 62 ++++----- engines/neverhood/modules/module1600.cpp | 20 +-- engines/neverhood/modules/module1600_sprites.cpp | 56 ++++---- engines/neverhood/modules/module1700_sprites.cpp | 8 +- engines/neverhood/modules/module1900.cpp | 2 +- engines/neverhood/modules/module1900_sprites.cpp | 10 +- engines/neverhood/modules/module2000_sprites.cpp | 6 +- engines/neverhood/modules/module2100.cpp | 8 +- engines/neverhood/modules/module2100_sprites.cpp | 14 +- engines/neverhood/modules/module2200.cpp | 30 ++--- engines/neverhood/modules/module2200_sprites.cpp | 72 +++++------ engines/neverhood/modules/module2400.cpp | 10 +- engines/neverhood/modules/module2400_sprites.cpp | 16 +-- engines/neverhood/modules/module2500.cpp | 24 ++-- engines/neverhood/modules/module2500_sprites.cpp | 6 +- engines/neverhood/modules/module2600.cpp | 2 +- engines/neverhood/modules/module2700.cpp | 62 ++++----- engines/neverhood/modules/module2800.cpp | 32 ++--- engines/neverhood/modules/module2800_sprites.cpp | 88 ++++++------- engines/neverhood/modules/module2900.cpp | 2 +- engines/neverhood/modules/module3000.cpp | 6 +- engines/neverhood/modules/module3000_sprites.cpp | 4 +- engines/neverhood/navigationscene.cpp | 4 +- engines/neverhood/scene.cpp | 20 ++- 38 files changed, 540 insertions(+), 517 deletions(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/diskplayerscene.cpp b/engines/neverhood/diskplayerscene.cpp index 80aff269cf..7513034bf3 100644 --- a/engines/neverhood/diskplayerscene.cpp +++ b/engines/neverhood/diskplayerscene.cpp @@ -442,7 +442,7 @@ uint32 DiskplayerScene::handleMessage(int messageNum, const MessageParam ¶m, Scene::handleMessage(messageNum, param, sender); if (!_inputDisabled) { switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: if (param.asPoint().x <= 20 || param.asPoint().x >= 620) { sendMessage(_parentModule, 0x1009, 0); } else if (!_dropKey && diff --git a/engines/neverhood/gamemodule.cpp b/engines/neverhood/gamemodule.cpp index 54205f23d7..31eee4da55 100644 --- a/engines/neverhood/gamemodule.cpp +++ b/engines/neverhood/gamemodule.cpp @@ -105,7 +105,7 @@ void GameModule::handleMouseDown(int16 x, int16 y) { mousePos.x = x; mousePos.y = y; debug(2, "GameModule::handleMouseDown(%d, %d)", x, y); - sendPointMessage(_childObject, 0x0001, mousePos); + sendPointMessage(_childObject, NM_MOUSE_CLICK, mousePos); } } @@ -781,7 +781,7 @@ void GameModule::updateModule() { void GameModule::openMainMenu() { if (_childObject) { - sendMessage(_childObject, 0x101D, 0); + sendMessage(_childObject, NM_MOUSE_HIDE, 0); _childObject->draw(); } else { // If there's no module, create one so there's something to return to @@ -807,7 +807,7 @@ void GameModule::updateMenuModule() { if (!updateChild()) { _vm->_screen->restoreParams(); _childObject = _prevChildObject; - sendMessage(_childObject, 0x101E, 0); + sendMessage(_childObject, NM_MOUSE_SHOW, 0); _prevChildObject = NULL; _moduleNum = _prevModuleNum; SetUpdateHandler(&GameModule::updateModule); diff --git a/engines/neverhood/klaymen.cpp b/engines/neverhood/klaymen.cpp index e1be606dab..e8b3711e84 100644 --- a/engines/neverhood/klaymen.cpp +++ b/engines/neverhood/klaymen.cpp @@ -77,7 +77,7 @@ uint32 Klaymen::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; case 0x4818: @@ -335,7 +335,7 @@ uint32 Klaymen::hmPickUpTube(int messageNum, const MessageParam ¶m, Entity * switch (messageNum) { case NM_ANIMATION_START: if (param.asInteger() == 0xC1380080) { - sendMessage(_attachedSprite, 0x4806, 0); + sendMessage(_attachedSprite, NM_KLAYMEN_USE_OBJECT, 0); playSound(0, 0xC8004340); } else if (param.asInteger() == 0x02B20220) { playSound(0, 0xC5408620); @@ -518,7 +518,7 @@ uint32 Klaymen::hmLowLevel(int messageNum, const MessageParam ¶m, Entity *se case 0x1014: _attachedSprite = (Sprite*)(param.asEntity()); break; - case 0x1019: + case NM_SCENE_LEAVE: gotoNextStateExt(); break; case 0x101C: @@ -861,7 +861,7 @@ void Klaymen::suWalkingTestExit() { (_actionStatus != 2 && _actionStatus != 3 && xdiff <= 10 && (_currFrameIndex >= 12 || _currFrameIndex <= 4)) || (_actionStatus == 3 && xdiff < 30) || (_actionStatus == 3 && xdiff < 150 && _currFrameIndex >= 6)) { - sendMessage(this, 0x1019, 0); + sendMessage(this, NM_SCENE_LEAVE, 0); } else { HitRect *hitRectPrev = _parentScene->findHitRectAtPos(_x, _y); _x += xdelta; @@ -895,9 +895,9 @@ uint32 Klaymen::hmLever(int messageNum, const MessageParam ¶m, Entity *sende switch (messageNum) { case NM_ANIMATION_START: if (param.asInteger() == 0x4AB28209) { - sendMessage(_attachedSprite, 0x482A, 0); + sendMessage(_attachedSprite, NM_MOVE_TO_BACK, 0); } else if (param.asInteger() == 0x88001184) { - sendMessage(_attachedSprite, 0x482B, 0); + sendMessage(_attachedSprite, NM_MOVE_TO_FRONT, 0); } break; } @@ -921,7 +921,7 @@ uint32 Klaymen::hmPickUpObject(int messageNum, const MessageParam ¶m, Entity switch (messageNum) { case NM_ANIMATION_START: if (param.asInteger() == 0xC1380080) { - sendMessage(_attachedSprite, 0x4806, 0); + sendMessage(_attachedSprite, NM_KLAYMEN_USE_OBJECT, 0); playSound(0, 0x40208200); } else if (param.asInteger() == 0x02B20220) { playSound(0, 0xC5408620); @@ -1107,9 +1107,9 @@ uint32 Klaymen::hmWalkFrontBackSmall(int messageNum, const MessageParam ¶m, switch (messageNum) { case NM_ANIMATION_START: if (param.asInteger() == 0x80C110B5) - sendMessage(_parentScene, 0x482A, 0); + sendMessage(_parentScene, NM_MOVE_TO_BACK, 0); else if (param.asInteger() == 0x110010D1) - sendMessage(_parentScene, 0x482B, 0); + sendMessage(_parentScene, NM_MOVE_TO_FRONT, 0); else if (param.asInteger() == 0x32180101) playSound(0, 0x4924AAC4); else if (param.asInteger() == 0x0A2A9098) @@ -1189,10 +1189,10 @@ uint32 Klaymen::hmPullReleaseCord(int messageNum, const MessageParam ¶m, Ent switch (messageNum) { case NM_ANIMATION_START: if (param.asInteger() == 0x4AB28209) { - sendMessage(_attachedSprite, 0x482A, 0); - sendMessage(_attachedSprite, NM_LEVER_DOWN, 0); + sendMessage(_attachedSprite, NM_MOVE_TO_BACK, 0); + sendMessage(_attachedSprite, NM_KLAYMEN_LOWER_LEVER, 0); } else if (param.asInteger() == 0x88001184) { - sendMessage(_attachedSprite, 0x482B, 0); + sendMessage(_attachedSprite, NM_MOVE_TO_FRONT, 0); } break; } @@ -1479,7 +1479,7 @@ void Klaymen::suUpdateDestX() { void Klaymen::stReleaseRing() { _busyStatus = 1; _acceptInput = false; - sendMessage(_attachedSprite, NM_LEVER_UP, 0); + sendMessage(_attachedSprite, NM_KLAYMEN_RAISE_LEVER, 0); _attachedSprite = NULL; startAnimation(0xB869A4B9, 0, -1); SetUpdateHandler(&Klaymen::update); @@ -1588,11 +1588,11 @@ uint32 Klaymen::hmClimbLadderUpDown(int messageNum, const MessageParam ¶m, E if (_ladderStatus == 1) { startAnimationByHash(0x3A292504, 0x01084280, 0); if (_destY >= _y - 30) - sendMessage(this, 0x1019, 0); + sendMessage(this, NM_SCENE_LEAVE, 0); } else { startAnimationByHash(0x122D1505, 0x01084280, 0); if (_destY <= _y) - sendMessage(this, 0x1019, 0); + sendMessage(this, NM_SCENE_LEAVE, 0); } } break; @@ -1641,9 +1641,9 @@ uint32 Klaymen::hmWalkToFront(int messageNum, const MessageParam ¶m, Entity switch (messageNum) { case NM_ANIMATION_START: if (param.asInteger() == 0x80C110B5) { - sendMessage(_parentScene, 0x482A, 0); + sendMessage(_parentScene, NM_MOVE_TO_BACK, 0); } else if (param.asInteger() == 0x110010D1) { - sendMessage(_parentScene, 0x482B, 0); + sendMessage(_parentScene, NM_MOVE_TO_FRONT, 0); } else if (param.asInteger() == 0x32180101) { playSound(0, _soundFlag ? 0x48498E46 : 0x405002D8); } else if (param.asInteger() == 0x0A2A9098) { @@ -1783,7 +1783,7 @@ void Klaymen::stMoveObjectSkipTurnFaceObject() { } void Klaymen::evMoveObjectTurnDone() { - sendMessage(_attachedSprite, NM_LEVER_UP, 0); + sendMessage(_attachedSprite, NM_KLAYMEN_RAISE_LEVER, 0); } uint32 Klaymen::hmMoveObjectTurn(int messageNum, const MessageParam ¶m, Entity *sender) { @@ -1804,7 +1804,7 @@ uint32 Klaymen::hmMoveObjectTurn(int messageNum, const MessageParam ¶m, Enti playSound(0, 0x0460E2FA); } break; - case 0x480A: + case NM_KLAYMEN_MOVE_OBJECT: _isMoveObjectRequested = true; return 0; } @@ -1839,7 +1839,7 @@ void Klaymen::stUseLever() { if (_isLeverDown) { stUseLeverRelease(); } else { - sendMessage(_attachedSprite, 0x482B, 0); + sendMessage(_attachedSprite, NM_MOVE_TO_FRONT, 0); startAnimation(0x0C303040, 0, -1); SetSpriteUpdate(&Klaymen::suUpdateDestX); SetMessageHandler(&Klaymen::hmLever); @@ -1853,7 +1853,7 @@ void Klaymen::stUseLever() { // Exactly the same code as sub420DA0 which was removed void Klaymen::stPullLeverDown() { startAnimation(0x0D318140, 0, -1); - sendMessage(_attachedSprite, NM_LEVER_DOWN, 0); + sendMessage(_attachedSprite, NM_KLAYMEN_LOWER_LEVER, 0); NextState(&Klaymen::stHoldLeverDown); } @@ -1871,7 +1871,7 @@ void Klaymen::stUseLeverRelease() { SetUpdateHandler(&Klaymen::update); SetMessageHandler(&Klaymen::hmLever); SetSpriteUpdate(&Klaymen::suUpdateDestX); - sendMessage(_attachedSprite, NM_LEVER_UP, 0); + sendMessage(_attachedSprite, NM_KLAYMEN_RAISE_LEVER, 0); NextState(&Klaymen::stPullLeverDown); _acceptInput = false; } @@ -1883,7 +1883,7 @@ void Klaymen::stReleaseLever() { SetUpdateHandler(&Klaymen::update); SetMessageHandler(&Klaymen::hmLever); SetSpriteUpdate(&Klaymen::suUpdateDestX); - sendMessage(_attachedSprite, NM_LEVER_UP, 0); + sendMessage(_attachedSprite, NM_KLAYMEN_RAISE_LEVER, 0); NextState(&Klaymen::stLetGoOfLever); _acceptInput = false; _isLeverDown = false; @@ -1898,7 +1898,7 @@ void Klaymen::stLetGoOfLever() { } void Klaymen::evLeverReleasedEvent() { - sendMessage(_attachedSprite, 0x482A, 0); + sendMessage(_attachedSprite, NM_MOVE_TO_BACK, 0); } void Klaymen::stInsertDisk() { @@ -2035,13 +2035,13 @@ uint32 Klaymen::hmJumpToGrab(int messageNum, const MessageParam ¶m, Entity * switch (messageNum) { case NM_ANIMATION_START: if (param.asInteger() == 0x168050A0) - sendMessage(_attachedSprite, 0x4806, 0); + sendMessage(_attachedSprite, NM_KLAYMEN_USE_OBJECT, 0); else if (param.asInteger() == 0x320AC306) startAnimationByHash(0x00AB8C10, 0x01084280, 0); else if (param.asInteger() == 0x4AB28209) - sendMessage(_attachedSprite, 0x482A, 0); + sendMessage(_attachedSprite, NM_MOVE_TO_BACK, 0); else if (param.asInteger() == 0x88001184) - sendMessage(_attachedSprite, 0x482B, 0); + sendMessage(_attachedSprite, NM_MOVE_TO_FRONT, 0); break; } return messageResult; @@ -2086,7 +2086,7 @@ void Klaymen::stJumpToGrabFall() { SetUpdateHandler(&Klaymen::update); SetMessageHandler(&Klaymen::hmJumpToGrab); SetSpriteUpdate(&Klaymen::suJumpToGrab); - sendMessage(_attachedSprite, 0x482B, 0); + sendMessage(_attachedSprite, NM_MOVE_TO_FRONT, 0); } } @@ -2444,7 +2444,7 @@ void Klaymen::suFallDown() { if (hitRect->type == 0x5001) { _y = hitRect->rect.y1; updateBounds(); - sendMessage(this, 0x1019, 0); + sendMessage(this, NM_SCENE_LEAVE, 0); } _parentScene->checkCollision(this, 0xFFFF, 0x4810, 0); } @@ -2511,7 +2511,7 @@ void Klaymen::suFallSkipJump() { if (hitRect->type == 0x5001) { _y = hitRect->rect.y1; updateBounds(); - sendMessage(this, 0x1019, 0); + sendMessage(this, NM_SCENE_LEAVE, 0); } } @@ -2607,7 +2607,7 @@ void Klaymen::stInteractLever() { void Klaymen::stPullLever() { startAnimation(0x0D318140, 0, -1); NextState(&Klaymen::stLookLeverDown); - sendMessage(_attachedSprite, NM_LEVER_DOWN, 0); + sendMessage(_attachedSprite, NM_KLAYMEN_LOWER_LEVER, 0); } void Klaymen::stLookLeverDown() { diff --git a/engines/neverhood/menumodule.cpp b/engines/neverhood/menumodule.cpp index 925b6aaa4a..b6aff48e0e 100644 --- a/engines/neverhood/menumodule.cpp +++ b/engines/neverhood/menumodule.cpp @@ -455,10 +455,10 @@ uint32 CreditsScene::handleMessage(int messageNum, const MessageParam ¶m, En if (param.asInteger() == Common::KEYCODE_ESCAPE && _canAbort) leaveScene(0); break; - case 0x101D: + case NM_MOUSE_HIDE: _ticksDuration = _ticksTime - _vm->_system->getMillis(); break; - case 0x101E: + case NM_MOUSE_SHOW: _ticksTime = _ticksDuration + _vm->_system->getMillis(); break; } diff --git a/engines/neverhood/messages.h b/engines/neverhood/messages.h index 8dd98801e4..e3bd0e0041 100644 --- a/engines/neverhood/messages.h +++ b/engines/neverhood/messages.h @@ -26,19 +26,44 @@ namespace Neverhood { enum NeverhoodMessage { + NM_MOUSE_MOVE = 0x0000, + NM_MOUSE_CLICK = 0x0001, + NM_MOUSE_HIDE = 0x101D, + NM_MOUSE_SHOW = 0x101E, NM_KEYPRESS_SPACE = 0x0009, NM_KEYPRESS_ESC = 0x000C, NM_ANIMATION_START = 0x100D, + NM_SCENE_LEAVE = 0x1019, + NM_PRIORITY_CHANGE = 0x1022, NM_ANIMATION_UPDATE = 0x2000, + NM_KLAYMEN_CLIMB_LADDER = 0x2005, + NM_KLAYMEN_STOP_CLIMBING = 0x2006, + + NM_CAR_MOVE_TO_PREV_POINT = 0x2007, + NM_CAR_MOVE_TO_NEXT_POINT = 0x2008, + NM_CAR_ENTER = 0x2009, + NM_CAR_LEAVE = 0x200A, + NM_CAR_TURN = 0x200E, + NM_CAR_AT_HOME = 0x200F, + NM_ANIMATION_STOP = 0x3002, - NM_LEVER_UP = 0x4807, - NM_DOOR_OPEN = 0x4808, - NM_DOOR_CLOSE = 0x4809, - NM_LEVER_DOWN = 0x480F, + + NM_KLAYMEN_STAND_IDLE = 0x4004, + NM_KLAYMEN_USE_OBJECT = 0x4806, + NM_KLAYMEN_RAISE_LEVER = 0x4807, + NM_KLAYMEN_OPEN_DOOR = 0x4808, + NM_KLAYMEN_CLOSE_DOOR = 0x4809, + NM_KLAYMEN_MOVE_OBJECT = 0x480A, + NM_KLAYMEN_LOWER_LEVER = 0x480F, NM_KLAYMEN_PICKUP = 0x4812, NM_KLAYMEN_PRESS_BUTTON = 0x4816, NM_KLAYMEN_INSERT_DISK = 0x481A, - NM_KLAYMEN_RELEASE_LEVER = 0x4827 + NM_KLAYMEN_TURN_TO_USE = 0x481D, + NM_KLAYMEN_RETURN_FROM_USE = 0x481E, + NM_KLAYMEN_RELEASE_LEVER = 0x4827, + + NM_MOVE_TO_BACK = 0x482A, + NM_MOVE_TO_FRONT = 0x482B }; } // End of namespace Neverhood diff --git a/engines/neverhood/modules/module1000.cpp b/engines/neverhood/modules/module1000.cpp index 15426a5de3..f71941bcd4 100644 --- a/engines/neverhood/modules/module1000.cpp +++ b/engines/neverhood/modules/module1000.cpp @@ -220,7 +220,7 @@ uint32 Scene1001::handleMessage(int messageNum, const MessageParam ¶m, Entit case 0x480B: sendMessage(_asWindow, 0x2001, 0); break; - case NM_LEVER_DOWN: + case NM_KLAYMEN_LOWER_LEVER: sendMessage(_asHammer, 0x2000, 0); break; } @@ -317,7 +317,7 @@ Scene1002::Scene1002(NeverhoodEngine *vm, Module *parentModule, int which) _asVenusFlyTrap = insertSprite(this, _klaymen, false); addCollisionSprite(_asVenusFlyTrap); - sendEntityMessage(_klaymen, 0x2007, _asVenusFlyTrap); + sendEntityMessage(_klaymen, NM_CAR_MOVE_TO_PREV_POINT, _asVenusFlyTrap); _asOutsideDoorBackground = insertSprite(); @@ -398,15 +398,15 @@ uint32 Scene1002::handleMessage(int messageNum, const MessageParam ¶m, Entit case 0x2002: _messageList = NULL; break; - case 0x2005: + case NM_KLAYMEN_CLIMB_LADDER: _isClimbingLadder = true; setRectList(0x004B4418); break; - case 0x2006: + case NM_KLAYMEN_STOP_CLIMBING: _isClimbingLadder = false; setRectList(0x004B43A0); break; - case 0x4806: + case NM_KLAYMEN_USE_OBJECT: if (sender == _asRing1) { setGlobalVar(V_RADIO_ENABLED, 0); playSound(0, 0x665198C0); @@ -416,8 +416,8 @@ uint32 Scene1002::handleMessage(int messageNum, const MessageParam ¶m, Entit } else if (sender == _asRing3) { setGlobalVar(V_RADIO_ENABLED, 0); playSound(1); - sendMessage(_asDoor, NM_DOOR_OPEN, 0); - sendMessage(_asOutsideDoorBackground, NM_DOOR_OPEN, 0); + sendMessage(_asDoor, NM_KLAYMEN_OPEN_DOOR, 0); + sendMessage(_asOutsideDoorBackground, NM_KLAYMEN_OPEN_DOOR, 0); } else if (sender == _asRing4) { setGlobalVar(V_RADIO_ENABLED, 0); playSound(0, 0xE0558848); @@ -426,25 +426,25 @@ uint32 Scene1002::handleMessage(int messageNum, const MessageParam ¶m, Entit playSound(0, 0x44014282); } break; - case NM_LEVER_UP: + case NM_KLAYMEN_RAISE_LEVER: if (sender == _asRing3) { playSound(2); - sendMessage(_asDoor, NM_DOOR_CLOSE, 0); - sendMessage(_asOutsideDoorBackground, NM_DOOR_CLOSE, 0); + sendMessage(_asDoor, NM_KLAYMEN_CLOSE_DOOR, 0); + sendMessage(_asOutsideDoorBackground, NM_KLAYMEN_CLOSE_DOOR, 0); } else if (sender == _asVenusFlyTrap) { if (getGlobalVar(V_FLYTRAP_RING_DOOR)) { - sendMessage(_asRing3, NM_LEVER_UP, 0); + sendMessage(_asRing3, NM_KLAYMEN_RAISE_LEVER, 0); } } break; case 0x480B: sendEntityMessage(_klaymen, 0x1014, _asDoorSpy); break; - case NM_LEVER_DOWN: + case NM_KLAYMEN_LOWER_LEVER: setGlobalVar(V_RADIO_ENABLED, 0); playSound(1); - sendMessage(_asDoor, NM_DOOR_OPEN, 0); - sendMessage(_asOutsideDoorBackground, NM_DOOR_OPEN, 0); + sendMessage(_asDoor, NM_KLAYMEN_OPEN_DOOR, 0); + sendMessage(_asOutsideDoorBackground, NM_KLAYMEN_OPEN_DOOR, 0); break; case 0x8000: setSpriteSurfacePriority(_ssCeiling, 995); @@ -581,7 +581,7 @@ Scene1005::Scene1005(NeverhoodEngine *vm, Module *parentModule, int which) uint32 Scene1005::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: if (param.asPoint().x <= 20 || param.asPoint().x >= 620) leaveScene(0); break; diff --git a/engines/neverhood/modules/module1000_sprites.cpp b/engines/neverhood/modules/module1000_sprites.cpp index 4238040fbe..a950bb0334 100644 --- a/engines/neverhood/modules/module1000_sprites.cpp +++ b/engines/neverhood/modules/module1000_sprites.cpp @@ -182,7 +182,7 @@ uint32 AsScene1001Lever::handleMessage(int messageNum, const MessageParam ¶m switch (messageNum) { case NM_ANIMATION_START: if (param.asInteger() == 0x00C0C444) - sendMessage(_parentScene, NM_LEVER_DOWN, 0); + sendMessage(_parentScene, NM_KLAYMEN_LOWER_LEVER, 0); else if (param.asInteger() == 0xC41A02C0) playSound(0, 0x40581882); break; @@ -194,14 +194,14 @@ uint32 AsScene1001Lever::handleMessage(int messageNum, const MessageParam ¶m startAnimation(0x04A98C36, 0, -1); _newStickFrameIndex = 0; break; - case NM_LEVER_DOWN: + case NM_KLAYMEN_LOWER_LEVER: startAnimation(0x04A98C36, 0, -1); break; - case 0x482A: - sendMessage(_parentScene, 0x1022, 990); + case NM_MOVE_TO_BACK: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 990); break; - case 0x482B: - sendMessage(_parentScene, 0x1022, 1010); + case NM_MOVE_TO_FRONT: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 1010); break; } return messageResult; @@ -272,23 +272,23 @@ void AsScene1002Ring::update() { uint32 AsScene1002Ring::hmRingIdle(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x4806: + case NM_KLAYMEN_USE_OBJECT: setDoDeltaX(((Sprite*)sender)->isDoDeltaX() ? 1 : 0); - sendMessage(_parentScene, 0x4806, 0); + sendMessage(_parentScene, NM_KLAYMEN_USE_OBJECT, 0); SetMessageHandler(&AsScene1002Ring::hmRingPulled1); startAnimation(_isSpecial ? 0x87502558 : 0x80DD4010, 0, -1); break; - case NM_LEVER_DOWN: + case NM_KLAYMEN_LOWER_LEVER: setDoDeltaX(((Sprite*)sender)->isDoDeltaX() ? 1 : 0); - sendMessage(_parentScene, NM_LEVER_DOWN, 0); + sendMessage(_parentScene, NM_KLAYMEN_LOWER_LEVER, 0); SetMessageHandler(&AsScene1002Ring::hmRingPulled2); startAnimation(0x861A2020, 0, -1); break; - case 0x482A: - sendMessage(_parentScene, 0x1022, 990); + case NM_MOVE_TO_BACK: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 990); break; - case 0x482B: - sendMessage(_parentScene, 0x1022, 1010); + case NM_MOVE_TO_FRONT: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 1010); break; } return messageResult; @@ -301,17 +301,17 @@ uint32 AsScene1002Ring::hmRingPulled1(int messageNum, const MessageParam ¶m, startAnimation(_isSpecial ? 0x78D0A812 : 0xB85D2A10, 0, -1); SetMessageHandler(&AsScene1002Ring::hmRingHangingLow); break; - case NM_LEVER_UP: - sendMessage(_parentScene, NM_LEVER_UP, 0); + case NM_KLAYMEN_RAISE_LEVER: + sendMessage(_parentScene, NM_KLAYMEN_RAISE_LEVER, 0); setDoDeltaX(_vm->_rnd->getRandomNumber(1)); startAnimation(0x8258A030, 0, -1); SetMessageHandler(&AsScene1002Ring::hmRingReleased); break; - case 0x482A: - sendMessage(_parentScene, 0x1022, 990); + case NM_MOVE_TO_BACK: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 990); break; - case 0x482B: - sendMessage(_parentScene, 0x1022, 1010); + case NM_MOVE_TO_FRONT: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 1010); break; } return messageResult; @@ -324,11 +324,11 @@ uint32 AsScene1002Ring::hmRingPulled2(int messageNum, const MessageParam ¶m, startAnimation(0x04103090, 0, -1); SetMessageHandler(&AsScene1002Ring::hmRingHangingLow); break; - case 0x482A: - sendMessage(_parentScene, 0x1022, 990); + case NM_MOVE_TO_BACK: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 990); break; - case 0x482B: - sendMessage(_parentScene, 0x1022, 1010); + case NM_MOVE_TO_FRONT: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 1010); break; } return messageResult; @@ -337,17 +337,17 @@ uint32 AsScene1002Ring::hmRingPulled2(int messageNum, const MessageParam ¶m, uint32 AsScene1002Ring::hmRingHangingLow(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case NM_LEVER_UP: - sendMessage(_parentScene, NM_LEVER_UP, 0); + case NM_KLAYMEN_RAISE_LEVER: + sendMessage(_parentScene, NM_KLAYMEN_RAISE_LEVER, 0); setDoDeltaX(_vm->_rnd->getRandomNumber(1)); startAnimation(0x8258A030, 0, -1); SetMessageHandler(&AsScene1002Ring::hmRingReleased); break; - case 0x482A: - sendMessage(_parentScene, 0x1022, 990); + case NM_MOVE_TO_BACK: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 990); break; - case 0x482B: - sendMessage(_parentScene, 0x1022, 1010); + case NM_MOVE_TO_FRONT: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 1010); break; } return messageResult; @@ -363,11 +363,11 @@ uint32 AsScene1002Ring::hmRingReleased(int messageNum, const MessageParam ¶m case NM_ANIMATION_STOP: startAnimation(0xA85C4011, 0, -1); break; - case 0x482A: - sendMessage(_parentScene, 0x1022, 990); + case NM_MOVE_TO_BACK: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 990); break; - case 0x482B: - sendMessage(_parentScene, 0x1022, 1010); + case NM_MOVE_TO_FRONT: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 1010); break; } return messageResult; @@ -391,11 +391,11 @@ void AsScene1002Door::update() { uint32 AsScene1002Door::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case NM_DOOR_OPEN: + case NM_KLAYMEN_OPEN_DOOR: setGlobalVar(V_FLYTRAP_RING_DOOR, 1); SetSpriteUpdate(&AsScene1002Door::suOpenDoor); break; - case NM_DOOR_CLOSE: + case NM_KLAYMEN_CLOSE_DOOR: setGlobalVar(V_FLYTRAP_RING_DOOR, 0); SetSpriteUpdate(&AsScene1002Door::suCloseDoor); break; @@ -660,11 +660,11 @@ uint32 AsScene1002VenusFlyTrap::handleMessage(int messageNum, const MessageParam case 0x4810: swallowKlaymen(); break; - case 0x482A: - sendMessage(_parentScene, 0x1022, 995); + case NM_MOVE_TO_BACK: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 995); break; - case 0x482B: - sendMessage(_parentScene, 0x1022, 1015); + case NM_MOVE_TO_FRONT: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 1015); break; } return messageResult; @@ -701,11 +701,11 @@ uint32 AsScene1002VenusFlyTrap::hmAnimationExt(int messageNum, const MessagePara case NM_ANIMATION_STOP: gotoNextState(); break; - case 0x482A: - sendMessage(_parentScene, 0x1022, 995); + case NM_MOVE_TO_BACK: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 995); break; - case 0x482B: - sendMessage(_parentScene, 0x1022, 1015); + case NM_MOVE_TO_FRONT: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 1015); break; } return messageResult; @@ -727,7 +727,7 @@ void AsScene1002VenusFlyTrap::stWalk() { } void AsScene1002VenusFlyTrap::stRelease() { - sendMessage(_parentScene, NM_LEVER_UP, 0); + sendMessage(_parentScene, NM_KLAYMEN_RAISE_LEVER, 0); startAnimation(0x82292851, 0, -1); SetUpdateHandler(&AsScene1002VenusFlyTrap::update); SetMessageHandler(&AsScene1002VenusFlyTrap::hmAnimationSimple); @@ -833,11 +833,11 @@ void AsScene1002OutsideDoorBackground::update() { uint32 AsScene1002OutsideDoorBackground::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageResult) { - case NM_DOOR_OPEN: + case NM_KLAYMEN_OPEN_DOOR: _isDoorClosed = false; _countdown = 2; break; - case NM_DOOR_CLOSE: + case NM_KLAYMEN_CLOSE_DOOR: _isDoorClosed = true; _countdown = 2; break; @@ -932,12 +932,12 @@ uint32 AsScene1002KlaymenPeekHand::handleMessage(int messageNum, const MessagePa switch (messageNum) { case NM_ANIMATION_START: if (param.asInteger() == 0x4AB28209) { - sendMessage(_parentScene, 0x1022, 1200); + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 1200); _isClipRectSaved = true; _savedClipRect = _surface->getClipRect(); setClipRect(0, 0, 640, 480); } else if (param.asInteger() == 0x88001184) { - sendMessage(_parentScene, 0x1022, 1000); + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 1000); if (_isClipRectSaved) setClipRect(_savedClipRect); } @@ -991,7 +991,7 @@ uint32 KmScene1001::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; case 0x4804: @@ -1100,7 +1100,7 @@ uint32 KmScene1001::hmPullHammerLever(int messageNum, const MessageParam ¶m, switch (messageNum) { case NM_ANIMATION_START: if (param.asInteger() == 0x4AB28209) - sendMessage(_attachedSprite, NM_LEVER_DOWN, 0); + sendMessage(_attachedSprite, NM_KLAYMEN_LOWER_LEVER, 0); break; } return messageResult; @@ -1129,14 +1129,14 @@ uint32 KmScene1002::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x2001: GotoState(&Klaymen::stStandIdleSpecial); break; - case 0x2007: + case NM_CAR_MOVE_TO_PREV_POINT: _otherSprite = (Sprite*)param.asEntity(); break; case 0x4001: case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; case 0x4803: @@ -1164,7 +1164,7 @@ uint32 KmScene1002::xHandleMessage(int messageNum, const MessageParam ¶m) { break; } break; - case 0x480A: + case NM_KLAYMEN_MOVE_OBJECT: GotoState(&KmScene1002::stMoveVenusFlyTrap); break; case 0x480D: @@ -1182,21 +1182,21 @@ uint32 KmScene1002::xHandleMessage(int messageNum, const MessageParam ¶m) { startWalkToAttachedSpriteXDistance(param.asInteger()); break; case 0x4820: - sendMessage(_parentScene, 0x2005, 0); + sendMessage(_parentScene, NM_KLAYMEN_CLIMB_LADDER, 0); GotoState(&Klaymen::stContinueClimbLadderUp); break; case 0x4821: - sendMessage(_parentScene, 0x2005, 0); + sendMessage(_parentScene, NM_KLAYMEN_CLIMB_LADDER, 0); _destY = param.asInteger(); GotoState(&Klaymen::stStartClimbLadderDown); break; case 0x4822: - sendMessage(_parentScene, 0x2005, 0); + sendMessage(_parentScene, NM_KLAYMEN_CLIMB_LADDER, 0); _destY = param.asInteger(); GotoState(&Klaymen::stStartClimbLadderUp); break; case 0x4823: - sendMessage(_parentScene, 0x2006, 0); + sendMessage(_parentScene, NM_KLAYMEN_STOP_CLIMBING, 0); GotoState(&Klaymen::stClimbLadderHalf); break; case 0x482E: @@ -1227,7 +1227,7 @@ void KmScene1002::setupJumpToRing() { SetMessageHandler(&KmScene1002::hmJumpToRing); SetSpriteUpdate(&Klaymen::suUpdateDestX); NextState(&KmScene1002::stHangOnRing); - sendMessage(_attachedSprite, 0x482B, 0); + sendMessage(_attachedSprite, NM_MOVE_TO_FRONT, 0); } uint32 KmScene1002::hmJumpToRing(int messageNum, const MessageParam ¶m, Entity *sender) { @@ -1235,14 +1235,14 @@ uint32 KmScene1002::hmJumpToRing(int messageNum, const MessageParam ¶m, Enti switch (messageNum) { case NM_ANIMATION_START: if (param.asInteger() == 0x168050A0) { - sendMessage(_attachedSprite, 0x4806, 0); + sendMessage(_attachedSprite, NM_KLAYMEN_USE_OBJECT, 0); _acceptInput = true; } else if (param.asInteger() == 0x320AC306) { playSound(0, 0x5860C640); } else if (param.asInteger() == 0x4AB28209) { - sendMessage(_attachedSprite, 0x482A, 0); + sendMessage(_attachedSprite, NM_MOVE_TO_BACK, 0); } else if (param.asInteger() == 0x88001184) { - sendMessage(_attachedSprite, 0x482B, 0); + sendMessage(_attachedSprite, NM_MOVE_TO_FRONT, 0); } break; } @@ -1283,7 +1283,7 @@ void KmScene1002::stJumpToRing3() { SetSpriteUpdate(&Klaymen::suUpdateDestX); SetMessageHandler(&KmScene1002::hmJumpToRing3); NextState(&KmScene1002::stHoldRing3); - sendMessage(_attachedSprite, 0x482B, 0); + sendMessage(_attachedSprite, NM_MOVE_TO_FRONT, 0); } } @@ -1292,13 +1292,13 @@ uint32 KmScene1002::hmJumpToRing3(int messageNum, const MessageParam ¶m, Ent switch (messageNum) { case NM_ANIMATION_START: if (param.asInteger() == 0x168050A0) { - sendMessage(_attachedSprite, 0x4806, 0); + sendMessage(_attachedSprite, NM_KLAYMEN_USE_OBJECT, 0); } else if (param.asInteger() == 0x320AC306) { playSound(0, 0x5860C640); } else if (param.asInteger() == 0x4AB28209) { - sendMessage(_attachedSprite, 0x482A, 0); + sendMessage(_attachedSprite, NM_MOVE_TO_BACK, 0); } else if (param.asInteger() == 0x88001184) { - sendMessage(_attachedSprite, 0x482B, 0); + sendMessage(_attachedSprite, NM_MOVE_TO_FRONT, 0); } break; } @@ -1339,7 +1339,7 @@ void KmScene1002::stJumpToRingVenusFlyTrap() { SetMessageHandler(&KmScene1002::hmJumpToRingVenusFlyTrap); SetSpriteUpdate(&AnimatedSprite::updateDeltaXY); NextState(&KmScene1002::stLandOnFeet); - sendMessage(_attachedSprite, 0x482B, 0); + sendMessage(_attachedSprite, NM_MOVE_TO_FRONT, 0); } } @@ -1348,13 +1348,13 @@ uint32 KmScene1002::hmJumpToRingVenusFlyTrap(int messageNum, const MessageParam switch (messageNum) { case NM_ANIMATION_START: if (param.asInteger() == 0x168050A0) { - sendMessage(_attachedSprite, NM_LEVER_DOWN, 0); + sendMessage(_attachedSprite, NM_KLAYMEN_LOWER_LEVER, 0); } else if (param.asInteger() == 0x586B0300) { sendMessage(_otherSprite, 0x480E, 1); } else if (param.asInteger() == 0x4AB28209) { - sendMessage(_attachedSprite, 0x482A, 0); + sendMessage(_attachedSprite, NM_MOVE_TO_BACK, 0); } else if (param.asInteger() == 0x88001184) { - sendMessage(_attachedSprite, 0x482B, 0); + sendMessage(_attachedSprite, NM_MOVE_TO_FRONT, 0); } break; } @@ -1377,7 +1377,7 @@ void KmScene1002::stJumpAndFall() { void KmScene1002::stDropFromRing() { if (_attachedSprite) { _x = _attachedSprite->getX(); - sendMessage(_attachedSprite, NM_LEVER_UP, 0); + sendMessage(_attachedSprite, NM_KLAYMEN_RAISE_LEVER, 0); _attachedSprite = NULL; } _busyStatus = 2; @@ -1426,7 +1426,7 @@ void KmScene1002::stContinueMovingVenusFlyTrap() { } void KmScene1002::evMoveVenusFlyTrapDone() { - sendMessage(_attachedSprite, 0x482A, 0); + sendMessage(_attachedSprite, NM_MOVE_TO_BACK, 0); } uint32 KmScene1002::hmMoveVenusFlyTrap(int messageNum, const MessageParam ¶m, Entity *sender) { @@ -1442,16 +1442,16 @@ uint32 KmScene1002::hmMoveVenusFlyTrap(int messageNum, const MessageParam ¶m SetMessageHandler(&KmScene1002::hmFirstMoveVenusFlyTrap); } } else if (param.asInteger() == 0x4AB28209) { - sendMessage(_attachedSprite, 0x482A, 0); + sendMessage(_attachedSprite, NM_MOVE_TO_BACK, 0); } else if (param.asInteger() == 0x88001184) { - sendMessage(_attachedSprite, 0x482B, 0); + sendMessage(_attachedSprite, NM_MOVE_TO_FRONT, 0); } else if (param.asInteger() == 0x32180101) { playSound(0, 0x405002D8); } else if (param.asInteger() == 0x0A2A9098) { playSound(0, 0x0460E2FA); } break; - case 0x480A: + case NM_KLAYMEN_MOVE_OBJECT: _isMoveObjectRequested = true; return 0; } @@ -1463,9 +1463,9 @@ uint32 KmScene1002::hmFirstMoveVenusFlyTrap(int messageNum, const MessageParam & switch (messageNum) { case NM_ANIMATION_START: if (param.asInteger() == 0x4AB28209) { - sendMessage(_attachedSprite, 0x482A, 0); + sendMessage(_attachedSprite, NM_MOVE_TO_BACK, 0); } else if (param.asInteger() == 0x88001184) { - sendMessage(_attachedSprite, 0x482B, 0); + sendMessage(_attachedSprite, NM_MOVE_TO_FRONT, 0); } else if (param.asInteger() == 0x32180101) { playSound(0, 0x405002D8); } else if (param.asInteger() == 0x0A2A9098) { @@ -1553,7 +1553,7 @@ uint32 KmScene1004::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; case 0x4817: @@ -1563,7 +1563,7 @@ uint32 KmScene1004::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4818: startWalkToX(_dataResource.getPoint(param.asInteger()).x, false); break; - case 0x481E: + case NM_KLAYMEN_RETURN_FROM_USE: GotoState(&KmScene1004::stReadNote); break; case 0x4820: diff --git a/engines/neverhood/modules/module1100.cpp b/engines/neverhood/modules/module1100.cpp index 693f64d6ba..08b134205c 100644 --- a/engines/neverhood/modules/module1100.cpp +++ b/engines/neverhood/modules/module1100.cpp @@ -286,7 +286,7 @@ uint32 Scene1105::handleMessage(int messageNum, const MessageParam ¶m, Entit uint32 messageResult = 0; Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: if (param.asPoint().x <= 20 || param.asPoint().x >= 620) { if (!_isActionButtonClicked && _backgroundIndex == 0) { if (_isPanelOpen) { @@ -309,7 +309,7 @@ uint32 Scene1105::handleMessage(int messageNum, const MessageParam ¶m, Entit _leaveResult = 1; SetUpdateHandler(&Scene1105::upClosePanel); break; - case NM_LEVER_UP: + case NM_KLAYMEN_RAISE_LEVER: if (sender == _ssActionButton) { if (getSubVar(VA_GOOD_DICE_NUMBERS, 0) == getSubVar(VA_CURR_DICE_NUMBERS, 0) && getSubVar(VA_GOOD_DICE_NUMBERS, 1) == getSubVar(VA_CURR_DICE_NUMBERS, 1) && diff --git a/engines/neverhood/modules/module1100_sprites.cpp b/engines/neverhood/modules/module1100_sprites.cpp index 0741f58a37..9d60f83ae0 100644 --- a/engines/neverhood/modules/module1100_sprites.cpp +++ b/engines/neverhood/modules/module1100_sprites.cpp @@ -48,7 +48,7 @@ SsScene1105Button::SsScene1105Button(NeverhoodEngine *vm, Scene *parentScene, ui void SsScene1105Button::update() { if (_countdown != 0 && (--_countdown == 0)) { - sendMessage(_parentScene, NM_LEVER_UP, 0); + sendMessage(_parentScene, NM_KLAYMEN_RAISE_LEVER, 0); setVisible(false); } } @@ -214,7 +214,7 @@ uint32 KmScene1109::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: if (_isSittingInTeleporter) GotoState(&Klaymen::stSitIdleTeleporter); else @@ -231,11 +231,11 @@ uint32 KmScene1109::xHandleMessage(int messageNum, const MessageParam ¶m) { setDoDeltaX(param.asInteger()); gotoNextStateExt(); break; - case 0x481D: + case NM_KLAYMEN_TURN_TO_USE: if (_isSittingInTeleporter) GotoState(&Klaymen::stTurnToUseInTeleporter); break; - case 0x481E: + case NM_KLAYMEN_RETURN_FROM_USE: if (_isSittingInTeleporter) GotoState(&Klaymen::stReturnFromUseInTeleporter); break; diff --git a/engines/neverhood/modules/module1200.cpp b/engines/neverhood/modules/module1200.cpp index eaa48c6ec5..bafbb4d535 100644 --- a/engines/neverhood/modules/module1200.cpp +++ b/engines/neverhood/modules/module1200.cpp @@ -301,10 +301,10 @@ uint32 Scene1201::handleMessage(int messageNum, const MessageParam ¶m, Entit _creatureExploded = true; sendMessage(_asCreature, 0x2004, 0); } else if (param.asInteger() == 0x140E5744) - sendMessage(_asCreature, 0x2005, 0); + sendMessage(_asCreature, NM_KLAYMEN_CLIMB_LADDER, 0); else if (param.asInteger() == 0x40253C40) { _canAcceptInput = false; - sendMessage(_asCreature, 0x2006, 0); + sendMessage(_asCreature, NM_KLAYMEN_STOP_CLIMBING, 0); } else if (param.asInteger() == 0x090EB048) { if (_klaymen->getX() < 572) setMessageList2(0x004AEC90); @@ -347,7 +347,7 @@ uint32 Scene1201::handleMessage(int messageNum, const MessageParam ¶m, Entit sendMessage(_asRightDoor, 0x4829, 0); break; case 0x8000: - sendMessage(_asKlaymenHead, 0x2006, 0); + sendMessage(_asKlaymenHead, NM_KLAYMEN_STOP_CLIMBING, 0); break; } return messageResult; @@ -427,7 +427,7 @@ uint32 Scene1202::handleMessage(int messageNum, const MessageParam ¶m, Entit uint32 messageResult = 0; Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: if ((param.asPoint().x <= 20 || param.asPoint().x >= 620) && !_isPuzzleSolved) leaveScene(0); break; @@ -444,7 +444,7 @@ uint32 Scene1202::handleMessage(int messageNum, const MessageParam ¶m, Entit uint32 Scene1202::hmSolved(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: if (param.asPoint().x <= 20 || param.asPoint().x >= 620) leaveScene(0); break; diff --git a/engines/neverhood/modules/module1200_sprites.cpp b/engines/neverhood/modules/module1200_sprites.cpp index 3914f0b622..641ef047e5 100644 --- a/engines/neverhood/modules/module1200_sprites.cpp +++ b/engines/neverhood/modules/module1200_sprites.cpp @@ -72,7 +72,7 @@ uint32 AsScene1201Tape::handleMessage(int messageNum, const MessageParam ¶m, sendMessage(_parentScene, 0x4826, 0); messageResult = 1; break; - case 0x4806: + case NM_KLAYMEN_USE_OBJECT: setSubVar(VA_HAS_TAPE, _nameHash, 1); setVisible(false); SetMessageHandler(NULL); @@ -105,7 +105,7 @@ uint32 AsScene1201TntManRope::handleMessage(int messageNum, const MessageParam & if (param.asInteger() == 0x02060018) playSound(0, 0x47900E06); break; - case 0x2006: + case NM_KLAYMEN_STOP_CLIMBING: startAnimation(0x928F0C10, 1, -1); _newStickFrameIndex = STICK_LAST_FRAME; break; @@ -184,7 +184,7 @@ AsScene1201KlaymenHead::AsScene1201KlaymenHead(NeverhoodEngine *vm) uint32 AsScene1201KlaymenHead::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2006: + case NM_KLAYMEN_STOP_CLIMBING: _x = 436; _y = 339; startAnimation(0xA060C599, 0, -1); @@ -225,7 +225,7 @@ uint32 AsScene1201TntMan::handleMessage(int messageNum, const MessageParam ¶ switch (messageNum) { case NM_ANIMATION_START: if (param.asInteger() == 0x092870C0) - sendMessage(_asTntManRope, 0x2006, 0); + sendMessage(_asTntManRope, NM_KLAYMEN_STOP_CLIMBING, 0); else if (param.asInteger() == 0x11CA0144) playSound(0, 0x51800A04); break; @@ -378,7 +378,7 @@ uint32 AsScene1201Match::hmIdle(int messageNum, const MessageParam ¶m, Entit sendMessage(_parentScene, 0x2001, 0); messageResult = 1; break; - case 0x4806: + case NM_KLAYMEN_USE_OBJECT: setVisible(false); setGlobalVar(V_MATCH_STATUS, 3); break; @@ -466,7 +466,7 @@ uint32 AsScene1201Creature::hmWaiting(int messageNum, const MessageParam ¶m, case 0x2004: GotoState(&AsScene1201Creature::stStartReachForTntDummy); break; - case 0x2006: + case NM_KLAYMEN_STOP_CLIMBING: GotoState(&AsScene1201Creature::stPincerSnapKlaymen); break; } @@ -556,7 +556,7 @@ AsScene1201LeftDoor::AsScene1201LeftDoor(NeverhoodEngine *vm, Sprite *klaymen) uint32 AsScene1201LeftDoor::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case NM_DOOR_CLOSE: + case NM_KLAYMEN_CLOSE_DOOR: stCloseDoor(); break; } @@ -671,10 +671,10 @@ uint32 KmScene1201::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; - case 0x480A: + case NM_KLAYMEN_MOVE_OBJECT: GotoState(&Klaymen::stMoveObject); break; case NM_KLAYMEN_PICKUP: @@ -703,10 +703,10 @@ uint32 KmScene1201::xHandleMessage(int messageNum, const MessageParam ¶m) { else startWalkToAttachedSpriteXDistance(param.asPoint().x); break; - case 0x481D: + case NM_KLAYMEN_TURN_TO_USE: GotoState(&Klaymen::stTurnToUse); break; - case 0x481E: + case NM_KLAYMEN_RETURN_FROM_USE: GotoState(&Klaymen::stReturnFromUse); break; case 0x481F: diff --git a/engines/neverhood/modules/module1300.cpp b/engines/neverhood/modules/module1300.cpp index 033b19f22f..f28c1d6b97 100644 --- a/engines/neverhood/modules/module1300.cpp +++ b/engines/neverhood/modules/module1300.cpp @@ -350,7 +350,7 @@ Scene1302::Scene1302(NeverhoodEngine *vm, Module *parentModule, int which) _asVenusFlyTrap = insertSprite(this, _klaymen, true); addCollisionSprite(_asVenusFlyTrap); - sendEntityMessage(_klaymen, 0x2007, _asVenusFlyTrap); + sendEntityMessage(_klaymen, NM_CAR_MOVE_TO_PREV_POINT, _asVenusFlyTrap); } @@ -359,9 +359,9 @@ uint32 Scene1302::handleMessage(int messageNum, const MessageParam ¶m, Entit Scene::handleMessage(messageNum, param, sender); switch (messageNum) { case NM_ANIMATION_START: - if (param.asInteger() == 0x4A845A00) + if (param.asInteger() == 0x4A845A00) { sendEntityMessage(_klaymen, 0x1014, _asRing1); - else if (param.asInteger() == 0x43807801) { + } else if (param.asInteger() == 0x43807801) { if (!getGlobalVar(V_FLYTRAP_RING_BRIDGE)) { sendEntityMessage(_klaymen, 0x1014, _asRing2); if (_asVenusFlyTrap->getX() - 10 < 218 + 32 && _asVenusFlyTrap->getX() + 10 > 218 + 32) @@ -371,9 +371,9 @@ uint32 Scene1302::handleMessage(int messageNum, const MessageParam ¶m, Entit } else setMessageList(0x004B0950); messageResult = 1; - } else if (param.asInteger() == 0x46C26A01) + } else if (param.asInteger() == 0x46C26A01) { sendEntityMessage(_klaymen, 0x1014, _asRing3); - else if (param.asInteger() == 0x468C7B11) { + } else if (param.asInteger() == 0x468C7B11) { if (!getGlobalVar(V_FLYTRAP_RING_FENCE)) { sendEntityMessage(_klaymen, 0x1014, _asRing4); if (_asVenusFlyTrap->getX() - 10 < 218 + 32 + 32 + 32 && _asVenusFlyTrap->getX() + 10 > 218 + 32 + 32 + 32) @@ -383,9 +383,9 @@ uint32 Scene1302::handleMessage(int messageNum, const MessageParam ¶m, Entit } else setMessageList(0x004B0950); messageResult = 1; - } else if (param.asInteger() == 0x42845B19) + } else if (param.asInteger() == 0x42845B19) { sendEntityMessage(_klaymen, 0x1014, _asRing5); - else if (param.asInteger() == 0x430A6060) { + } else if (param.asInteger() == 0x430A6060) { if (getGlobalVar(V_FLYTRAP_RING_BRIDGE)) setMessageList2(0x004B0910); else @@ -416,52 +416,52 @@ uint32 Scene1302::handleMessage(int messageNum, const MessageParam ¶m, Entit case 0x2032: _sprite2->setVisible(true); break; - case 0x4806: + case NM_KLAYMEN_USE_OBJECT: sendMessage(_parentModule, 0x1024, 2); if (sender == _asRing1) playSound(0, 0x665198C0); else if (sender == _asRing2) { - sendMessage(_asBridge, NM_DOOR_OPEN, 0); + sendMessage(_asBridge, NM_KLAYMEN_OPEN_DOOR, 0); setGlobalVar(V_FLYTRAP_RING_BRIDGE, 1); - } else if (sender == _asRing3) + } else if (sender == _asRing3) { playSound(0, 0xE2D389C0); - else if (sender == _asRing4) { - sendMessage(_ssFence, NM_DOOR_OPEN, 0); + } else if (sender == _asRing4) { + sendMessage(_ssFence, NM_KLAYMEN_OPEN_DOOR, 0); setGlobalVar(V_FLYTRAP_RING_FENCE, 1); } else if (sender == _asRing5) playSound(0, 0x40428A09); break; - case NM_LEVER_UP: + case NM_KLAYMEN_RAISE_LEVER: if (sender == _asRing2) { - sendMessage(_asBridge, NM_DOOR_CLOSE, 0); + sendMessage(_asBridge, NM_KLAYMEN_CLOSE_DOOR, 0); setGlobalVar(V_FLYTRAP_RING_BRIDGE, 0); _sprite2->setVisible(false); } else if (sender == _asRing4) { - sendMessage(_ssFence, NM_DOOR_CLOSE, 0); + sendMessage(_ssFence, NM_KLAYMEN_CLOSE_DOOR, 0); setGlobalVar(V_FLYTRAP_RING_FENCE, 0); } else if (sender == _asVenusFlyTrap) { if (getGlobalVar(V_FLYTRAP_RING_BRIDGE)) - sendMessage(_asRing2, NM_LEVER_UP, 0); + sendMessage(_asRing2, NM_KLAYMEN_RAISE_LEVER, 0); else - sendMessage(_asRing4, NM_LEVER_UP, 0); + sendMessage(_asRing4, NM_KLAYMEN_RAISE_LEVER, 0); } break; - case NM_LEVER_DOWN: + case NM_KLAYMEN_LOWER_LEVER: if (sender == _asRing2) { playSound(0, 0x60755842); - sendMessage(_asBridge, NM_DOOR_OPEN, 0); + sendMessage(_asBridge, NM_KLAYMEN_OPEN_DOOR, 0); setGlobalVar(V_FLYTRAP_RING_BRIDGE, 1); } else if (sender == _asRing4) { playSound(0, 0x60755842); - sendMessage(_ssFence, NM_DOOR_OPEN, 0); + sendMessage(_ssFence, NM_KLAYMEN_OPEN_DOOR, 0); setGlobalVar(V_FLYTRAP_RING_FENCE, 1); } break; - case 0x482A: - sendMessage(_asVenusFlyTrap, 0x482B, 0); + case NM_MOVE_TO_BACK: + sendMessage(_asVenusFlyTrap, NM_MOVE_TO_FRONT, 0); break; - case 0x482B: - sendMessage(_asVenusFlyTrap, 0x482A, 0); + case NM_MOVE_TO_FRONT: + sendMessage(_asVenusFlyTrap, NM_MOVE_TO_BACK, 0); break; case 0x8000: setSpriteSurfacePriority(_class595, 995); @@ -629,7 +629,7 @@ Scene1306::Scene1306(NeverhoodEngine *vm, Module *parentModule, int which) insertStaticSprite(0x00042313, 1100); if (which < 0) { - // Resoring game + // Restoring game insertKlaymen(380, 440); setMessageList(0x004AFAD0); sendMessage(this, 0x2000, 0); @@ -681,7 +681,7 @@ Scene1306::Scene1306(NeverhoodEngine *vm, Module *parentModule, int which) sendMessage(this, 0x2000, 0); SetMessageHandler(&Scene1306::handleMessage416EB0); clearRectList(); - sendMessage(_asElevator, NM_DOOR_OPEN, 0); + sendMessage(_asElevator, NM_KLAYMEN_OPEN_DOOR, 0); } } @@ -718,7 +718,7 @@ uint32 Scene1306::handleMessage(int messageNum, const MessageParam ¶m, Entit break; case 0x480B: if (sender == _ssButton) - sendMessage(_asElevator, NM_DOOR_OPEN, 0); + sendMessage(_asElevator, NM_KLAYMEN_OPEN_DOOR, 0); break; case 0x4826: if (sender == _asKey) { @@ -733,12 +733,12 @@ uint32 Scene1306::handleMessage(int messageNum, const MessageParam ¶m, Entit } } break; - case 0x482A: + case NM_MOVE_TO_BACK: setSurfacePriority(_asElevator->getSurface(), 1100); setSurfacePriority(_asElevatorDoor->getSurface(), 1090); setSurfacePriority(_sprite1->getSurface(), 1080); break; - case 0x482B: + case NM_MOVE_TO_FRONT: setSurfacePriority(_asElevator->getSurface(), 100); setSurfacePriority(_asElevatorDoor->getSurface(), 90); setSurfacePriority(_sprite1->getSurface(), 80); @@ -752,19 +752,19 @@ uint32 Scene1306::handleMessage(int messageNum, const MessageParam ¶m, Entit uint32 Scene1306::handleMessage416EB0(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case NM_DOOR_OPEN: + case NM_KLAYMEN_OPEN_DOOR: setMessageList(0x004AFBD0); SetMessageHandler(&Scene1306::handleMessage); break; - case NM_DOOR_CLOSE: + case NM_KLAYMEN_CLOSE_DOOR: leaveScene(1); break; - case 0x482A: + case NM_MOVE_TO_BACK: setSurfacePriority(_asElevator->getSurface(), 1100); setSurfacePriority(_asElevatorDoor->getSurface(), 1090); setSurfacePriority(_sprite1->getSurface(), 1080); break; - case 0x482B: + case NM_MOVE_TO_FRONT: setSurfacePriority(_asElevator->getSurface(), 100); setSurfacePriority(_asElevatorDoor->getSurface(), 90); setSurfacePriority(_sprite1->getSurface(), 80); @@ -840,7 +840,7 @@ uint32 Scene1307::handleMessage(int messageNum, const MessageParam ¶m, Entit uint32 messageResult = 0; Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: if (!_isPuzzleSolved) { if (param.asPoint().x > 20 && param.asPoint().x < 620) { if (_asCurrKey && !_isInsertingKey) { @@ -981,7 +981,7 @@ Scene1308::Scene1308(NeverhoodEngine *vm, Module *parentModule, int which) // Klaymen entering from the left insertKlaymen(41, 440); setMessageList(0x004B57D0); - sendMessage(_asJaggyDoor, NM_DOOR_OPEN, 0); + sendMessage(_asJaggyDoor, NM_KLAYMEN_OPEN_DOOR, 0); _sprite1->setVisible(false); if (getGlobalVar(V_KEYDOOR_UNLOCKED)) { _sprite4 = insertStaticSprite(0x0101A624, 1100); @@ -1022,12 +1022,12 @@ uint32 Scene1308::handleMessage(int messageNum, const MessageParam ¶m, Entit _isProjecting = false; } else if (param.asInteger() == 0x4AC68808) { clearRectList(); - sendMessage(_asJaggyDoor, NM_DOOR_CLOSE, 0); + sendMessage(_asJaggyDoor, NM_KLAYMEN_CLOSE_DOOR, 0); _sprite1->setVisible(false); _klaymen->setVisible(false); } break; - case 0x1022: + case NM_PRIORITY_CHANGE: if (sender == _asProjector) { if (param.asInteger() >= 1000) setSurfacePriority(_sprite3->getSurface(), 1100); @@ -1056,10 +1056,10 @@ uint32 Scene1308::handleMessage(int messageNum, const MessageParam ¶m, Entit _sprite4->setVisible(true); setRectList(0x004B5990); break; - case NM_LEVER_UP: + case NM_KLAYMEN_RAISE_LEVER: sendMessage(_asLightWallSymbols, 0x2003, 0); break; - case NM_LEVER_DOWN: + case NM_KLAYMEN_LOWER_LEVER: sendMessage(_asLightWallSymbols, 0x2002, 0); _ssNumber1->setVisible(true); _ssNumber2->setVisible(true); @@ -1151,7 +1151,7 @@ uint32 Scene1317::handleMessage(int messageNum, const MessageParam ¶m, Entit uint32 Scene1317::hmChooseKing(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: if (param.asPoint().x >= 21 && param.asPoint().y >= 24 && param.asPoint().x <= 261 && param.asPoint().y <= 280) { stHoborgAsKing(); diff --git a/engines/neverhood/modules/module1300_sprites.cpp b/engines/neverhood/modules/module1300_sprites.cpp index 275249726e..394c706990 100644 --- a/engines/neverhood/modules/module1300_sprites.cpp +++ b/engines/neverhood/modules/module1300_sprites.cpp @@ -49,10 +49,10 @@ uint32 AsScene1302Bridge::handleMessage(int messageNum, const MessageParam ¶ case NM_ANIMATION_STOP: gotoNextState(); break; - case NM_DOOR_OPEN: + case NM_KLAYMEN_OPEN_DOOR: stLowerBridge(); break; - case NM_DOOR_CLOSE: + case NM_KLAYMEN_CLOSE_DOOR: stRaiseBridge(); break; } @@ -99,12 +99,12 @@ void SsScene1302Fence::update() { uint32 SsScene1302Fence::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case NM_DOOR_OPEN: + case NM_KLAYMEN_OPEN_DOOR: playSound(0); SetMessageHandler(NULL); SetSpriteUpdate(&SsScene1302Fence::suMoveDown); break; - case NM_DOOR_CLOSE: + case NM_KLAYMEN_CLOSE_DOOR: playSound(1); SetMessageHandler(NULL); SetSpriteUpdate(&SsScene1302Fence::suMoveUp); @@ -193,7 +193,7 @@ uint32 AsScene1304Needle::handleMessage(int messageNum, const MessageParam ¶ sendMessage(_parentScene, 0x4826, 0); messageResult = 1; break; - case 0x4806: + case NM_KLAYMEN_USE_OBJECT: setGlobalVar(V_HAS_NEEDLE, 1); setVisible(false); SetMessageHandler(NULL); @@ -244,7 +244,7 @@ uint32 AsScene1306Elevator::handleMessage(int messageNum, const MessageParam &pa case NM_ANIMATION_STOP: gotoNextState(); break; - case NM_DOOR_OPEN: + case NM_KLAYMEN_OPEN_DOOR: if (_isDown) stGoingUp(); break; @@ -262,7 +262,7 @@ void AsScene1306Elevator::stGoingUp() { } void AsScene1306Elevator::cbGoingUpEvent() { - sendMessage(_parentScene, NM_DOOR_OPEN, 0); + sendMessage(_parentScene, NM_KLAYMEN_OPEN_DOOR, 0); _isUp = true; _countdown = 144; stopAnimation(); @@ -282,7 +282,7 @@ void AsScene1306Elevator::stGoingDown() { void AsScene1306Elevator::cbGoingDownEvent() { _isDown = true; - sendMessage(_parentScene, NM_DOOR_CLOSE, 0); + sendMessage(_parentScene, NM_KLAYMEN_CLOSE_DOOR, 0); stopAnimation(); SetUpdateHandler(&AsScene1306Elevator::update); } @@ -430,7 +430,7 @@ void AsScene1307Key::stRemoveKey() { void AsScene1307Key::stInsertKey() { _pointIndex = 0; - sendMessage(_parentScene, 0x1022, kAsScene1307KeySurfacePriorities[getSubVar(VA_CURR_KEY_SLOT_NUMBERS, _keyIndex) % 4]); + sendMessage(_parentScene, NM_PRIORITY_CHANGE, kAsScene1307KeySurfacePriorities[getSubVar(VA_CURR_KEY_SLOT_NUMBERS, _keyIndex) % 4]); setClipRect(_clipRects[getSubVar(VA_CURR_KEY_SLOT_NUMBERS, _keyIndex) % 4]); _newStickFrameIndex = STICK_LAST_FRAME; SetSpriteUpdate(&AsScene1307Key::suInsertKey); @@ -440,7 +440,7 @@ void AsScene1307Key::stMoveKey() { NPoint pt = (*_pointList)[getSubVar(VA_CURR_KEY_SLOT_NUMBERS, _keyIndex)]; int16 newX = pt.x + kAsScene1307KeyXDelta; int16 newY = pt.y + kAsScene1307KeyYDelta; - sendMessage(_parentScene, 0x1022, 1000); + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 1000); setClipRect(0, 0, 640, 480); _prevX = _x; _prevY = _y; @@ -483,10 +483,10 @@ uint32 AsScene1308JaggyDoor::handleMessage(int messageNum, const MessageParam &p case NM_ANIMATION_STOP: gotoNextState(); break; - case NM_DOOR_OPEN: + case NM_KLAYMEN_OPEN_DOOR: stOpenDoor(); break; - case NM_DOOR_CLOSE: + case NM_KLAYMEN_CLOSE_DOOR: stCloseDoor(); break; } @@ -660,7 +660,7 @@ uint32 KmScene1304::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; case NM_KLAYMEN_PICKUP: @@ -711,7 +711,7 @@ uint32 KmScene1305::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; case 0x4804: @@ -758,7 +758,7 @@ uint32 KmScene1306::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: if (_isSittingInTeleporter) GotoState(&Klaymen::stSitIdleTeleporter); else @@ -793,13 +793,13 @@ uint32 KmScene1306::xHandleMessage(int messageNum, const MessageParam ¶m) { else startWalkToAttachedSpriteXDistance(param.asPoint().x); break; - case 0x481D: + case NM_KLAYMEN_TURN_TO_USE: if (_isSittingInTeleporter) GotoState(&Klaymen::stTurnToUseInTeleporter); else GotoState(&Klaymen::stTurnToUse); break; - case 0x481E: + case NM_KLAYMEN_RETURN_FROM_USE: if (_isSittingInTeleporter) GotoState(&Klaymen::stReturnFromUseInTeleporter); else @@ -874,10 +874,10 @@ uint32 KmScene1308::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; - case 0x480A: + case NM_KLAYMEN_MOVE_OBJECT: if (param.asInteger() == 1) GotoState(&Klaymen::stMoveObjectSkipTurnFaceObject); else @@ -910,10 +910,10 @@ uint32 KmScene1308::xHandleMessage(int messageNum, const MessageParam ¶m) { else startWalkToAttachedSpriteXDistance(param.asPoint().x); break; - case 0x481D: + case NM_KLAYMEN_TURN_TO_USE: GotoState(&Klaymen::stTurnToUse); break; - case 0x481E: + case NM_KLAYMEN_RETURN_FROM_USE: GotoState(&Klaymen::stReturnFromUse); break; case NM_KLAYMEN_RELEASE_LEVER: diff --git a/engines/neverhood/modules/module1400.cpp b/engines/neverhood/modules/module1400.cpp index 50a36d62bd..62379578ed 100644 --- a/engines/neverhood/modules/module1400.cpp +++ b/engines/neverhood/modules/module1400.cpp @@ -207,7 +207,7 @@ Scene1401::Scene1401(NeverhoodEngine *vm, Module *parentModule, int which) _klaymen->setClipRect(_sprite3->getDrawRect().x, 0, 640, 480); if (which == 0 && _asProjector) - sendMessage(_asProjector, 0x482B, 0); + sendMessage(_asProjector, NM_MOVE_TO_FRONT, 0); _asBackDoor = insertSprite(_klaymen, which == 0); @@ -237,7 +237,7 @@ uint32 Scene1401::handleMessage(int messageNum, const MessageParam ¶m, Entit setMessageList(0x004B66B0); } break; - case 0x1019: + case NM_SCENE_LEAVE: if (param.asInteger() != 0) leaveScene(2); else @@ -254,7 +254,7 @@ uint32 Scene1401::handleMessage(int messageNum, const MessageParam ¶m, Entit if (_asProjector && _asProjector->getX() > 404 && _asProjector->getX() < 504) sendMessage(_asProjector , 0x4839, 0); } else if (sender == _ssButton) - sendMessage(_asBackDoor, NM_DOOR_OPEN, 0); + sendMessage(_asBackDoor, NM_KLAYMEN_OPEN_DOOR, 0); break; case 0x4826: if (sender == _asProjector) { @@ -265,15 +265,15 @@ uint32 Scene1401::handleMessage(int messageNum, const MessageParam ¶m, Entit setMessageList2(0x004B65F0); } break; - case 0x482A: + case NM_MOVE_TO_BACK: _sprite1->setVisible(true); if (_asProjector) - sendMessage(_asProjector, 0x482B, 0); + sendMessage(_asProjector, NM_MOVE_TO_FRONT, 0); break; - case 0x482B: + case NM_MOVE_TO_FRONT: _sprite1->setVisible(false); if (_asProjector) - sendMessage(_asProjector, 0x482A, 0); + sendMessage(_asProjector, NM_MOVE_TO_BACK, 0); break; } return 0; @@ -388,7 +388,7 @@ uint32 Scene1402::handleMessage(int messageNum, const MessageParam ¶m, Entit } } break; - case 0x1019: + case NM_SCENE_LEAVE: if (param.asInteger()) leaveScene(0); else @@ -455,7 +455,7 @@ void Scene1407::update() { uint32 Scene1407::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: if (_puzzleSolvedCountdown == 0) { if (param.asPoint().x <= 20 || param.asPoint().x >= 620) { // Exit scene @@ -544,10 +544,10 @@ uint32 Scene1403::handleMessage(int messageNum, const MessageParam ¶m, Entit _isProjecting = false; } break; - case 0x1019: + case NM_SCENE_LEAVE: leaveScene(0); break; - case 0x1022: + case NM_PRIORITY_CHANGE: if (sender == _asProjector) { if (param.asInteger() >= 1000) setSurfacePriority(_sprite3->getSurface(), 1100); @@ -555,10 +555,10 @@ uint32 Scene1403::handleMessage(int messageNum, const MessageParam ¶m, Entit setSurfacePriority(_sprite3->getSurface(), 995); } break; - case NM_LEVER_UP: + case NM_KLAYMEN_RAISE_LEVER: _sprite1->setVisible(false); break; - case NM_LEVER_DOWN: + case NM_KLAYMEN_LOWER_LEVER: _sprite1->setVisible(true); break; case 0x4826: @@ -663,7 +663,7 @@ uint32 Scene1404::handleMessage(int messageNum, const MessageParam ¶m, Entit setMessageList(0x004B8CE8); } break; - case 0x1019: + case NM_SCENE_LEAVE: leaveScene(0); break; case 0x4826: @@ -725,7 +725,7 @@ void Scene1405::update() { uint32 Scene1405::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: if (param.asPoint().x <= 20 || param.asPoint().x >= 620) leaveScene(0); break; diff --git a/engines/neverhood/modules/module1400_sprites.cpp b/engines/neverhood/modules/module1400_sprites.cpp index 2cc1af8d81..80c16cc66c 100644 --- a/engines/neverhood/modules/module1400_sprites.cpp +++ b/engines/neverhood/modules/module1400_sprites.cpp @@ -225,7 +225,7 @@ uint32 AsScene1401BackDoor::handleMessage(int messageNum, const MessageParam &pa case NM_ANIMATION_STOP: gotoNextState(); break; - case NM_DOOR_OPEN: + case NM_KLAYMEN_OPEN_DOOR: _countdown = 168; if (!_isOpen) stOpenDoor(); @@ -292,7 +292,7 @@ uint32 AsCommonProjector::handleMessage(int messageNum, const MessageParam ¶ sendMessage(_parentScene, 0x4826, 0); messageResult = 1; break; - case NM_LEVER_UP: + case NM_KLAYMEN_RAISE_LEVER: setGlobalVar(V_PROJECTOR_SLOT, (_x - _asProjectorItem->point.x) / 108); if ((int8)getGlobalVar(V_PROJECTOR_SLOT) == _asProjectorItem->lockSlotIndex) stStartLockedInSlot(); @@ -314,11 +314,11 @@ uint32 AsCommonProjector::handleMessage(int messageNum, const MessageParam ¶ else messageResult = getGlobalVar(V_PROJECTOR_SLOT) > 0 ? 1 : 0; break; - case 0x482A: - sendMessage(_parentScene, 0x1022, 990); + case NM_MOVE_TO_BACK: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 990); break; - case 0x482B: - sendMessage(_parentScene, 0x1022, 1010); + case NM_MOVE_TO_FRONT: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 1010); break; case 0x4839: stStartSuckedIn(); @@ -338,8 +338,8 @@ uint32 AsCommonProjector::hmLockedInSlot(int messageNum, const MessageParam &par sendMessage(_parentScene, 0x4826, 0); messageResult = 1; break; - case NM_LEVER_UP: - sendMessage(_parentScene, NM_LEVER_UP, 0); + case NM_KLAYMEN_RAISE_LEVER: + sendMessage(_parentScene, NM_KLAYMEN_RAISE_LEVER, 0); stStopProjecting(); break; case 0x480B: @@ -357,14 +357,14 @@ uint32 AsCommonProjector::hmLockedInSlot(int messageNum, const MessageParam &par else messageResult = getGlobalVar(V_PROJECTOR_SLOT) > 0 ? 1 : 0; break; - case NM_LEVER_DOWN: + case NM_KLAYMEN_LOWER_LEVER: stStartProjecting(); break; - case 0x482A: - sendMessage(_parentScene, 0x1022, 990); + case NM_MOVE_TO_BACK: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 990); break; - case 0x482B: - sendMessage(_parentScene, 0x1022, 1010); + case NM_MOVE_TO_FRONT: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 1010); break; } return messageResult; @@ -388,11 +388,11 @@ void AsCommonProjector::suMoving() { moveProjector(); if (_beforeMoveX == _x) { if (getGlobalVar(V_PROJECTOR_SLOT) == 0 && _asProjectorItem->leftBorderLeaves != 0) { - sendMessage(_parentScene, 0x1019, 0); + sendMessage(_parentScene, NM_SCENE_LEAVE, 0); incGlobalVar(V_PROJECTOR_LOCATION, -1); setGlobalVar(V_PROJECTOR_SLOT, kAsCommonProjectorItems[getGlobalVar(V_PROJECTOR_LOCATION)].maxSlotCount); } else if ((int8)getGlobalVar(V_PROJECTOR_SLOT) == _asProjectorItem->maxSlotCount && _asProjectorItem->rightBorderLeaves != 0) { - sendMessage(_parentScene, 0x1019, 1); + sendMessage(_parentScene, NM_SCENE_LEAVE, 1); incGlobalVar(V_PROJECTOR_LOCATION, +1); setGlobalVar(V_PROJECTOR_SLOT, 0); } @@ -481,7 +481,7 @@ void AsCommonProjector::stStartProjecting() { } void AsCommonProjector::stLockedInSlot() { - sendMessage(_parentScene, NM_LEVER_DOWN, 0); + sendMessage(_parentScene, NM_KLAYMEN_LOWER_LEVER, 0); startAnimation(0xD833207F, 0, -1); SetMessageHandler(&AsCommonProjector::hmLockedInSlot); SetSpriteUpdate(NULL); @@ -691,7 +691,7 @@ void AsScene1407Mouse::suWalkTo() { xdelta = -_deltaX; _deltaX = 0; if (_walkDestX == _x) - sendMessage(this, 0x1019, 0); + sendMessage(this, NM_SCENE_LEAVE, 0); else { _x += xdelta; updateBounds(); @@ -709,7 +709,7 @@ void AsScene1407Mouse::upGoThroughHole() { uint32 AsScene1407Mouse::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: { int16 mouseX = param.asPoint().x; int16 mouseY = param.asPoint().y; @@ -735,7 +735,7 @@ uint32 AsScene1407Mouse::handleMessage(int messageNum, const MessageParam ¶m } } break; - case 0x1019: + case NM_SCENE_LEAVE: gotoNextState(); break; case 0x2001: @@ -893,10 +893,10 @@ uint32 KmScene1401::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; - case 0x480A: + case NM_KLAYMEN_MOVE_OBJECT: if (param.asInteger() == 1) GotoState(&Klaymen::stMoveObjectSkipTurnFaceObject); else @@ -960,10 +960,10 @@ uint32 KmScene1402::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; - case 0x480A: + case NM_KLAYMEN_MOVE_OBJECT: if (param.asInteger() == 1) GotoState(&Klaymen::stMoveObjectSkipTurnFaceObject); else @@ -979,10 +979,10 @@ uint32 KmScene1402::xHandleMessage(int messageNum, const MessageParam ¶m) { else startWalkToAttachedSpriteXDistance(param.asPoint().x); break; - case 0x481D: + case NM_KLAYMEN_TURN_TO_USE: GotoState(&Klaymen::stTurnToUse); break; - case 0x481E: + case NM_KLAYMEN_RETURN_FROM_USE: GotoState(&Klaymen::stReturnFromUse); break; } @@ -1007,10 +1007,10 @@ uint32 KmScene1403::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; - case 0x480A: + case NM_KLAYMEN_MOVE_OBJECT: if (param.asInteger() == 1) GotoState(&Klaymen::stMoveObjectSkipTurnFaceObject); else @@ -1064,10 +1064,10 @@ uint32 KmScene1404::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; - case 0x480A: + case NM_KLAYMEN_MOVE_OBJECT: if (param.asInteger() == 1) GotoState(&Klaymen::stMoveObjectSkipTurnFaceObject); else @@ -1094,10 +1094,10 @@ uint32 KmScene1404::xHandleMessage(int messageNum, const MessageParam ¶m) { else startWalkToAttachedSpriteXDistance(param.asPoint().x); break; - case 0x481D: + case NM_KLAYMEN_TURN_TO_USE: GotoState(&Klaymen::stTurnToUse); break; - case 0x481E: + case NM_KLAYMEN_RETURN_FROM_USE: GotoState(&Klaymen::stReturnFromUse); break; case 0x481F: diff --git a/engines/neverhood/modules/module1600.cpp b/engines/neverhood/modules/module1600.cpp index 63978b1d5d..606ad44347 100644 --- a/engines/neverhood/modules/module1600.cpp +++ b/engines/neverhood/modules/module1600.cpp @@ -300,7 +300,7 @@ Scene1608::Scene1608(NeverhoodEngine *vm, Module *parentModule, int which) _asIdleCarFull->setVisible(false); _asCar->setPathPoints(_roomPathPoints); sendMessage(_asCar, 0x2002, 0); - sendMessage(_asCar, 0x2008, 90); + sendMessage(_asCar, NM_CAR_MOVE_TO_NEXT_POINT, 90); _sprite3 = insertStaticSprite(0xB47026B0, 1100); _clipRect1.set(_sprite3->getDrawRect().x, _sprite3->getDrawRect().y, 640, _sprite2->getDrawRect().y2()); _clipRect3.set(_sprite2->getDrawRect().x, _sprite3->getDrawRect().y, 640, _sprite2->getDrawRect().y2()); @@ -349,7 +349,7 @@ void Scene1608::upUpperFloor() { _asIdleCarLower->setVisible(false); _asIdleCarFull->setVisible(false); _asCar->setVisible(true); - sendMessage(_asCar, 0x2009, 0); + sendMessage(_asCar, NM_CAR_ENTER, 0); _asCar->handleUpdate(); _klaymen = NULL; _carStatus = 0; @@ -361,7 +361,7 @@ void Scene1608::upCarAtHome() { Scene::update(); if (_mouseClicked) { if (_mouseClickPos.x <= 329 && _asCar->getX() == 375 && _asCar->getY() == 227) { - sendMessage(_asCar, 0x200A, 0); + sendMessage(_asCar, NM_CAR_LEAVE, 0); SetUpdateHandler(&Scene1608::upGettingOutOfCar); } else { sendPointMessage(_asCar, 0x2004, _mouseClickPos); @@ -406,7 +406,7 @@ void Scene1608::upRidingCar() { _carClipFlag = false; _asCar->setClipRect(_clipRect1); if (!_asCar->isDoDeltaX()) - sendMessage(_asCar, 0x200E, 0); + sendMessage(_asCar, NM_CAR_TURN, 0); } } else if (!_carClipFlag) { _carClipFlag = true; @@ -423,7 +423,7 @@ uint32 Scene1608::hmLowerFloor(int messageNum, const MessageParam ¶m, Entity _klaymen->setVisible(false); showMouse(false); _sprite1->setVisible(false); - //sendMessage(_asDoor, NM_DOOR_CLOSE, 0); // Play sound? + //sendMessage(_asDoor, NM_KLAYMEN_CLOSE_DOOR, 0); // Play sound? _countdown1 = 28; } break; @@ -464,13 +464,13 @@ uint32 Scene1608::hmUpperFloor(int messageNum, const MessageParam ¶m, Entity uint32 Scene1608::hmRidingCar(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2005: + case NM_KLAYMEN_CLIMB_LADDER: leaveScene(1); break; - case 0x2006: + case NM_KLAYMEN_STOP_CLIMBING: SetMessageHandler(&Scene1608::hmCarAtHome); SetUpdateHandler(&Scene1608::upCarAtHome); - sendMessage(_asCar, 0x200F, 1); + sendMessage(_asCar, NM_CAR_AT_HOME, 1); break; case 0x200D: sendMessage(_parentModule, 0x200D, 0); @@ -482,7 +482,7 @@ uint32 Scene1608::hmRidingCar(int messageNum, const MessageParam ¶m, Entity uint32 Scene1608::hmCarAtHome(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x200A: + case NM_CAR_LEAVE: _carStatus = 2; break; case 0x200D: @@ -544,7 +544,7 @@ void Scene1609::update() { uint32 Scene1609::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: if (param.asPoint().x <= 20 || param.asPoint().x >= 620) leaveScene(0); break; diff --git a/engines/neverhood/modules/module1600_sprites.cpp b/engines/neverhood/modules/module1600_sprites.cpp index e930d1fdc3..56a9978784 100644 --- a/engines/neverhood/modules/module1600_sprites.cpp +++ b/engines/neverhood/modules/module1600_sprites.cpp @@ -94,7 +94,7 @@ void AsCommonCar::upIdle() { uint32 AsCommonCar::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x1019: + case NM_SCENE_LEAVE: SetSpriteUpdate(NULL); break; case 0x2002: @@ -116,10 +116,10 @@ uint32 AsCommonCar::handleMessage(int messageNum, const MessageParam ¶m, Ent } else if (_currPointIndex == newPointIndex && _stepError == 0) { if (_currPointIndex == 0) { _yMoveTotalSteps = 0; - sendMessage(_parentScene, 0x2005, 0); + sendMessage(_parentScene, NM_KLAYMEN_CLIMB_LADDER, 0); } else if (_currPointIndex == (int)_pathPoints->size()) { _yMoveTotalSteps = 0; - sendMessage(_parentScene, 0x2006, 0); + sendMessage(_parentScene, NM_KLAYMEN_STOP_CLIMBING, 0); } } else { moveToPrevPoint(); @@ -177,30 +177,30 @@ uint32 AsCommonCar::handleMessage(int messageNum, const MessageParam ¶m, Ent } } break; - case 0x2007: + case NM_CAR_MOVE_TO_PREV_POINT: _yMoveTotalSteps = param.asInteger(); _steps = 0; _isBraking = false; _lastDistance = 640; SetSpriteUpdate(&AsCommonCar::suMoveToPrevPoint); break; - case 0x2008: + case NM_CAR_MOVE_TO_NEXT_POINT: _yMoveTotalSteps = param.asInteger(); _steps = 0; _isBraking = false; _lastDistance = 640; SetSpriteUpdate(&AsCommonCar::suMoveToNextPoint); break; - case 0x2009: + case NM_CAR_ENTER: stEnterCar(); break; - case 0x200A: + case NM_CAR_LEAVE: stLeaveCar(); break; - case 0x200E: + case NM_CAR_TURN: stTurnCar(); break; - case 0x200F: + case NM_CAR_AT_HOME: stCarAtHome(); _newDeltaXType = param.asInteger(); break; @@ -224,11 +224,11 @@ uint32 AsCommonCar::hmAnimation(int messageNum, const MessageParam ¶m, Entit uint32 AsCommonCar::hmLeaveCar(int messageNum, const MessageParam ¶m, Entity *sender) { switch (messageNum) { - case 0x2009: + case NM_CAR_ENTER: stEnterCar(); break; case NM_ANIMATION_STOP: - sendMessage(_parentScene, 0x200A, 0); + sendMessage(_parentScene, NM_CAR_LEAVE, 0); SetMessageHandler(&AsCommonCar::handleMessage); break; } @@ -350,8 +350,8 @@ void AsCommonCar::stUpdateMoveDirection() { void AsCommonCar::moveToNextPoint() { if (_currPointIndex >= (int)_pathPoints->size() - 1) { _yMoveTotalSteps = 0; - sendMessage(this, 0x1019, 0); - sendMessage(_parentScene, 0x2006, 0); + sendMessage(this, NM_SCENE_LEAVE, 0); + sendMessage(_parentScene, NM_KLAYMEN_STOP_CLIMBING, 0); } else { NPoint nextPt = pathPoint(_currPointIndex + 1); NPoint currPt = pathPoint(_currPointIndex); @@ -431,8 +431,8 @@ void AsCommonCar::stTurnCarMoveToPrevPoint() { void AsCommonCar::moveToPrevPoint() { if (_currPointIndex == 0 && _stepError == 0) { _yMoveTotalSteps = 0; - sendMessage(this, 0x1019, 0); - sendMessage(_parentScene, 0x2005, 0); + sendMessage(this, NM_SCENE_LEAVE, 0); + sendMessage(_parentScene, NM_KLAYMEN_CLIMB_LADDER, 0); } else { NPoint prevPt; NPoint currPt; @@ -492,14 +492,14 @@ void AsCommonCar::suMoveToNextPoint() { if (_currPointIndex >= (int)_pathPoints->size()) { _yMoveTotalSteps = 0; - sendMessage(this, 0x1019, 0); - sendMessage(_parentScene, 0x2006, 0); + sendMessage(this, NM_SCENE_LEAVE, 0); + sendMessage(_parentScene, NM_KLAYMEN_STOP_CLIMBING, 0); return; } if (_isBraking) { if (_steps <= 0) { - sendMessage(this, 0x1019, 0); + sendMessage(this, NM_SCENE_LEAVE, 0); return; } else _steps--; @@ -623,8 +623,8 @@ void AsCommonCar::suMoveToNextPoint() { if (_currPointIndex == (int)_pathPoints->size() - 1) { _isBraking = true; _yMoveTotalSteps = 0; - sendMessage(this, 0x1019, 0); - sendMessage(_parentScene, 0x2006, 0); + sendMessage(this, NM_SCENE_LEAVE, 0); + sendMessage(_parentScene, NM_KLAYMEN_STOP_CLIMBING, 0); } } @@ -635,14 +635,14 @@ void AsCommonCar::suMoveToPrevPoint() { if (_currPointIndex == 0 && _stepError == 0) { _yMoveTotalSteps = 0; - sendMessage(this, 0x1019, 0); - sendMessage(_parentScene, 0x2005, 0); + sendMessage(this, NM_SCENE_LEAVE, 0); + sendMessage(_parentScene, NM_KLAYMEN_CLIMB_LADDER, 0); return; } if (_isBraking) { if (_steps <= 0) { - sendMessage(this, 0x1019, 0); + sendMessage(this, NM_SCENE_LEAVE, 0); return; } else _steps--; @@ -768,8 +768,8 @@ void AsCommonCar::suMoveToPrevPoint() { if (_currPointIndex == 0 && _stepError == 0) { _isBraking = true; _yMoveTotalSteps = 0; - sendMessage(this, 0x1019, 0); - sendMessage(_parentScene, 0x2005, 0); + sendMessage(this, NM_SCENE_LEAVE, 0); + sendMessage(_parentScene, NM_KLAYMEN_CLIMB_LADDER, 0); } } @@ -860,7 +860,7 @@ uint32 KmScene1608::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: if (_isSittingInTeleporter) GotoState(&Klaymen::stSitIdleTeleporter); else @@ -884,11 +884,11 @@ uint32 KmScene1608::xHandleMessage(int messageNum, const MessageParam ¶m) { else startWalkToAttachedSpriteXDistance(param.asPoint().x); break; - case 0x481D: + case NM_KLAYMEN_TURN_TO_USE: if (_isSittingInTeleporter) GotoState(&Klaymen::stTurnToUseInTeleporter); break; - case 0x481E: + case NM_KLAYMEN_RETURN_FROM_USE: if (_isSittingInTeleporter) GotoState(&Klaymen::stReturnFromUseInTeleporter); break; diff --git a/engines/neverhood/modules/module1700_sprites.cpp b/engines/neverhood/modules/module1700_sprites.cpp index d5c4deb752..d6e00c95f3 100644 --- a/engines/neverhood/modules/module1700_sprites.cpp +++ b/engines/neverhood/modules/module1700_sprites.cpp @@ -56,7 +56,7 @@ uint32 SsScene1705Tape::handleMessage(int messageNum, const MessageParam ¶m, sendMessage(_parentScene, 0x4826, 0); messageResult = 1; break; - case 0x4806: + case NM_KLAYMEN_USE_OBJECT: setSubVar(VA_HAS_TAPE, _tapeIndex, 1); setVisible(false); SetMessageHandler(NULL); @@ -82,7 +82,7 @@ uint32 KmScene1705::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: if (_isSittingInTeleporter) GotoState(&Klaymen::stSitIdleTeleporter); else @@ -109,12 +109,12 @@ uint32 KmScene1705::xHandleMessage(int messageNum, const MessageParam ¶m) { else startWalkToAttachedSpriteXDistance(param.asPoint().x); break; - case 0x481D: + case NM_KLAYMEN_TURN_TO_USE: if (_isSittingInTeleporter) { GotoState(&Klaymen::stTurnToUseInTeleporter); } break; - case 0x481E: + case NM_KLAYMEN_RETURN_FROM_USE: if (_isSittingInTeleporter) GotoState(&Klaymen::stReturnFromUseInTeleporter); break; diff --git a/engines/neverhood/modules/module1900.cpp b/engines/neverhood/modules/module1900.cpp index 1ec342d817..5fdc6091dc 100644 --- a/engines/neverhood/modules/module1900.cpp +++ b/engines/neverhood/modules/module1900.cpp @@ -198,7 +198,7 @@ void Scene1907::update() { uint32 Scene1907::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: if ((param.asPoint().x <= 20 || param.asPoint().x >= 620) && !_hasPlugInFailed && _moveDownCountdown == 0 && _moveUpCountdown == 0 && _countdown3 == 0) { leaveScene(0); diff --git a/engines/neverhood/modules/module1900_sprites.cpp b/engines/neverhood/modules/module1900_sprites.cpp index 7bc160b2c1..9e43203def 100644 --- a/engines/neverhood/modules/module1900_sprites.cpp +++ b/engines/neverhood/modules/module1900_sprites.cpp @@ -216,7 +216,7 @@ void AsScene1907Symbol::tryToPlugIn() { _plugInTryCount++; _newPositionIndex = _parentScene->getNextPosition(); _parentScene->setPositionFree(_currPositionIndex, true); - sendMessage(_parentScene, 0x1022, 1100 + _newPositionIndex); + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 1100 + _newPositionIndex); startAnimation(kAsScene1907SymbolFileHashes[_elementIndex], 0, -1); SetUpdateHandler(&AsScene1907Symbol::update); SetMessageHandler(&AsScene1907Symbol::hmTryToPlugIn); @@ -255,7 +255,7 @@ void AsScene1907Symbol::fallOff(int newPositionIndex, int fallOffDelay) { void AsScene1907Symbol::stFallOffHitGround() { playSound(1); - sendMessage(_parentScene, 0x1022, 1000 + _newPositionIndex); + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 1000 + _newPositionIndex); Entity::_priority = 1000 - _newPositionIndex; _parentScene->removeCollisionSprite(this); _parentScene->addCollisionSprite(this); @@ -426,17 +426,17 @@ uint32 KmScene1901::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; case 0x4817: setDoDeltaX(param.asInteger()); gotoNextStateExt(); break; - case 0x481D: + case NM_KLAYMEN_TURN_TO_USE: GotoState(&Klaymen::stTurnToUse); break; - case 0x481E: + case NM_KLAYMEN_RETURN_FROM_USE: GotoState(&Klaymen::stReturnFromUse); break; case 0x482D: diff --git a/engines/neverhood/modules/module2000_sprites.cpp b/engines/neverhood/modules/module2000_sprites.cpp index 0f0faff69c..35edd8e73f 100644 --- a/engines/neverhood/modules/module2000_sprites.cpp +++ b/engines/neverhood/modules/module2000_sprites.cpp @@ -41,7 +41,7 @@ uint32 KmScene2001::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: if (_isSittingInTeleporter) GotoState(&Klaymen::stSitIdleTeleporter); else @@ -58,11 +58,11 @@ uint32 KmScene2001::xHandleMessage(int messageNum, const MessageParam ¶m) { setDoDeltaX(param.asInteger()); gotoNextStateExt(); break; - case 0x481D: + case NM_KLAYMEN_TURN_TO_USE: if (_isSittingInTeleporter) GotoState(&Klaymen::stTurnToUseInTeleporter); break; - case 0x481E: + case NM_KLAYMEN_RETURN_FROM_USE: if (_isSittingInTeleporter) GotoState(&Klaymen::stReturnFromUseInTeleporter); break; diff --git a/engines/neverhood/modules/module2100.cpp b/engines/neverhood/modules/module2100.cpp index f27acc4391..e95eb58420 100644 --- a/engines/neverhood/modules/module2100.cpp +++ b/engines/neverhood/modules/module2100.cpp @@ -147,7 +147,7 @@ void Scene2101::update() { if (_countdown1 != 0) { if (_doorStatus == 2) { if (--_countdown1 == 0) { - sendMessage(_asDoor, NM_DOOR_CLOSE, 0); + sendMessage(_asDoor, NM_KLAYMEN_CLOSE_DOOR, 0); _doorStatus = 1; } } else { @@ -155,12 +155,12 @@ void Scene2101::update() { _canAcceptInput = false; if (--_countdown1 == 0) { if (_klaymen->getX() < 480) { - sendMessage(_asDoor, NM_DOOR_CLOSE, 0); + sendMessage(_asDoor, NM_KLAYMEN_CLOSE_DOOR, 0); _doorStatus = 1; } else if (_klaymen->getX() >= 480 && _klaymen->getX() <= 575) { _klaymen->setDoDeltaX(0); setMessageList2(0x004B8F48); - sendMessage(_asDoor, NM_DOOR_CLOSE, 0); + sendMessage(_asDoor, NM_KLAYMEN_CLOSE_DOOR, 0); sendMessage(_asHitByDoorEffect, 0x2001, 0); _doorStatus = 1; } @@ -196,7 +196,7 @@ uint32 Scene2101::handleMessage(int messageNum, const MessageParam ¶m, Entit break; case 0x480B: if (sender == _ssFloorButton && _doorStatus == 1) { - sendMessage(_asDoor, NM_DOOR_OPEN, 0); + sendMessage(_asDoor, NM_KLAYMEN_OPEN_DOOR, 0); _doorStatus = 0; _countdown1 = 90; } diff --git a/engines/neverhood/modules/module2100_sprites.cpp b/engines/neverhood/modules/module2100_sprites.cpp index e5628d92ce..f43c0afed5 100644 --- a/engines/neverhood/modules/module2100_sprites.cpp +++ b/engines/neverhood/modules/module2100_sprites.cpp @@ -45,10 +45,10 @@ uint32 AsScene2101Door::handleMessage(int messageNum, const MessageParam ¶m, case NM_ANIMATION_STOP: gotoNextState(); break; - case NM_DOOR_OPEN: + case NM_KLAYMEN_OPEN_DOOR: stOpenDoor(); break; - case NM_DOOR_CLOSE: + case NM_KLAYMEN_CLOSE_DOOR: stCloseDoor(); break; } @@ -118,7 +118,7 @@ SsCommonFloorButton::SsCommonFloorButton(NeverhoodEngine *vm, Scene *parentScene void SsCommonFloorButton::update() { if (_countdown != 0 && (--_countdown == 0)) { - sendMessage(_parentScene, 0x1022, 1010); + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 1010); if (_fileHash1) loadSprite(_fileHash1, kSLFDefDrawOffset | kSLFDefPosition); else @@ -132,7 +132,7 @@ uint32 SsCommonFloorButton::handleMessage(int messageNum, const MessageParam &pa case 0x480B: sendMessage(_parentScene, 0x480B, 0); setVisible(true); - sendMessage(_parentScene, 0x1022, 990); + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 990); loadSprite(_fileHash2, kSLFDefDrawOffset | kSLFDefPosition); _countdown = 16; playSound(0, _soundFileHash); @@ -158,7 +158,7 @@ uint32 KmScene2101::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: if (_isSittingInTeleporter) GotoState(&Klaymen::stSitIdleTeleporter); else @@ -193,11 +193,11 @@ uint32 KmScene2101::xHandleMessage(int messageNum, const MessageParam ¶m) { else startWalkToAttachedSpriteXDistance(param.asPoint().x); break; - case 0x481D: + case NM_KLAYMEN_TURN_TO_USE: if (_isSittingInTeleporter) GotoState(&Klaymen::stTurnToUseInTeleporter); break; - case 0x481E: + case NM_KLAYMEN_RETURN_FROM_USE: if (_isSittingInTeleporter) GotoState(&Klaymen::stReturnFromUseInTeleporter); break; diff --git a/engines/neverhood/modules/module2200.cpp b/engines/neverhood/modules/module2200.cpp index fc84b8792f..f0d572ffc3 100644 --- a/engines/neverhood/modules/module2200.cpp +++ b/engines/neverhood/modules/module2200.cpp @@ -575,7 +575,7 @@ uint32 Scene2201::handleMessage(int messageNum, const MessageParam ¶m, Entit break; case 0x480B: if (sender == _ssDoorButton) - sendMessage(_asDoor, NM_DOOR_OPEN, 0); + sendMessage(_asDoor, NM_KLAYMEN_OPEN_DOOR, 0); break; case 0x4826: if (sender == _asTape) { @@ -662,7 +662,7 @@ void Scene2202::update() { uint32 Scene2202::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: if (param.asPoint().x <= 20 || param.asPoint().x >= 620) leaveScene(0); break; @@ -798,7 +798,7 @@ uint32 Scene2203::handleMessage(int messageNum, const MessageParam ¶m, Entit else _ssSmallRightDoor->setVisible(false); break; - case NM_DOOR_OPEN: + case NM_KLAYMEN_OPEN_DOOR: if (sender == _asLeftDoor) { _ssSmallLeftDoor->setVisible(true); _klaymen->setClipRect(_leftDoorClipRect); @@ -1031,19 +1031,19 @@ uint32 Scene2206::handleMessage(int messageNum, const MessageParam ¶m, Entit if (sender == _ssButton) { setGlobalVar(V_SPIKES_RETRACTED, getGlobalVar(V_SPIKES_RETRACTED) ? 0 : 1); if (getGlobalVar(V_SPIKES_RETRACTED)) - sendMessage(_asDoorSpikes, NM_DOOR_OPEN, 0); + sendMessage(_asDoorSpikes, NM_KLAYMEN_OPEN_DOOR, 0); else - sendMessage(_asDoorSpikes, NM_DOOR_CLOSE, 0); + sendMessage(_asDoorSpikes, NM_KLAYMEN_CLOSE_DOOR, 0); } break; case 0x4826: sendEntityMessage(_klaymen, 0x1014, _ssTestTube); setMessageList(0x004B8988); break; - case 0x482A: + case NM_MOVE_TO_BACK: klaymenBehindSpikes(); break; - case 0x482B: + case NM_MOVE_TO_FRONT: klaymenInFrontSpikes(); break; } @@ -1221,9 +1221,9 @@ uint32 Scene2207::handleMessage(int messageNum, const MessageParam ¶m, Entit case 0x2003: _isKlaymenBusy = false; break; - case NM_LEVER_UP: - sendMessage(_asWallRobotAnimation, 0x2007, 0); - sendMessage(_asWallCannonAnimation, 0x2007, 0); + case NM_KLAYMEN_RAISE_LEVER: + sendMessage(_asWallRobotAnimation, NM_CAR_MOVE_TO_PREV_POINT, 0); + sendMessage(_asWallCannonAnimation, NM_CAR_MOVE_TO_PREV_POINT, 0); break; case 0x480B: if (sender == _ssButton) { @@ -1236,9 +1236,9 @@ uint32 Scene2207::handleMessage(int messageNum, const MessageParam ¶m, Entit } } break; - case NM_LEVER_DOWN: - sendMessage(_asWallRobotAnimation, 0x2006, 0); - sendMessage(_asWallCannonAnimation, 0x2006, 0); + case NM_KLAYMEN_LOWER_LEVER: + sendMessage(_asWallRobotAnimation, NM_KLAYMEN_STOP_CLIMBING, 0); + sendMessage(_asWallCannonAnimation, NM_KLAYMEN_STOP_CLIMBING, 0); _asWallRobotAnimation->setVisible(true); _asWallCannonAnimation->setVisible(true); break; @@ -1267,7 +1267,7 @@ uint32 Scene2207::handleMessage2(int messageNum, const MessageParam ¶m, Enti break; case 0x2004: SetMessageHandler(&Scene2207::handleMessage); - sendMessage(_klaymen, 0x2005, 0); + sendMessage(_klaymen, NM_KLAYMEN_CLIMB_LADDER, 0); sendEntityMessage(_klaymen, 0x1014, _asLever); setMessageList(0x004B3920); setRectList(0x004B3948); @@ -1400,7 +1400,7 @@ void Scene2208::update() { uint32 Scene2208::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: if (param.asPoint().x <= 40 || param.asPoint().x >= 600) leaveScene(0); break; diff --git a/engines/neverhood/modules/module2200_sprites.cpp b/engines/neverhood/modules/module2200_sprites.cpp index bd2b658a7f..04cd461ee2 100644 --- a/engines/neverhood/modules/module2200_sprites.cpp +++ b/engines/neverhood/modules/module2200_sprites.cpp @@ -79,7 +79,7 @@ uint32 AsScene2201Door::handleMessage(int messageNum, const MessageParam ¶m, case NM_ANIMATION_STOP: gotoNextState(); break; - case NM_DOOR_OPEN: + case NM_KLAYMEN_OPEN_DOOR: _countdown = 144; if (!_isOpen) stOpenDoor(); @@ -343,7 +343,7 @@ uint32 AsCommonKey::handleMessage(int messageNum, const MessageParam ¶m, Ent sendMessage(_parentScene, 0x4826, 0); messageResult = 1; break; - case 0x4806: + case NM_KLAYMEN_USE_OBJECT: setSubVar(VA_HAS_KEY, _keyIndex, 1); setVisible(false); SetMessageHandler(NULL); @@ -387,15 +387,15 @@ uint32 AsScene2203Door::handleMessage(int messageNum, const MessageParam ¶m, break; case NM_ANIMATION_STOP: if (_doorIndex == getGlobalVar(V_LARGE_DOOR_NUMBER)) - sendMessage(_parentScene, NM_DOOR_OPEN, 0); + sendMessage(_parentScene, NM_KLAYMEN_OPEN_DOOR, 0); stopAnimation(); break; - case NM_DOOR_OPEN: + case NM_KLAYMEN_OPEN_DOOR: setGlobalVar(V_LARGE_DOOR_NUMBER, _doorIndex); - sendMessage(_otherDoor, NM_DOOR_CLOSE, 0); + sendMessage(_otherDoor, NM_KLAYMEN_CLOSE_DOOR, 0); openDoor(); break; - case NM_DOOR_CLOSE: + case NM_KLAYMEN_CLOSE_DOOR: closeDoor(); sendMessage(_parentScene, 0x2003, 0); break; @@ -458,13 +458,13 @@ void AsScene2206DoorSpikes::update() { uint32 AsScene2206DoorSpikes::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case NM_DOOR_OPEN: + case NM_KLAYMEN_OPEN_DOOR: _deltaIndex = 0; playSound(0, 0x032746E0); SetMessageHandler(NULL); SetSpriteUpdate(&AsScene2206DoorSpikes::suOpen); break; - case NM_DOOR_CLOSE: + case NM_KLAYMEN_CLOSE_DOOR: _deltaIndex = 0; playSound(0, 0x002642C0); SetMessageHandler(NULL); @@ -543,7 +543,7 @@ uint32 SsScene2206TestTube::handleMessage(int messageNum, const MessageParam &pa sendMessage(_parentScene, 0x4826, 0); messageResult = 1; break; - case 0x4806: + case NM_KLAYMEN_USE_OBJECT: setGlobalVar(V_HAS_TEST_TUBE, 1); setVisible(false); SetMessageHandler(NULL); @@ -689,17 +689,17 @@ uint32 AsScene2207Lever::handleMessage(int messageNum, const MessageParam ¶m gotoNextState(); stopAnimation(); break; - case NM_LEVER_UP: + case NM_KLAYMEN_RAISE_LEVER: stLeverUp(); break; - case NM_LEVER_DOWN: + case NM_KLAYMEN_LOWER_LEVER: stLeverDown(); break; - case 0x482A: - sendMessage(_parentScene, 0x1022, 990); + case NM_MOVE_TO_BACK: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 990); break; - case 0x482B: - sendMessage(_parentScene, 0x1022, 1010); + case NM_MOVE_TO_FRONT: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 1010); break; } return messageResult; @@ -712,7 +712,7 @@ void AsScene2207Lever::stLeverDown() { } void AsScene2207Lever::stLeverDownEvent() { - sendMessage(_parentScene, NM_LEVER_DOWN, 0); + sendMessage(_parentScene, NM_KLAYMEN_LOWER_LEVER, 0); } void AsScene2207Lever::stLeverUp() { @@ -723,7 +723,7 @@ void AsScene2207Lever::stLeverUp() { } void AsScene2207Lever::stLeverUpEvent() { - sendMessage(_parentScene, NM_LEVER_UP, 0); + sendMessage(_parentScene, NM_KLAYMEN_RAISE_LEVER, 0); } AsScene2207WallRobotAnimation::AsScene2207WallRobotAnimation(NeverhoodEngine *vm, Scene *parentScene) @@ -769,10 +769,10 @@ uint32 AsScene2207WallRobotAnimation::handleMessage(int messageNum, const Messag playSound(0, 0xE0702146); } break; - case 0x2006: + case NM_KLAYMEN_STOP_CLIMBING: stStartAnimation(); break; - case 0x2007: + case NM_CAR_MOVE_TO_PREV_POINT: stStopAnimation(); break; case NM_ANIMATION_STOP: @@ -822,10 +822,10 @@ AsScene2207WallCannonAnimation::AsScene2207WallCannonAnimation(NeverhoodEngine * uint32 AsScene2207WallCannonAnimation::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2006: + case NM_KLAYMEN_STOP_CLIMBING: stStartAnimation(); break; - case 0x2007: + case NM_CAR_MOVE_TO_PREV_POINT: stStopAnimation(); break; case NM_ANIMATION_STOP: @@ -876,7 +876,7 @@ uint32 KmScene2201::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; case NM_KLAYMEN_PICKUP: @@ -899,10 +899,10 @@ uint32 KmScene2201::xHandleMessage(int messageNum, const MessageParam ¶m) { else startWalkToAttachedSpriteXDistance(param.asPoint().x); break; - case 0x481D: + case NM_KLAYMEN_TURN_TO_USE: GotoState(&Klaymen::stTurnToUse); break; - case 0x481E: + case NM_KLAYMEN_RETURN_FROM_USE: GotoState(&Klaymen::stReturnFromUse); break; case 0x482D: @@ -943,7 +943,7 @@ uint32 KmScene2203::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; case NM_KLAYMEN_PICKUP: @@ -981,10 +981,10 @@ uint32 KmScene2203::xHandleMessage(int messageNum, const MessageParam ¶m) { else startWalkToAttachedSpriteXDistance(param.asPoint().x); break; - case 0x481D: + case NM_KLAYMEN_TURN_TO_USE: GotoState(&Klaymen::stTurnToUse); break; - case 0x481E: + case NM_KLAYMEN_RETURN_FROM_USE: GotoState(&Klaymen::stReturnFromUse); break; case 0x482D: @@ -1017,7 +1017,7 @@ uint32 KmScene2203::hmClayDoorOpen(int messageNum, const MessageParam ¶m, En switch (messageNum) { case NM_ANIMATION_START: if (param.asInteger() == 0x040D4186) { - sendMessage(_attachedSprite, NM_DOOR_OPEN, 0); + sendMessage(_attachedSprite, NM_KLAYMEN_OPEN_DOOR, 0); } break; } @@ -1040,7 +1040,7 @@ uint32 KmScene2205::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; case 0x4804: @@ -1092,7 +1092,7 @@ uint32 KmScene2206::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; case 0x4803: @@ -1174,7 +1174,7 @@ void KmScene2206::suRidePlatformDown() { _platformDeltaY++; _y += _platformDeltaY; if (_y > 600) - sendMessage(this, 0x1019, 0); + sendMessage(this, NM_SCENE_LEAVE, 0); } void KmScene2206::stRidePlatformDown() { @@ -1202,7 +1202,7 @@ uint32 KmScene2207::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x2001: GotoState(&Klaymen::stRidePlatform); break; - case 0x2005: + case NM_KLAYMEN_CLIMB_LADDER: suRidePlatform(); GotoState(&Klaymen::stTryStandIdle); break; @@ -1210,7 +1210,7 @@ uint32 KmScene2207::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; case 0x480D: @@ -1270,7 +1270,7 @@ uint32 KmScene2242::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; case 0x4804: @@ -1336,7 +1336,7 @@ uint32 KmHallOfRecords::xHandleMessage(int messageNum, const MessageParam ¶m case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; case 0x4804: @@ -1389,7 +1389,7 @@ uint32 KmScene2247::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; case 0x4804: diff --git a/engines/neverhood/modules/module2400.cpp b/engines/neverhood/modules/module2400.cpp index ac66698886..f1d4422c28 100644 --- a/engines/neverhood/modules/module2400.cpp +++ b/engines/neverhood/modules/module2400.cpp @@ -253,7 +253,7 @@ void Scene2401::update() { if (puzzleSolved) { setGlobalVar(V_NOTES_DOOR_UNLOCKED, 1); setGlobalVar(V_NOTES_PUZZLE_SOLVED, 1); - sendMessage(_asDoor, NM_DOOR_OPEN, 0); + sendMessage(_asDoor, NM_KLAYMEN_OPEN_DOOR, 0); } else if (waterInside) { playPipeSound(0xD0431020); for (uint i = 0; i < 5; i++) { @@ -338,11 +338,11 @@ uint32 Scene2401::handleMessage(int messageNum, const MessageParam ¶m, Entit playSound(0, 0xE1130324); } break; - case 0x482A: + case NM_MOVE_TO_BACK: _palette->addBasePalette(0xB103B604, 0, 65, 0); _palette->startFadeToPalette(12); break; - case 0x482B: + case NM_MOVE_TO_FRONT: _palette->addBasePalette(0x91D3A391, 0, 65, 0); _palette->startFadeToPalette(12); break; @@ -411,7 +411,7 @@ Scene2402::~Scene2402() { void Scene2402::update() { if (_countdown != 0 && (--_countdown) == 0) { if (_pipeStatus >= 10) { - sendMessage(_asDoor, NM_DOOR_OPEN, 0); + sendMessage(_asDoor, NM_KLAYMEN_OPEN_DOOR, 0); _ssDoorFrame->loadSprite(0x00B415E0, kSLFDefDrawOffset | kSLFDefPosition); } else if (_pipeStatus >= 5) { _countdown = 8; @@ -541,7 +541,7 @@ uint32 Scene2403::handleMessage(int messageNum, const MessageParam ¶m, Entit } } break; - case NM_LEVER_DOWN: + case NM_KLAYMEN_LOWER_LEVER: if (sender == _asLightCord) leaveScene(2); break; diff --git a/engines/neverhood/modules/module2400_sprites.cpp b/engines/neverhood/modules/module2400_sprites.cpp index c98a5c83c5..1ea037b36d 100644 --- a/engines/neverhood/modules/module2400_sprites.cpp +++ b/engines/neverhood/modules/module2400_sprites.cpp @@ -197,7 +197,7 @@ uint32 AsScene2401Door::handleMessage(int messageNum, const MessageParam ¶m, case NM_ANIMATION_STOP: gotoNextState(); break; - case NM_DOOR_OPEN: + case NM_KLAYMEN_OPEN_DOOR: if (!_isOpen) { _countdown = 168; _isOpen = true; @@ -257,7 +257,7 @@ uint32 AsScene2402Door::handleMessage(int messageNum, const MessageParam ¶m, case NM_ANIMATION_STOP: gotoNextState(); break; - case NM_DOOR_OPEN: + case NM_KLAYMEN_OPEN_DOOR: _countdown = 144; _isOpen = true; setVisible(true); @@ -368,7 +368,7 @@ uint32 KmScene2401::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; case NM_KLAYMEN_PRESS_BUTTON: @@ -508,7 +508,7 @@ uint32 KmScene2402::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: if (!getGlobalVar(V_TV_JOKE_TOLD)) GotoState(&Klaymen::stStandWonderAbout); else @@ -577,7 +577,7 @@ uint32 KmScene2403::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; case 0x480D: @@ -661,7 +661,7 @@ uint32 KmScene2406::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; case 0x4804: @@ -692,10 +692,10 @@ uint32 KmScene2406::xHandleMessage(int messageNum, const MessageParam ¶m) { else startWalkToAttachedSpriteXDistance(param.asPoint().x); break; - case 0x481D: + case NM_KLAYMEN_TURN_TO_USE: GotoState(&Klaymen::stTurnToUse); break; - case 0x481E: + case NM_KLAYMEN_RETURN_FROM_USE: GotoState(&Klaymen::stReturnFromUse); break; case 0x481F: diff --git a/engines/neverhood/modules/module2500.cpp b/engines/neverhood/modules/module2500.cpp index 468545fd80..945cb4e1a5 100644 --- a/engines/neverhood/modules/module2500.cpp +++ b/engines/neverhood/modules/module2500.cpp @@ -252,7 +252,7 @@ Scene2501::Scene2501(NeverhoodEngine *vm, Module *parentModule, int which) setRectList(0x004B2608); SetMessageHandler(&Scene2501::handleMessage); SetUpdateHandler(&Scene2501::update); - sendMessage(_asCar, 0x2009, 0); + sendMessage(_asCar, NM_CAR_ENTER, 0); _asCar->setVisible(false); _currTrackIndex = 0; } else if (which == 1 || which == 2) { @@ -277,7 +277,7 @@ Scene2501::Scene2501(NeverhoodEngine *vm, Module *parentModule, int which) setRectList(0x004B2608); SetMessageHandler(&Scene2501::handleMessage); SetUpdateHandler(&Scene2501::update); - sendMessage(_asCar, 0x2009, 0); + sendMessage(_asCar, NM_CAR_ENTER, 0); _asCar->setVisible(false); _currTrackIndex = 0; } @@ -297,12 +297,12 @@ Scene2501::Scene2501(NeverhoodEngine *vm, Module *parentModule, int which) NPoint testPoint = (*_trackPoints)[_trackPoints->size() - 1]; sendMessage(_asCar, 0x2002, _trackPoints->size() - 1); if (testPoint.x < 0 || testPoint.x >= 640 || testPoint.y < 0 || testPoint.y >= 480) - sendMessage(_asCar, 0x2007, 150); + sendMessage(_asCar, NM_CAR_MOVE_TO_PREV_POINT, 150); } else { NPoint testPoint = (*_trackPoints)[0]; sendMessage(_asCar, 0x2002, 0); if (testPoint.x < 0 || testPoint.x >= 640 || testPoint.y < 0 || testPoint.y >= 480) - sendMessage(_asCar, 0x2008, 150); + sendMessage(_asCar, NM_CAR_MOVE_TO_NEXT_POINT, 150); } _carStatus = 0; @@ -329,7 +329,7 @@ void Scene2501::update() { _asIdleCarLower->setVisible(false); _asIdleCarFull->setVisible(false); _asCar->setVisible(true); - sendMessage(_asCar, 0x2009, 0); + sendMessage(_asCar, NM_CAR_ENTER, 0); _asCar->handleUpdate(); _klaymen = NULL; _carStatus = 0; @@ -341,7 +341,7 @@ void Scene2501::upCarAtHome() { Scene::update(); if (_mouseClicked) { if (_mouseClickPos.x <= 210 && _asCar->getX() == 211 && _asCar->getY() == 400) { - sendMessage(_asCar, 0x200A, 0); + sendMessage(_asCar, NM_CAR_LEAVE, 0); SetUpdateHandler(&Scene2501::upGettingOutOfCar); } else { moveCarToPoint(_mouseClickPos); @@ -399,23 +399,23 @@ uint32 Scene2501::handleMessage(int messageNum, const MessageParam ¶m, Entit uint32 Scene2501::hmRidingCar(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2005: + case NM_KLAYMEN_CLIMB_LADDER: if (_tracks[_currTrackIndex]->which1 < 0 && _newTrackIndex >= 0) changeTrack(); else if (_tracks[_currTrackIndex]->which1 == 0) { SetMessageHandler(&Scene2501::hmCarAtHome); SetUpdateHandler(&Scene2501::upCarAtHome); - sendMessage(_asCar, 0x200F, 1); + sendMessage(_asCar, NM_CAR_AT_HOME, 1); } else if (_tracks[_currTrackIndex]->which1 > 0) leaveScene(_tracks[_currTrackIndex]->which1); break; - case 0x2006: + case NM_KLAYMEN_STOP_CLIMBING: if (_tracks[_currTrackIndex]->which2 < 0 && _newTrackIndex >= 0) changeTrack(); else if (_tracks[_currTrackIndex]->which2 == 0) { SetMessageHandler(&Scene2501::hmCarAtHome); SetUpdateHandler(&Scene2501::upCarAtHome); - sendMessage(_asCar, 0x200F, 1); + sendMessage(_asCar, NM_CAR_AT_HOME, 1); } else if (_tracks[_currTrackIndex]->which2 > 0) leaveScene(_tracks[_currTrackIndex]->which2); break; @@ -429,7 +429,7 @@ uint32 Scene2501::hmRidingCar(int messageNum, const MessageParam ¶m, Entity uint32 Scene2501::hmCarAtHome(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x200A: + case NM_CAR_LEAVE: _carStatus = 2; break; case 0x200D: @@ -491,7 +491,7 @@ Scene2504::Scene2504(NeverhoodEngine *vm, Module *parentModule, int which) uint32 Scene2504::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: if (param.asPoint().x <= 20 || param.asPoint().x >= 620) leaveScene(0); break; diff --git a/engines/neverhood/modules/module2500_sprites.cpp b/engines/neverhood/modules/module2500_sprites.cpp index 989847223e..1394a87db6 100644 --- a/engines/neverhood/modules/module2500_sprites.cpp +++ b/engines/neverhood/modules/module2500_sprites.cpp @@ -89,7 +89,7 @@ uint32 KmScene2501::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: if (_isSittingInTeleporter) GotoState(&Klaymen::stSitIdleTeleporter); else @@ -99,11 +99,11 @@ uint32 KmScene2501::xHandleMessage(int messageNum, const MessageParam ¶m) { setDoDeltaX(param.asInteger()); gotoNextStateExt(); break; - case 0x481D: + case NM_KLAYMEN_TURN_TO_USE: if (_isSittingInTeleporter) GotoState(&Klaymen::stTurnToUseInTeleporter); break; - case 0x481E: + case NM_KLAYMEN_RETURN_FROM_USE: if (_isSittingInTeleporter) GotoState(&Klaymen::stReturnFromUseInTeleporter); break; diff --git a/engines/neverhood/modules/module2600.cpp b/engines/neverhood/modules/module2600.cpp index d45d1bb420..605634a649 100644 --- a/engines/neverhood/modules/module2600.cpp +++ b/engines/neverhood/modules/module2600.cpp @@ -239,7 +239,7 @@ Scene2609::Scene2609(NeverhoodEngine *vm, Module *parentModule, int which) uint32 Scene2609::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: if ((param.asPoint().x <= 20 || param.asPoint().x >= 620) && !_isBusy) leaveScene(0); break; diff --git a/engines/neverhood/modules/module2700.cpp b/engines/neverhood/modules/module2700.cpp index 1b78615fdb..1f680fe5a1 100644 --- a/engines/neverhood/modules/module2700.cpp +++ b/engines/neverhood/modules/module2700.cpp @@ -578,12 +578,12 @@ Scene2701::Scene2701(NeverhoodEngine *vm, Module *parentModule, int which) NPoint testPoint = (*_trackPoints)[_trackPoints->size() - 1]; sendMessage(_asCar, 0x2002, _trackPoints->size() - 1); if (testPoint.x < 0 || testPoint.x >= 640 || testPoint.y < 0 || testPoint.y >= 480) - sendMessage(_asCar, 0x2007, 150); + sendMessage(_asCar, NM_CAR_MOVE_TO_PREV_POINT, 150); } else { NPoint testPoint = (*_trackPoints)[0]; sendMessage(_asCar, 0x2002, 0); if (testPoint.x < 0 || testPoint.x >= 640 || testPoint.y < 0 || testPoint.y >= 480) - sendMessage(_asCar, 0x2008, 150); + sendMessage(_asCar, NM_CAR_MOVE_TO_NEXT_POINT, 150); } _asCar->setClipRect(clipRect); @@ -592,7 +592,7 @@ Scene2701::Scene2701(NeverhoodEngine *vm, Module *parentModule, int which) if (which == 1) { SetMessageHandler(&Scene2701::hmRidingCar); } else { - sendMessage(_asCar, 0x2009, 0); + sendMessage(_asCar, NM_CAR_ENTER, 0); SetMessageHandler(&Scene2701::hmCarAtHome); } @@ -601,14 +601,14 @@ Scene2701::Scene2701(NeverhoodEngine *vm, Module *parentModule, int which) uint32 Scene2701::hmRidingCar(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: sendPointMessage(_asCar, 0x2004, param.asPoint()); break; - case 0x2005: + case NM_KLAYMEN_CLIMB_LADDER: if (_which1 >= 0) SetMessageHandler(&Scene2701::hmCarAtHome); break; - case 0x2006: + case NM_KLAYMEN_STOP_CLIMBING: if (_which2 >= 0) leaveScene(_which2); break; @@ -622,7 +622,7 @@ uint32 Scene2701::hmRidingCar(int messageNum, const MessageParam ¶m, Entity uint32 Scene2701::hmCarAtHome(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: if (param.asPoint().x >= 385) leaveScene(0); else { @@ -703,10 +703,10 @@ Scene2702::Scene2702(NeverhoodEngine *vm, Module *parentModule, int which) if (which == _tracks[_currTrackIndex]->which2) { sendMessage(_asCar, 0x2002, _trackPoints->size() - 1); - sendMessage(_asCar, 0x2007, 150); + sendMessage(_asCar, NM_CAR_MOVE_TO_PREV_POINT, 150); } else { sendMessage(_asCar, 0x2002, 0); - sendMessage(_asCar, 0x2008, 150); + sendMessage(_asCar, NM_CAR_MOVE_TO_NEXT_POINT, 150); } _palette->copyBasePalette(0, 256, 0); @@ -731,17 +731,17 @@ void Scene2702::update() { uint32 Scene2702::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: moveCarToPoint(param.asPoint()); break; - case 0x2005: + case NM_KLAYMEN_CLIMB_LADDER: if (_newTrackIndex >= 0) { if (_tracks[_currTrackIndex]->which1 < 0) changeTrack(); } else if (_tracks[_currTrackIndex]->which1 >= 0) leaveScene(_tracks[_currTrackIndex]->which1); break; - case 0x2006: + case NM_KLAYMEN_STOP_CLIMBING: if (_newTrackIndex >= 0) { if (_tracks[_currTrackIndex]->which2 < 0) changeTrack(); @@ -834,16 +834,16 @@ Scene2703::Scene2703(NeverhoodEngine *vm, Module *parentModule, int which, uint3 NPoint testPoint = (*_trackPoints)[_trackPoints->size() - 1]; sendMessage(_asCar, 0x2002, _trackPoints->size() - 1); if (testPoint.x > 0 && testPoint.x < 640 && testPoint.y > 0 && testPoint.y < 480) - sendMessage(_asCar, 0x2009, 0); + sendMessage(_asCar, NM_CAR_ENTER, 0); else - sendMessage(_asCar, 0x2007, 150); + sendMessage(_asCar, NM_CAR_MOVE_TO_PREV_POINT, 150); } else { NPoint testPoint = (*_trackPoints)[0]; sendMessage(_asCar, 0x2002, 0); if (testPoint.x > 0 && testPoint.x < 640 && testPoint.y > 0 && testPoint.y < 480) - sendMessage(_asCar, 0x2009, 0); + sendMessage(_asCar, NM_CAR_ENTER, 0); else - sendMessage(_asCar, 0x2008, 150); + sendMessage(_asCar, NM_CAR_MOVE_TO_NEXT_POINT, 150); } if (which == 0) { @@ -891,11 +891,11 @@ void Scene2703::update() { uint32 Scene2703::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2005: + case NM_KLAYMEN_CLIMB_LADDER: if (_which1 >= 0) leaveScene(_which1); break; - case 0x2006: + case NM_KLAYMEN_STOP_CLIMBING: if (_which2 >= 0) leaveScene(_which2); break; @@ -953,16 +953,16 @@ Scene2704::Scene2704(NeverhoodEngine *vm, Module *parentModule, int which, uint3 NPoint testPoint = (*_trackPoints)[_trackPoints->size() - 1]; sendMessage(_asCar, 0x2002, _trackPoints->size() - 1); if (testPoint.x > 0 && testPoint.x < 640 && testPoint.y > 0 && testPoint.y < 480) - sendMessage(_asCar, 0x2009, 0); + sendMessage(_asCar, NM_CAR_ENTER, 0); else - sendMessage(_asCar, 0x2007, 0); + sendMessage(_asCar, NM_CAR_MOVE_TO_PREV_POINT, 0); } else { NPoint testPoint = (*_trackPoints)[0]; sendMessage(_asCar, 0x2002, 0); if (testPoint.x > 0 && testPoint.x < 640 && testPoint.y > 0 && testPoint.y < 480) - sendMessage(_asCar, 0x2009, 0); + sendMessage(_asCar, NM_CAR_ENTER, 0); else - sendMessage(_asCar, 0x2008, 0); + sendMessage(_asCar, NM_CAR_MOVE_TO_NEXT_POINT, 0); } if (clipRect) { @@ -990,11 +990,11 @@ void Scene2704::update() { uint32 Scene2704::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2005: + case NM_KLAYMEN_CLIMB_LADDER: if (_which1 >= 0) leaveScene(_which1); break; - case 0x2006: + case NM_KLAYMEN_STOP_CLIMBING: if (_which2 >= 0) leaveScene(_which2); break; @@ -1046,15 +1046,15 @@ Scene2706::Scene2706(NeverhoodEngine *vm, Module *parentModule, int which) if (which == _tracks[_currTrackIndex]->which2) { sendMessage(_asCar, 0x2002, _trackPoints->size() - 1); if (which == 5) - sendMessage(_asCar, 0x2007, 50); + sendMessage(_asCar, NM_CAR_MOVE_TO_PREV_POINT, 50); else - sendMessage(_asCar, 0x2007, 150); + sendMessage(_asCar, NM_CAR_MOVE_TO_PREV_POINT, 150); } else { sendMessage(_asCar, 0x2002, 0); if (which == 5) - sendMessage(_asCar, 0x2008, 50); + sendMessage(_asCar, NM_CAR_MOVE_TO_NEXT_POINT, 50); else - sendMessage(_asCar, 0x2008, 150); + sendMessage(_asCar, NM_CAR_MOVE_TO_NEXT_POINT, 150); } } @@ -1062,17 +1062,17 @@ Scene2706::Scene2706(NeverhoodEngine *vm, Module *parentModule, int which) uint32 Scene2706::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: moveCarToPoint(param.asPoint()); break; - case 0x2005: + case NM_KLAYMEN_CLIMB_LADDER: if (_newTrackIndex >= 0) { if (_tracks[_currTrackIndex]->which1 < 0) changeTrack(); } else if (_tracks[_currTrackIndex]->which1 >= 0) leaveScene(_tracks[_currTrackIndex]->which1); break; - case 0x2006: + case NM_KLAYMEN_STOP_CLIMBING: if (_newTrackIndex >= 0) { if (_tracks[_currTrackIndex]->which2 < 0) changeTrack(); diff --git a/engines/neverhood/modules/module2800.cpp b/engines/neverhood/modules/module2800.cpp index b71fcab49c..8e58027849 100644 --- a/engines/neverhood/modules/module2800.cpp +++ b/engines/neverhood/modules/module2800.cpp @@ -478,11 +478,11 @@ uint32 Scene2801::handleMessage(int messageNum, const MessageParam ¶m, Entit setMessageList(0x004B6C40); } break; - case 0x482A: + case NM_MOVE_TO_BACK: _palette->addBasePalette(0xB103B604, 0, 65, 0); _palette->startFadeToPalette(12); break; - case 0x482B: + case NM_MOVE_TO_FRONT: _palette->addBasePalette(_paletteHash, 0, 65, 0); _palette->startFadeToPalette(12); break; @@ -586,7 +586,7 @@ uint32 Scene2802::handleMessage(int messageNum, const MessageParam ¶m, Entit int prevTuneStatus = _currTuneStatus; Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: if (param.asPoint().x <= 20 || param.asPoint().x >= 620) { leaveScene(0); } else if (_currTuneStatus == 0) { @@ -779,7 +779,7 @@ void Scene2803::upKlaymenStairs() { uint32 Scene2803::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case NM_LEVER_DOWN: + case NM_KLAYMEN_LOWER_LEVER: toggleBackground(); // NOTE Intentional fall-through case NM_ANIMATION_START: @@ -797,11 +797,11 @@ uint32 Scene2803::handleMessage(int messageNum, const MessageParam ¶m, Entit } else if (param.asInteger() == 0x9626F390) setMessageList(0x004B7A88); break; - case 0x482A: + case NM_MOVE_TO_BACK: klaymenStairs(); setPaletteArea1(); break; - case 0x482B: + case NM_MOVE_TO_FRONT: klaymenFloor(); setPaletteArea0(); break; @@ -1043,7 +1043,7 @@ uint32 Scene2803Small::handleMessage(int messageNum, const MessageParam ¶m, setMessageList(0x004B61A8); } break; - case 0x482A: + case NM_MOVE_TO_BACK: if (_klaymen->getX() < 200) { setPaletteArea3(); } else if (_klaymen->getX() < 500) { @@ -1055,7 +1055,7 @@ uint32 Scene2803Small::handleMessage(int messageNum, const MessageParam ¶m, setPaletteArea2(); } break; - case 0x482B: + case NM_MOVE_TO_FRONT: _sprite6->setVisible(false); _sprite7->setVisible(false); _klaymen->setClipRect(0, 0, 640, 480); @@ -1206,7 +1206,7 @@ Scene2804::Scene2804(NeverhoodEngine *vm, Module *parentModule, int which) uint32 Scene2804::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: if (param.asPoint().x <= 20 || param.asPoint().x >= 620) { leaveScene(0); } @@ -1243,7 +1243,7 @@ void Scene2804::update() { if (_countdown2 != 0 && (--_countdown2) == 0) { _isWorking = false; sendMessage(_asCoil, 0x2003, 0); - sendMessage(_asTarget, 0x2005, 0); + sendMessage(_asTarget, NM_KLAYMEN_CLIMB_LADDER, 0); for (uint index = 0; index < 5; index++) _asCrystals[index]->hide(); } @@ -1487,7 +1487,7 @@ Scene2807::Scene2807(NeverhoodEngine *vm, Module *parentModule, int which) uint32 Scene2807::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: if (param.asPoint().x <= 20 || param.asPoint().x >= 620) { leaveScene(0); } @@ -1557,7 +1557,7 @@ Scene2808::Scene2808(NeverhoodEngine *vm, Module *parentModule, int which) uint32 Scene2808::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: if ((param.asPoint().x <= 20 || param.asPoint().x >= 620) && !isAnyTestTubeFilled()) { leaveScene(1); } @@ -2051,7 +2051,7 @@ uint32 Scene2812::handleMessage(int messageNum, const MessageParam ¶m, Entit setRectList(0x004AF700); _klaymen->setClipRect(_sprite4->getDrawRect().x, 0, 640, _sprite3->getDrawRect().y2()); break; - case 0x4806: + case NM_KLAYMEN_USE_OBJECT: sendMessage(_asWinch, 0x2000, 0); sendMessage(_asTrapDoor, 0x2000, 0); break; @@ -2064,12 +2064,12 @@ uint32 Scene2812::handleMessage(int messageNum, const MessageParam ¶m, Entit setMessageList(0x004AF668); } break; - case 0x482A: + case NM_MOVE_TO_BACK: setPaletteArea1(false); _sprite1->setVisible(true); _klaymen->setClipRect(_sprite1->getDrawRect().x, 0, _sprite1->getDrawRect().x2(), _sprite3->getDrawRect().y2()); break; - case 0x482B: + case NM_MOVE_TO_FRONT: setPaletteArea0(false); _sprite1->setVisible(false); _klaymen->setClipRect(_sprite4->getDrawRect().x, 0, 640, _sprite3->getDrawRect().y2()); @@ -2160,7 +2160,7 @@ void Scene2822::update() { uint32 Scene2822::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: if (param.asPoint().x <= 20 || param.asPoint().x >= 620) { leaveScene(0); } else if (param.asPoint().x >= 257 && param.asPoint().y >= 235 && diff --git a/engines/neverhood/modules/module2800_sprites.cpp b/engines/neverhood/modules/module2800_sprites.cpp index 14273abc2d..e0370ccd51 100644 --- a/engines/neverhood/modules/module2800_sprites.cpp +++ b/engines/neverhood/modules/module2800_sprites.cpp @@ -42,18 +42,18 @@ uint32 AsScene2803LightCord::handleMessage(int messageNum, const MessageParam &p switch (messageNum) { case NM_ANIMATION_START: if (!_isBusy && param.asInteger() == calcHash("ClickSwitch")) { - sendMessage(_parentScene, NM_LEVER_DOWN, 0); + sendMessage(_parentScene, NM_KLAYMEN_LOWER_LEVER, 0); playSound(0, 0x4E1CA4A0); } break; - case NM_LEVER_DOWN: + case NM_KLAYMEN_LOWER_LEVER: stPulled(); break; - case 0x482A: - sendMessage(_parentScene, 0x1022, 990); + case NM_MOVE_TO_BACK: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 990); break; - case 0x482B: - sendMessage(_parentScene, 0x1022, 1010); + case NM_MOVE_TO_FRONT: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 1010); break; } return messageResult; @@ -137,11 +137,11 @@ uint32 AsScene2803Rope::handleMessage(int messageNum, const MessageParam ¶m, startAnimation(0x9D098C23, 50, -1); SetMessageHandler(&AsScene2803Rope::hmReleased); break; - case 0x482A: - sendMessage(_parentScene, 0x1022, 990); + case NM_MOVE_TO_BACK: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 990); break; - case 0x482B: - sendMessage(_parentScene, 0x1022, 1010); + case NM_MOVE_TO_FRONT: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 1010); break; } return messageResult; @@ -153,11 +153,11 @@ uint32 AsScene2803Rope::hmReleased(int messageNum, const MessageParam ¶m, En case NM_ANIMATION_STOP: gotoNextState(); break; - case 0x482A: - sendMessage(_parentScene, 0x1022, 990); + case NM_MOVE_TO_BACK: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 990); break; - case 0x482B: - sendMessage(_parentScene, 0x1022, 1010); + case NM_MOVE_TO_FRONT: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 1010); break; } return messageResult; @@ -247,7 +247,7 @@ uint32 SsScene2804LightTarget::handleMessage(int messageNum, const MessageParam updatePosition(); messageResult = 1; break; - case 0x2005: + case NM_KLAYMEN_CLIMB_LADDER: setVisible(false); updatePosition(); messageResult = 1; @@ -537,7 +537,7 @@ uint32 AsScene2804BeamTarget::handleMessage(int messageNum, const MessageParam & startAnimation(0x03842000, 0, -1); messageResult = 1; break; - case 0x2005: + case NM_KLAYMEN_CLIMB_LADDER: setVisible(false); stopAnimation(); messageResult = 1; @@ -906,11 +906,11 @@ uint32 AsScene2810Rope::handleMessage(int messageNum, const MessageParam ¶m, case NM_ANIMATION_STOP: startAnimation(0x9D098C23, 35, 53); break; - case 0x482A: - sendMessage(_parentScene, 0x1022, 990); + case NM_MOVE_TO_BACK: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 990); break; - case 0x482B: - sendMessage(_parentScene, 0x1022, 1010); + case NM_MOVE_TO_FRONT: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 1010); break; } return messageResult; @@ -962,15 +962,15 @@ AsScene2812Rope::AsScene2812Rope(NeverhoodEngine *vm, Scene *parentScene) uint32 AsScene2812Rope::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x4806: + case NM_KLAYMEN_USE_OBJECT: setDoDeltaX(((Sprite*)sender)->isDoDeltaX() ? 1 : 0); stRopingDown(); break; - case 0x482A: - sendMessage(_parentScene, 0x1022, 990); + case NM_MOVE_TO_BACK: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 990); break; - case 0x482B: - sendMessage(_parentScene, 0x1022, 1010); + case NM_MOVE_TO_FRONT: + sendMessage(_parentScene, NM_PRIORITY_CHANGE, 1010); break; } return messageResult; @@ -987,7 +987,7 @@ uint32 AsScene2812Rope::hmRopingDown(int messageNum, const MessageParam ¶m, } void AsScene2812Rope::stRopingDown() { - sendMessage(_parentScene, 0x4806, 0); + sendMessage(_parentScene, NM_KLAYMEN_USE_OBJECT, 0); startAnimation(0x9D098C23, 0, -1); SetMessageHandler(&AsScene2812Rope::hmRopingDown); } @@ -1023,7 +1023,7 @@ uint32 KmScene2801::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; case NM_KLAYMEN_PICKUP: @@ -1039,10 +1039,10 @@ uint32 KmScene2801::xHandleMessage(int messageNum, const MessageParam ¶m) { else startWalkToAttachedSpriteXDistance(param.asPoint().x); break; - case 0x481D: + case NM_KLAYMEN_TURN_TO_USE: GotoState(&Klaymen::stTurnToUse); break; - case 0x481E: + case NM_KLAYMEN_RETURN_FROM_USE: GotoState(&Klaymen::stReturnFromUse); break; case 0x481F: @@ -1093,7 +1093,7 @@ uint32 KmScene2803::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; case 0x4803: @@ -1114,10 +1114,10 @@ uint32 KmScene2803::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4818: startWalkToX(_dataResource.getPoint(param.asInteger()).x, false); break; - case 0x481D: + case NM_KLAYMEN_TURN_TO_USE: GotoState(&Klaymen::stTurnToUse); break; - case 0x481E: + case NM_KLAYMEN_RETURN_FROM_USE: GotoState(&Klaymen::stReturnFromUse); break; case 0x481F: @@ -1154,7 +1154,7 @@ uint32 KmScene2803Small::xHandleMessage(int messageNum, const MessageParam ¶ case 0x4800: startWalkToXSmall(param.asPoint().x); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stStandIdleSmall); break; case 0x4817: @@ -1200,7 +1200,7 @@ uint32 KmScene2803Small::hmShrink(int messageNum, const MessageParam ¶m, Ent switch (messageNum) { case NM_ANIMATION_START: if (param.asInteger() == 0x80C110B5) - sendMessage(_parentScene, 0x482A, 0); + sendMessage(_parentScene, NM_MOVE_TO_BACK, 0); else if (param.asInteger() == 0x33288344) playSound(2, 0x10688664); break; @@ -1235,7 +1235,7 @@ uint32 KmScene2805::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: if (_isSittingInTeleporter) GotoState(&Klaymen::stSitIdleTeleporter); else @@ -1245,11 +1245,11 @@ uint32 KmScene2805::xHandleMessage(int messageNum, const MessageParam ¶m) { setDoDeltaX(param.asInteger()); gotoNextStateExt(); break; - case 0x481D: + case NM_KLAYMEN_TURN_TO_USE: if (_isSittingInTeleporter) GotoState(&Klaymen::stTurnToUseInTeleporter); break; - case 0x481E: + case NM_KLAYMEN_RETURN_FROM_USE: if (_isSittingInTeleporter) GotoState(&Klaymen::stReturnFromUseInTeleporter); break; @@ -1301,7 +1301,7 @@ uint32 KmScene2806::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; case 0x4804: @@ -1359,7 +1359,7 @@ uint32 KmScene2809::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; case 0x4804: @@ -1404,7 +1404,7 @@ uint32 KmScene2810Small::xHandleMessage(int messageNum, const MessageParam ¶ case 0x4800: startWalkToXSmall(param.asPoint().x); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stStandIdleSmall); break; case 0x4817: @@ -1453,7 +1453,7 @@ uint32 KmScene2810::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; case 0x4803: @@ -1545,7 +1545,7 @@ uint32 KmScene2812::xHandleMessage(int messageNum, const MessageParam ¶m) { case 0x4800: startWalkToX(param.asPoint().x, false); break; - case 0x4004: + case NM_KLAYMEN_STAND_IDLE: GotoState(&Klaymen::stTryStandIdle); break; case 0x4805: @@ -1573,10 +1573,10 @@ uint32 KmScene2812::xHandleMessage(int messageNum, const MessageParam ¶m) { else startWalkToAttachedSpriteXDistance(param.asPoint().x); break; - case 0x481D: + case NM_KLAYMEN_TURN_TO_USE: GotoState(&Klaymen::stTurnToUse); break; - case 0x481E: + case NM_KLAYMEN_RETURN_FROM_USE: GotoState(&Klaymen::stReturnFromUse); break; case 0x4820: diff --git a/engines/neverhood/modules/module2900.cpp b/engines/neverhood/modules/module2900.cpp index a68be3994f..ca734972ca 100644 --- a/engines/neverhood/modules/module2900.cpp +++ b/engines/neverhood/modules/module2900.cpp @@ -211,7 +211,7 @@ void Scene2901::update() { uint32 Scene2901::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: if (param.asPoint().x <= 20 || param.asPoint().x >= 620) leaveScene((uint32)-1); break; diff --git a/engines/neverhood/modules/module3000.cpp b/engines/neverhood/modules/module3000.cpp index 33b56018c4..58867dccb7 100644 --- a/engines/neverhood/modules/module3000.cpp +++ b/engines/neverhood/modules/module3000.cpp @@ -552,7 +552,7 @@ void Scene3009::update() { uint32 Scene3009::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: if ((param.asPoint().x <= 20 || param.asPoint().x >= 620) && !getGlobalVar(V_CANNON_RAISED)) { setGlobalVar(V_CANNON_TARGET_STATUS, 0); leaveScene(0); @@ -731,7 +731,7 @@ void Scene3010::update() { uint32 Scene3010::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: if ((param.asPoint().x <= 20 || param.asPoint().x >= 620) && _countdown == 0 && !_checkUnlocked) { if (!_boltUnlocking[0] && !_boltUnlocking[1] && !_boltUnlocking[2]) { showMouse(false); @@ -853,7 +853,7 @@ void Scene3011::update() { uint32 Scene3011::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: if (param.asPoint().x <= 20 || param.asPoint().x >= 620) { leaveScene(0); } diff --git a/engines/neverhood/modules/module3000_sprites.cpp b/engines/neverhood/modules/module3000_sprites.cpp index 5e675f6ecb..feadc35d02 100644 --- a/engines/neverhood/modules/module3000_sprites.cpp +++ b/engines/neverhood/modules/module3000_sprites.cpp @@ -261,7 +261,7 @@ uint32 SsScene3009SymbolArrow::handleMessage(int messageNum, const MessageParam _countdown = 2; loadSprite(kSsScene3009SymbolArrowFileHashes1[_index], kSLFDefDrawOffset); playSound(0); - sendMessage(_asSymbol, 0x2005, _incrDecr); + sendMessage(_asSymbol, NM_KLAYMEN_CLIMB_LADDER, _incrDecr); } messageResult = 1; break; @@ -388,7 +388,7 @@ AsScene3009Symbol::AsScene3009Symbol(NeverhoodEngine *vm, Scene3009 *parentScene uint32 AsScene3009Symbol::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2005: + case NM_KLAYMEN_CLIMB_LADDER: if (param.asInteger()) { if (_symbolIndex == 11) _symbolIndex = 0; diff --git a/engines/neverhood/navigationscene.cpp b/engines/neverhood/navigationscene.cpp index a1eb66d63e..adbb6aef7a 100644 --- a/engines/neverhood/navigationscene.cpp +++ b/engines/neverhood/navigationscene.cpp @@ -106,11 +106,11 @@ void NavigationScene::update() { uint32 NavigationScene::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { switch (messageNum) { - case 0x0000: + case NM_MOUSE_MOVE: if (_interactive) sendMessage(_mouseCursor, 0x4002, param); break; - case 0x0001: + case NM_MOUSE_CLICK: if (_interactive) handleNavigation(param.asPoint()); break; diff --git a/engines/neverhood/scene.cpp b/engines/neverhood/scene.cpp index b3a2194716..b8cde73e81 100644 --- a/engines/neverhood/scene.cpp +++ b/engines/neverhood/scene.cpp @@ -283,11 +283,11 @@ void Scene::leaveScene(uint32 result) { uint32 Scene::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { switch (messageNum) { - case 0x0000: // mouse moved + case NM_MOUSE_MOVE: if (_mouseCursor && _mouseCursor->hasMessageHandler()) sendMessage(_mouseCursor, 0x4002, param); break; - case 0x0001: // mouse clicked + case NM_MOUSE_CLICK: _mouseClicked = true; _mouseClickPos = param.asPoint(); break; @@ -301,7 +301,7 @@ uint32 Scene::handleMessage(int messageNum, const MessageParam ¶m, Entity *s if (_messageListIndex == _messageListCount) { // If the current message list was processed completely, // sent Klaymen into the idle state. - sendMessage(_klaymen, 0x4004, 0); + sendMessage(_klaymen, NM_KLAYMEN_STAND_IDLE, 0); } else { // Else continue with the next message in the current message list processMessageList(); @@ -314,23 +314,21 @@ uint32 Scene::handleMessage(int messageNum, const MessageParam ¶m, Entity *s if (_isKlaymenBusy) { _isKlaymenBusy = false; _messageList = NULL; - sendMessage(_klaymen, 0x4004, 0); + sendMessage(_klaymen, NM_KLAYMEN_STAND_IDLE, 0); } break; - case 0x101D: - // Hide the mouse cursor + case NM_MOUSE_HIDE: if (_mouseCursor) { _mouseCursorWasVisible = _mouseCursor->getSurface()->getVisible(); _mouseCursor->getSurface()->setVisible(false); } break; - case 0x101E: - // Show the mouse cursor + case NM_MOUSE_SHOW: if (_mouseCursorWasVisible && _mouseCursor) { _mouseCursor->getSurface()->setVisible(true); } break; - case 0x1022: + case NM_PRIORITY_CHANGE: // Set the sender's surface priority setSurfacePriority(((Sprite*)sender)->getSurface(), param.asInteger()); break; @@ -485,7 +483,7 @@ void Scene::cancelMessageList() { _isKlaymenBusy = false; _messageList = NULL; _canAcceptInput = true; - sendMessage(_klaymen, 0x4004, 0); + sendMessage(_klaymen, NM_KLAYMEN_STAND_IDLE, 0); } void Scene::setRectList(uint32 id) { @@ -617,7 +615,7 @@ StaticScene::StaticScene(NeverhoodEngine *vm, Module *parentModule, uint32 backg uint32 StaticScene::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x0001: + case NM_MOUSE_CLICK: if (param.asPoint().x <= 20 || param.asPoint().x >= 620) leaveScene(0); break; -- cgit v1.2.3 From 43c226436c5cb466fa066cbb8fad46477d73e31e Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 25 Dec 2013 19:12:00 +0200 Subject: NEVERHOOD: Change more message values to enums --- engines/neverhood/klaymen.cpp | 2 +- engines/neverhood/messages.h | 1 + engines/neverhood/modules/module1000.cpp | 8 +++--- engines/neverhood/modules/module1000_sprites.cpp | 6 ++--- engines/neverhood/modules/module1100.cpp | 4 +-- engines/neverhood/modules/module1100_sprites.cpp | 2 +- engines/neverhood/modules/module1200.cpp | 4 +-- engines/neverhood/modules/module1200_sprites.cpp | 4 +-- engines/neverhood/modules/module1300.cpp | 6 ++--- engines/neverhood/modules/module1300_sprites.cpp | 4 +-- engines/neverhood/modules/module1400.cpp | 2 +- engines/neverhood/modules/module1400_sprites.cpp | 2 +- engines/neverhood/modules/module1600.cpp | 4 +-- engines/neverhood/modules/module1600_sprites.cpp | 2 +- engines/neverhood/modules/module2200.cpp | 8 +++--- engines/neverhood/modules/module2200_sprites.cpp | 8 +++--- engines/neverhood/modules/module2400.cpp | 4 +-- engines/neverhood/modules/module2400_sprites.cpp | 4 +-- engines/neverhood/modules/module2500.cpp | 8 +++--- engines/neverhood/modules/module2600.cpp | 4 +-- engines/neverhood/modules/module2600_sprites.cpp | 6 ++--- engines/neverhood/modules/module2700.cpp | 32 ++++++++++++------------ engines/neverhood/modules/module2800.cpp | 6 ++--- engines/neverhood/modules/module2800_sprites.cpp | 8 +++--- engines/neverhood/modules/module3000.cpp | 4 +-- engines/neverhood/modules/module3000_sprites.cpp | 4 +-- 26 files changed, 74 insertions(+), 73 deletions(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/klaymen.cpp b/engines/neverhood/klaymen.cpp index e8b3711e84..a813440f62 100644 --- a/engines/neverhood/klaymen.cpp +++ b/engines/neverhood/klaymen.cpp @@ -2495,7 +2495,7 @@ void Klaymen::stFalling() { SetSpriteUpdate(NULL); SetMessageHandler(&Klaymen::hmLowLevelAnimation); NextState(&Klaymen::stFallTouchdown); - sendMessage(_parentScene, 0x2002, 0); + sendMessage(_parentScene, NM_POSITION_CHANGE, 0); _attachedSprite = NULL; sendMessage(_parentScene, 0x8001, 0); } diff --git a/engines/neverhood/messages.h b/engines/neverhood/messages.h index e3bd0e0041..7f165787bf 100644 --- a/engines/neverhood/messages.h +++ b/engines/neverhood/messages.h @@ -36,6 +36,7 @@ enum NeverhoodMessage { NM_SCENE_LEAVE = 0x1019, NM_PRIORITY_CHANGE = 0x1022, NM_ANIMATION_UPDATE = 0x2000, + NM_POSITION_CHANGE = 0x2002, NM_KLAYMEN_CLIMB_LADDER = 0x2005, NM_KLAYMEN_STOP_CLIMBING = 0x2006, diff --git a/engines/neverhood/modules/module1000.cpp b/engines/neverhood/modules/module1000.cpp index f71941bcd4..788e22dc1b 100644 --- a/engines/neverhood/modules/module1000.cpp +++ b/engines/neverhood/modules/module1000.cpp @@ -214,7 +214,7 @@ uint32 Scene1001::handleMessage(int messageNum, const MessageParam ¶m, Entit } } break; - case 0x2002: + case NM_POSITION_CHANGE: setRectList(0x004B49F0); break; case 0x480B: @@ -395,7 +395,7 @@ uint32 Scene1002::handleMessage(int messageNum, const MessageParam ¶m, Entit } } break; - case 0x2002: + case NM_POSITION_CHANGE: _messageList = NULL; break; case NM_KLAYMEN_CLIMB_LADDER: @@ -533,8 +533,8 @@ uint32 Scene1004::handleMessage(int messageNum, const MessageParam ¶m, Entit case 0x2001: setRectList(0x004B7C70); break; - case 0x2002: - sendMessage(_asTrashCan, 0x2002, 0); + case NM_POSITION_CHANGE: + sendMessage(_asTrashCan, NM_POSITION_CHANGE, 0); break; } return messageResult; diff --git a/engines/neverhood/modules/module1000_sprites.cpp b/engines/neverhood/modules/module1000_sprites.cpp index a950bb0334..a028df4b10 100644 --- a/engines/neverhood/modules/module1000_sprites.cpp +++ b/engines/neverhood/modules/module1000_sprites.cpp @@ -964,7 +964,7 @@ uint32 AsScene1004TrashCan::handleMessage(int messageNum, const MessageParam &pa if (param.asInteger() == 0x225A8587) playSound(0, 0x109AFC4C); break; - case 0x2002: + case NM_POSITION_CHANGE: startAnimation(0xEB312C11, 0, -1); setVisible(true); break; @@ -1040,7 +1040,7 @@ uint32 KmScene1001::xHandleMessage(int messageNum, const MessageParam ¶m) { break; case 0x4836: if (param.asInteger() == 1) { - sendMessage(_parentScene, 0x2002, 0); + sendMessage(_parentScene, NM_POSITION_CHANGE, 0); GotoState(&KmScene1001::stWakeUp); } break; @@ -1613,7 +1613,7 @@ uint32 KmScene1004::hmReadNote(int messageNum, const MessageParam ¶m, Entity case NM_ANIMATION_START: if (param.asInteger() == 0x04684052) { _acceptInput = true; - sendMessage(_parentScene, 0x2002, 0); + sendMessage(_parentScene, NM_POSITION_CHANGE, 0); } break; } diff --git a/engines/neverhood/modules/module1100.cpp b/engines/neverhood/modules/module1100.cpp index 08b134205c..e7dd6e4210 100644 --- a/engines/neverhood/modules/module1100.cpp +++ b/engines/neverhood/modules/module1100.cpp @@ -318,7 +318,7 @@ uint32 Scene1105::handleMessage(int messageNum, const MessageParam ¶m, Entit playSound(2); _doMoveTeddy = true; } else { - sendMessage(_asTeddyBear, 0x2002, 0); + sendMessage(_asTeddyBear, NM_POSITION_CHANGE, 0); } showMouse(false); _isActionButtonClicked = true; @@ -460,7 +460,7 @@ void Scene1105::update() { if (_isClosePanelDone && !isSoundPlaying(1)) leaveScene(_leaveResult); if (_doMoveTeddy && !isSoundPlaying(2)) { - sendMessage(_asTeddyBear, 0x2002, 0); + sendMessage(_asTeddyBear, NM_POSITION_CHANGE, 0); _doMoveTeddy = false; } } diff --git a/engines/neverhood/modules/module1100_sprites.cpp b/engines/neverhood/modules/module1100_sprites.cpp index 9d60f83ae0..49a388ffca 100644 --- a/engines/neverhood/modules/module1100_sprites.cpp +++ b/engines/neverhood/modules/module1100_sprites.cpp @@ -133,7 +133,7 @@ AsScene1105TeddyBear::AsScene1105TeddyBear(NeverhoodEngine *vm, Scene *parentSce uint32 AsScene1105TeddyBear::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2002: + case NM_POSITION_CHANGE: if (getGlobalVar(V_ROBOT_TARGET)) { startAnimation(0x6B0C0432, 0, -1); playSound(0); diff --git a/engines/neverhood/modules/module1200.cpp b/engines/neverhood/modules/module1200.cpp index bafbb4d535..8bf42b3b96 100644 --- a/engines/neverhood/modules/module1200.cpp +++ b/engines/neverhood/modules/module1200.cpp @@ -320,7 +320,7 @@ uint32 Scene1201::handleMessage(int messageNum, const MessageParam ¶m, Entit setMessageList2(0x004AECC0); } break; - case 0x2002: + case NM_POSITION_CHANGE: if (getGlobalVar(V_TNT_DUMMY_FUSE_LIT)) { // Move the TNT dummy if the fuse is burning sendEntityMessage(_klaymen, 0x1014, _asTntMan); @@ -434,7 +434,7 @@ uint32 Scene1202::handleMessage(int messageNum, const MessageParam ¶m, Entit case NM_ANIMATION_UPDATE: _clickedIndex = (int)param.asInteger(); break; - case 0x2002: + case NM_POSITION_CHANGE: _counter--; break; } diff --git a/engines/neverhood/modules/module1200_sprites.cpp b/engines/neverhood/modules/module1200_sprites.cpp index 641ef047e5..5848e16092 100644 --- a/engines/neverhood/modules/module1200_sprites.cpp +++ b/engines/neverhood/modules/module1200_sprites.cpp @@ -230,7 +230,7 @@ uint32 AsScene1201TntMan::handleMessage(int messageNum, const MessageParam ¶ playSound(0, 0x51800A04); break; case 0x1011: - sendMessage(_parentScene, 0x2002, 0); + sendMessage(_parentScene, NM_POSITION_CHANGE, 0); messageResult = 1; break; case 0x480B: @@ -648,7 +648,7 @@ void AsScene1202TntItem::stChangePositionFadeIn() { } void AsScene1202TntItem::stChangePositionDone() { - sendMessage(_parentScene, 0x2002, _itemIndex); + sendMessage(_parentScene, NM_POSITION_CHANGE, _itemIndex); stShowIdle(); } diff --git a/engines/neverhood/modules/module1300.cpp b/engines/neverhood/modules/module1300.cpp index f28c1d6b97..fe119c1732 100644 --- a/engines/neverhood/modules/module1300.cpp +++ b/engines/neverhood/modules/module1300.cpp @@ -409,7 +409,7 @@ uint32 Scene1302::handleMessage(int messageNum, const MessageParam ¶m, Entit } else setMessageList2(0x004B0920); break; - case 0x2002: + case NM_POSITION_CHANGE: if (_klaymen->getX() > 545) leaveScene(1); break; @@ -873,7 +873,7 @@ uint32 Scene1307::handleMessage(int messageNum, const MessageParam ¶m, Entit leaveScene(0); } break; - case 0x2002: + case NM_POSITION_CHANGE: // Check if all keys are in the correct keyholes if (getSubVar(VA_IS_KEY_INSERTED, 0) && getSubVar(VA_CURR_KEY_SLOT_NUMBERS, 0) == getSubVar(VA_GOOD_KEY_SLOT_NUMBERS, 0) && getSubVar(VA_IS_KEY_INSERTED, 1) && getSubVar(VA_CURR_KEY_SLOT_NUMBERS, 1) == getSubVar(VA_GOOD_KEY_SLOT_NUMBERS, 1) && @@ -1060,7 +1060,7 @@ uint32 Scene1308::handleMessage(int messageNum, const MessageParam ¶m, Entit sendMessage(_asLightWallSymbols, 0x2003, 0); break; case NM_KLAYMEN_LOWER_LEVER: - sendMessage(_asLightWallSymbols, 0x2002, 0); + sendMessage(_asLightWallSymbols, NM_POSITION_CHANGE, 0); _ssNumber1->setVisible(true); _ssNumber2->setVisible(true); _ssNumber3->setVisible(true); diff --git a/engines/neverhood/modules/module1300_sprites.cpp b/engines/neverhood/modules/module1300_sprites.cpp index 394c706990..0c1632501e 100644 --- a/engines/neverhood/modules/module1300_sprites.cpp +++ b/engines/neverhood/modules/module1300_sprites.cpp @@ -401,7 +401,7 @@ void AsScene1307Key::suInsertKey() { playSound(0); } else { SetSpriteUpdate(NULL); - sendMessage(_parentScene, 0x2002, 0); + sendMessage(_parentScene, NM_POSITION_CHANGE, 0); } } @@ -562,7 +562,7 @@ AsScene1308LightWallSymbols::AsScene1308LightWallSymbols(NeverhoodEngine *vm, Sc uint32 AsScene1308LightWallSymbols::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2002: + case NM_POSITION_CHANGE: stFadeIn(); break; case 0x2003: diff --git a/engines/neverhood/modules/module1400.cpp b/engines/neverhood/modules/module1400.cpp index 62379578ed..018f27e2b7 100644 --- a/engines/neverhood/modules/module1400.cpp +++ b/engines/neverhood/modules/module1400.cpp @@ -383,7 +383,7 @@ uint32 Scene1402::handleMessage(int messageNum, const MessageParam ¶m, Entit clearRectList(); _klaymen->setVisible(false); showMouse(false); - sendMessage(_asPuzzleBox, 0x2002, 0); + sendMessage(_asPuzzleBox, NM_POSITION_CHANGE, 0); startShaking(); } } diff --git a/engines/neverhood/modules/module1400_sprites.cpp b/engines/neverhood/modules/module1400_sprites.cpp index 80c16cc66c..478b328034 100644 --- a/engines/neverhood/modules/module1400_sprites.cpp +++ b/engines/neverhood/modules/module1400_sprites.cpp @@ -553,7 +553,7 @@ AsScene1402PuzzleBox::AsScene1402PuzzleBox(NeverhoodEngine *vm, Scene *parentSce uint32 AsScene1402PuzzleBox::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2002: + case NM_POSITION_CHANGE: playSound(1); startAnimation(0x20060259, -1, -1); _playBackwards = true; diff --git a/engines/neverhood/modules/module1600.cpp b/engines/neverhood/modules/module1600.cpp index 606ad44347..d66d5c1b8e 100644 --- a/engines/neverhood/modules/module1600.cpp +++ b/engines/neverhood/modules/module1600.cpp @@ -258,7 +258,7 @@ Scene1608::Scene1608(NeverhoodEngine *vm, Module *parentModule, int which) SetMessageHandler(&Scene1608::hmUpperFloor); SetUpdateHandler(&Scene1608::upUpperFloor); _asCar->setPathPoints(_roomPathPoints); - sendMessage(_asCar, 0x2002, _roomPathPoints->size() - 1); + sendMessage(_asCar, NM_POSITION_CHANGE, _roomPathPoints->size() - 1); _sprite3 = insertStaticSprite(0xB47026B0, 1100); _clipRect1.set(_sprite3->getDrawRect().x, _sprite3->getDrawRect().y, 640, _sprite2->getDrawRect().y2()); _clipRect3.set(_sprite2->getDrawRect().x, _sprite3->getDrawRect().y, 640, _sprite2->getDrawRect().y2()); @@ -299,7 +299,7 @@ Scene1608::Scene1608(NeverhoodEngine *vm, Module *parentModule, int which) _asIdleCarLower->setVisible(false); _asIdleCarFull->setVisible(false); _asCar->setPathPoints(_roomPathPoints); - sendMessage(_asCar, 0x2002, 0); + sendMessage(_asCar, NM_POSITION_CHANGE, 0); sendMessage(_asCar, NM_CAR_MOVE_TO_NEXT_POINT, 90); _sprite3 = insertStaticSprite(0xB47026B0, 1100); _clipRect1.set(_sprite3->getDrawRect().x, _sprite3->getDrawRect().y, 640, _sprite2->getDrawRect().y2()); diff --git a/engines/neverhood/modules/module1600_sprites.cpp b/engines/neverhood/modules/module1600_sprites.cpp index 56a9978784..b7b3658c5e 100644 --- a/engines/neverhood/modules/module1600_sprites.cpp +++ b/engines/neverhood/modules/module1600_sprites.cpp @@ -97,7 +97,7 @@ uint32 AsCommonCar::handleMessage(int messageNum, const MessageParam ¶m, Ent case NM_SCENE_LEAVE: SetSpriteUpdate(NULL); break; - case 0x2002: + case NM_POSITION_CHANGE: // Set the current position without moving _currPointIndex = param.asInteger(); _stepError = 0; diff --git a/engines/neverhood/modules/module2200.cpp b/engines/neverhood/modules/module2200.cpp index f0d572ffc3..f1d5d2854d 100644 --- a/engines/neverhood/modules/module2200.cpp +++ b/engines/neverhood/modules/module2200.cpp @@ -670,7 +670,7 @@ uint32 Scene2202::handleMessage(int messageNum, const MessageParam ¶m, Entit _movingCubePosition = (int16)param.asInteger(); _ssMovingCube = (Sprite*)sender; break; - case 0x2002: + case NM_POSITION_CHANGE: _isCubeMoving = false; _ssDoneMovingCube = (Sprite*)sender; if (param.asInteger() <= 2) @@ -786,7 +786,7 @@ uint32 Scene2203::handleMessage(int messageNum, const MessageParam ¶m, Entit else setMessageList2(0x004B83C8); break; - case 0x2002: + case NM_POSITION_CHANGE: if (sender == _asLeftDoor) setMessageList2(0x004B8370); else @@ -1215,7 +1215,7 @@ uint32 Scene2207::handleMessage(int messageNum, const MessageParam ¶m, Entit setMessageList(0x004B37D8); } break; - case 0x2002: + case NM_POSITION_CHANGE: _elevatorSurfacePriority = param.asInteger(); break; case 0x2003: @@ -1262,7 +1262,7 @@ uint32 Scene2207::handleMessage(int messageNum, const MessageParam ¶m, Entit uint32 Scene2207::handleMessage2(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Scene::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2002: + case NM_POSITION_CHANGE: _elevatorSurfacePriority = param.asInteger(); break; case 0x2004: diff --git a/engines/neverhood/modules/module2200_sprites.cpp b/engines/neverhood/modules/module2200_sprites.cpp index 04cd461ee2..ddf31f7920 100644 --- a/engines/neverhood/modules/module2200_sprites.cpp +++ b/engines/neverhood/modules/module2200_sprites.cpp @@ -317,7 +317,7 @@ void SsScene2202PuzzleCube::stopMoving() { loadSprite(kSsScene2202PuzzleCubeFileHashes2[_cubeSymbol], kSLFCenteredDrawOffset); SetSpriteUpdate(NULL); _isMoving = false; - sendMessage(_parentScene, 0x2002, _cubePosition); + sendMessage(_parentScene, NM_POSITION_CHANGE, _cubePosition); } static const uint32 kAsCommonKeyFileHashes[] = { @@ -377,7 +377,7 @@ uint32 AsScene2203Door::handleMessage(int messageNum, const MessageParam ¶m, switch (messageNum) { case 0x1011: if (_doorIndex == getGlobalVar(V_LARGE_DOOR_NUMBER)) - sendMessage(_parentScene, 0x2002, 0); + sendMessage(_parentScene, NM_POSITION_CHANGE, 0); else sendMessage(_parentScene, 0x2001, 0); messageResult = 1; @@ -607,9 +607,9 @@ void AsScene2207Elevator::update() { } if (_pointIndex > 20 && _surface->getPriority() != 900) - sendMessage(_parentScene, 0x2002, 900); + sendMessage(_parentScene, NM_POSITION_CHANGE, 900); else if (_pointIndex < 20 && _surface->getPriority() != 1100) - sendMessage(_parentScene, 0x2002, 1100); + sendMessage(_parentScene, NM_POSITION_CHANGE, 1100); AnimatedSprite::update(); diff --git a/engines/neverhood/modules/module2400.cpp b/engines/neverhood/modules/module2400.cpp index f1d4422c28..867fb692f2 100644 --- a/engines/neverhood/modules/module2400.cpp +++ b/engines/neverhood/modules/module2400.cpp @@ -257,7 +257,7 @@ void Scene2401::update() { } else if (waterInside) { playPipeSound(0xD0431020); for (uint i = 0; i < 5; i++) { - sendMessage(_asWaterFlushing[i], 0x2002, getSubVar(VA_CURR_WATER_PIPES_LEVEL, i)); + sendMessage(_asWaterFlushing[i], NM_POSITION_CHANGE, getSubVar(VA_CURR_WATER_PIPES_LEVEL, i)); setSubVar(VA_CURR_WATER_PIPES_LEVEL, i, 0); } } @@ -334,7 +334,7 @@ uint32 Scene2401::handleMessage(int messageNum, const MessageParam ¶m, Entit _countdown1 = 8; } else if (sender == _ssFloorButton && getGlobalVar(V_WATER_RUNNING)) { _countdown2 = 144; - sendMessage(_asFlowingWater, 0x2002, 0); + sendMessage(_asFlowingWater, NM_POSITION_CHANGE, 0); playSound(0, 0xE1130324); } break; diff --git a/engines/neverhood/modules/module2400_sprites.cpp b/engines/neverhood/modules/module2400_sprites.cpp index 1ea037b36d..32c00cde27 100644 --- a/engines/neverhood/modules/module2400_sprites.cpp +++ b/engines/neverhood/modules/module2400_sprites.cpp @@ -91,7 +91,7 @@ uint32 AsScene2401FlowingWater::handleMessage(int messageNum, const MessageParam if (_isWaterFlowing && param.asInteger() == 0x02421405) startAnimationByHash(0x10203116, 0x01084280, 0); break; - case 0x2002: + case NM_POSITION_CHANGE: if (!_isWaterFlowing) { _vm->_soundMan->addSound(0x40F11C09, 0x980C1420); _vm->_soundMan->playSoundLooping(0x980C1420); @@ -141,7 +141,7 @@ uint32 AsScene2401WaterFlushing::handleMessage(int messageNum, const MessagePara _flushLoopCount--; } break; - case 0x2002: + case NM_POSITION_CHANGE: if (param.asInteger() > 0) { _flushLoopCount = param.asInteger() - 1; _countdown = _vm->_rnd->getRandomNumber(3) + 1; diff --git a/engines/neverhood/modules/module2500.cpp b/engines/neverhood/modules/module2500.cpp index 945cb4e1a5..eb1b65cd83 100644 --- a/engines/neverhood/modules/module2500.cpp +++ b/engines/neverhood/modules/module2500.cpp @@ -295,12 +295,12 @@ Scene2501::Scene2501(NeverhoodEngine *vm, Module *parentModule, int which) if (which >= 0 && _tracks[_currTrackIndex]->which2 == which) { NPoint testPoint = (*_trackPoints)[_trackPoints->size() - 1]; - sendMessage(_asCar, 0x2002, _trackPoints->size() - 1); + sendMessage(_asCar, NM_POSITION_CHANGE, _trackPoints->size() - 1); if (testPoint.x < 0 || testPoint.x >= 640 || testPoint.y < 0 || testPoint.y >= 480) sendMessage(_asCar, NM_CAR_MOVE_TO_PREV_POINT, 150); } else { NPoint testPoint = (*_trackPoints)[0]; - sendMessage(_asCar, 0x2002, 0); + sendMessage(_asCar, NM_POSITION_CHANGE, 0); if (testPoint.x < 0 || testPoint.x >= 640 || testPoint.y < 0 || testPoint.y >= 480) sendMessage(_asCar, NM_CAR_MOVE_TO_NEXT_POINT, 150); } @@ -460,9 +460,9 @@ void Scene2501::changeTrack() { _trackPoints = _dataResource.getPointArray(_tracks[_currTrackIndex]->trackPointsName); _asCar->setPathPoints(_trackPoints); if (_currTrackIndex == 0) - sendMessage(_asCar, 0x2002, _trackPoints->size() - 1); + sendMessage(_asCar, NM_POSITION_CHANGE, _trackPoints->size() - 1); else - sendMessage(_asCar, 0x2002, 0); + sendMessage(_asCar, NM_POSITION_CHANGE, 0); sendPointMessage(_asCar, 0x2004, _clickPoint); _newTrackIndex = -1; } diff --git a/engines/neverhood/modules/module2600.cpp b/engines/neverhood/modules/module2600.cpp index 605634a649..3c3e733b3f 100644 --- a/engines/neverhood/modules/module2600.cpp +++ b/engines/neverhood/modules/module2600.cpp @@ -250,9 +250,9 @@ uint32 Scene2609::handleMessage(int messageNum, const MessageParam ¶m, Entit _isBusy = false; sendMessage(_asWater, 0x2001, 0); break; - case 0x2002: + case NM_POSITION_CHANGE: _isBusy = false; - sendMessage(_asWater, 0x2002, 0); + sendMessage(_asWater, NM_POSITION_CHANGE, 0); break; } return 0; diff --git a/engines/neverhood/modules/module2600_sprites.cpp b/engines/neverhood/modules/module2600_sprites.cpp index 2c24b533f3..2506a6eb48 100644 --- a/engines/neverhood/modules/module2600_sprites.cpp +++ b/engines/neverhood/modules/module2600_sprites.cpp @@ -47,7 +47,7 @@ void SsScene2609Button::update() { sendMessage(_parentScene, 0x2001, 0); } else { setGlobalVar(V_WATER_RUNNING, 1); - sendMessage(_parentScene, 0x2002, 0); + sendMessage(_parentScene, NM_POSITION_CHANGE, 0); } } } @@ -88,7 +88,7 @@ AsScene2609Water::AsScene2609Water(NeverhoodEngine *vm) SetUpdateHandler(&AnimatedSprite::update); SetMessageHandler(&AsScene2609Water::handleMessage); if (getGlobalVar(V_WATER_RUNNING)) - sendMessage(this, 0x2002, 0); + sendMessage(this, NM_POSITION_CHANGE, 0); } AsScene2609Water::~AsScene2609Water() { @@ -103,7 +103,7 @@ uint32 AsScene2609Water::handleMessage(int messageNum, const MessageParam ¶m setVisible(false); _vm->_soundMan->stopSound(0xDC2769B0); break; - case 0x2002: + case NM_POSITION_CHANGE: startAnimation(0x9C210C90, 0, -1); setVisible(true); _vm->_soundMan->playSoundLooping(0xDC2769B0); diff --git a/engines/neverhood/modules/module2700.cpp b/engines/neverhood/modules/module2700.cpp index 1f680fe5a1..5880c31c14 100644 --- a/engines/neverhood/modules/module2700.cpp +++ b/engines/neverhood/modules/module2700.cpp @@ -576,12 +576,12 @@ Scene2701::Scene2701(NeverhoodEngine *vm, Module *parentModule, int which) if (which == _which2) { NPoint testPoint = (*_trackPoints)[_trackPoints->size() - 1]; - sendMessage(_asCar, 0x2002, _trackPoints->size() - 1); + sendMessage(_asCar, NM_POSITION_CHANGE, _trackPoints->size() - 1); if (testPoint.x < 0 || testPoint.x >= 640 || testPoint.y < 0 || testPoint.y >= 480) sendMessage(_asCar, NM_CAR_MOVE_TO_PREV_POINT, 150); } else { NPoint testPoint = (*_trackPoints)[0]; - sendMessage(_asCar, 0x2002, 0); + sendMessage(_asCar, NM_POSITION_CHANGE, 0); if (testPoint.x < 0 || testPoint.x >= 640 || testPoint.y < 0 || testPoint.y >= 480) sendMessage(_asCar, NM_CAR_MOVE_TO_NEXT_POINT, 150); } @@ -702,10 +702,10 @@ Scene2702::Scene2702(NeverhoodEngine *vm, Module *parentModule, int which) _asCar->setPathPoints(_trackPoints); if (which == _tracks[_currTrackIndex]->which2) { - sendMessage(_asCar, 0x2002, _trackPoints->size() - 1); + sendMessage(_asCar, NM_POSITION_CHANGE, _trackPoints->size() - 1); sendMessage(_asCar, NM_CAR_MOVE_TO_PREV_POINT, 150); } else { - sendMessage(_asCar, 0x2002, 0); + sendMessage(_asCar, NM_POSITION_CHANGE, 0); sendMessage(_asCar, NM_CAR_MOVE_TO_NEXT_POINT, 150); } @@ -782,13 +782,13 @@ void Scene2702::changeTrack() { _asCar->setPathPoints(_trackPoints); if (_isUpperTrack) { if (_currTrackIndex == 0) - sendMessage(_asCar, 0x2002, _trackPoints->size() - 1); + sendMessage(_asCar, NM_POSITION_CHANGE, _trackPoints->size() - 1); else - sendMessage(_asCar, 0x2002, 0); + sendMessage(_asCar, NM_POSITION_CHANGE, 0); } else if (_currTrackIndex == 2) - sendMessage(_asCar, 0x2002, 0); + sendMessage(_asCar, NM_POSITION_CHANGE, 0); else - sendMessage(_asCar, 0x2002, _trackPoints->size() - 1); + sendMessage(_asCar, NM_POSITION_CHANGE, _trackPoints->size() - 1); sendMessage(_asCar, 0x2004, _newTrackDestX); _newTrackIndex = -1; } @@ -832,14 +832,14 @@ Scene2703::Scene2703(NeverhoodEngine *vm, Module *parentModule, int which, uint3 if (which == _which2) { NPoint testPoint = (*_trackPoints)[_trackPoints->size() - 1]; - sendMessage(_asCar, 0x2002, _trackPoints->size() - 1); + sendMessage(_asCar, NM_POSITION_CHANGE, _trackPoints->size() - 1); if (testPoint.x > 0 && testPoint.x < 640 && testPoint.y > 0 && testPoint.y < 480) sendMessage(_asCar, NM_CAR_ENTER, 0); else sendMessage(_asCar, NM_CAR_MOVE_TO_PREV_POINT, 150); } else { NPoint testPoint = (*_trackPoints)[0]; - sendMessage(_asCar, 0x2002, 0); + sendMessage(_asCar, NM_POSITION_CHANGE, 0); if (testPoint.x > 0 && testPoint.x < 640 && testPoint.y > 0 && testPoint.y < 480) sendMessage(_asCar, NM_CAR_ENTER, 0); else @@ -951,14 +951,14 @@ Scene2704::Scene2704(NeverhoodEngine *vm, Module *parentModule, int which, uint3 if (which == _which2) { NPoint testPoint = (*_trackPoints)[_trackPoints->size() - 1]; - sendMessage(_asCar, 0x2002, _trackPoints->size() - 1); + sendMessage(_asCar, NM_POSITION_CHANGE, _trackPoints->size() - 1); if (testPoint.x > 0 && testPoint.x < 640 && testPoint.y > 0 && testPoint.y < 480) sendMessage(_asCar, NM_CAR_ENTER, 0); else sendMessage(_asCar, NM_CAR_MOVE_TO_PREV_POINT, 0); } else { NPoint testPoint = (*_trackPoints)[0]; - sendMessage(_asCar, 0x2002, 0); + sendMessage(_asCar, NM_POSITION_CHANGE, 0); if (testPoint.x > 0 && testPoint.x < 640 && testPoint.y > 0 && testPoint.y < 480) sendMessage(_asCar, NM_CAR_ENTER, 0); else @@ -1044,13 +1044,13 @@ Scene2706::Scene2706(NeverhoodEngine *vm, Module *parentModule, int which) _asCar->setPathPoints(_trackPoints); if (which == _tracks[_currTrackIndex]->which2) { - sendMessage(_asCar, 0x2002, _trackPoints->size() - 1); + sendMessage(_asCar, NM_POSITION_CHANGE, _trackPoints->size() - 1); if (which == 5) sendMessage(_asCar, NM_CAR_MOVE_TO_PREV_POINT, 50); else sendMessage(_asCar, NM_CAR_MOVE_TO_PREV_POINT, 150); } else { - sendMessage(_asCar, 0x2002, 0); + sendMessage(_asCar, NM_POSITION_CHANGE, 0); if (which == 5) sendMessage(_asCar, NM_CAR_MOVE_TO_NEXT_POINT, 50); else @@ -1107,9 +1107,9 @@ void Scene2706::changeTrack() { _trackPoints = _dataResource.getPointArray(_tracks[_currTrackIndex]->trackPointsName); _asCar->setPathPoints(_trackPoints); if (_currTrackIndex == 0) - sendMessage(_asCar, 0x2002, _trackPoints->size() - 1); + sendMessage(_asCar, NM_POSITION_CHANGE, _trackPoints->size() - 1); else - sendMessage(_asCar, 0x2002, 0); + sendMessage(_asCar, NM_POSITION_CHANGE, 0); sendMessage(_asCar, 0x2004, _newTrackDestX); _newTrackIndex = -1; } diff --git a/engines/neverhood/modules/module2800.cpp b/engines/neverhood/modules/module2800.cpp index 8e58027849..8f23de33db 100644 --- a/engines/neverhood/modules/module2800.cpp +++ b/engines/neverhood/modules/module2800.cpp @@ -1213,7 +1213,7 @@ uint32 Scene2804::handleMessage(int messageNum, const MessageParam ¶m, Entit break; case NM_ANIMATION_UPDATE: _isWorking = true; - sendMessage(_asCoil, 0x2002, 0); + sendMessage(_asCoil, NM_POSITION_CHANGE, 0); if (getGlobalVar(V_SHRINK_LIGHTS_ON)) { sendMessage(_asTarget, 0x2004, 0); _countdown2 = 48; @@ -1569,7 +1569,7 @@ uint32 Scene2808::handleMessage(int messageNum, const MessageParam ¶m, Entit case 0x2001: _isFlowing = true; break; - case 0x2002: + case NM_POSITION_CHANGE: if (isAnyTestTubeFilled()) { _leaveResult = 3; if (!isMixtureGood()) @@ -2046,7 +2046,7 @@ uint32 Scene2812::handleMessage(int messageNum, const MessageParam ¶m, Entit setRectList(0x004AF710); _klaymen->setClipRect(_sprite4->getDrawRect().x, 0, 640, _sprite4->getDrawRect().y2()); break; - case 0x2002: + case NM_POSITION_CHANGE: _isRopingDown = false; setRectList(0x004AF700); _klaymen->setClipRect(_sprite4->getDrawRect().x, 0, 640, _sprite3->getDrawRect().y2()); diff --git a/engines/neverhood/modules/module2800_sprites.cpp b/engines/neverhood/modules/module2800_sprites.cpp index e0370ccd51..35596da6b5 100644 --- a/engines/neverhood/modules/module2800_sprites.cpp +++ b/engines/neverhood/modules/module2800_sprites.cpp @@ -217,7 +217,7 @@ SsScene2804LightCoil::SsScene2804LightCoil(NeverhoodEngine *vm) uint32 SsScene2804LightCoil::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2002: + case NM_POSITION_CHANGE: setVisible(true); updatePosition(); messageResult = 1; @@ -470,7 +470,7 @@ void AsScene2804BeamCoil::update() { uint32 AsScene2804BeamCoil::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Sprite::handleMessage(messageNum, param, sender); switch (messageNum) { - case 0x2002: + case NM_POSITION_CHANGE: show(); _countdown = 92; messageResult = 1; @@ -791,7 +791,7 @@ void AsScene2808Handle::activate() { void AsScene2808Handle::stActivated() { stopAnimation(); - sendMessage(_parentScene, 0x2002, 0); + sendMessage(_parentScene, NM_POSITION_CHANGE, 0); } AsScene2808Flow::AsScene2808Flow(NeverhoodEngine *vm, Scene *parentScene, int testTubeSetNum) @@ -1594,7 +1594,7 @@ uint32 KmScene2812::xHandleMessage(int messageNum, const MessageParam ¶m) { GotoState(&Klaymen::stStartClimbLadderUp); break; case 0x4823: - sendMessage(_parentScene, 0x2002, 0); + sendMessage(_parentScene, NM_POSITION_CHANGE, 0); GotoState(&Klaymen::stClimbLadderHalf); break; case 0x482D: diff --git a/engines/neverhood/modules/module3000.cpp b/engines/neverhood/modules/module3000.cpp index 58867dccb7..dc6fb984ef 100644 --- a/engines/neverhood/modules/module3000.cpp +++ b/engines/neverhood/modules/module3000.cpp @@ -581,7 +581,7 @@ uint32 Scene3009::handleMessage(int messageNum, const MessageParam ¶m, Entit case 0x2001: _lockSymbolsPart1Countdown = 24; break; - case 0x2002: + case NM_POSITION_CHANGE: // Raise/lower the cannon if (!getGlobalVar(V_CANNON_TURNED) && !_isTurning) { if (getGlobalVar(V_CANNON_RAISED)) { @@ -769,7 +769,7 @@ uint32 Scene3010::handleMessage(int messageNum, const MessageParam ¶m, Entit _doorUnlocked = true; } break; - case 0x2002: + case NM_POSITION_CHANGE: if (!_checkUnlocked && _countdown == 0) { _asDeadBolts[param.asInteger()]->lock(); } diff --git a/engines/neverhood/modules/module3000_sprites.cpp b/engines/neverhood/modules/module3000_sprites.cpp index feadc35d02..3c0c5fe209 100644 --- a/engines/neverhood/modules/module3000_sprites.cpp +++ b/engines/neverhood/modules/module3000_sprites.cpp @@ -294,7 +294,7 @@ uint32 AsScene3009VerticalIndicator::handleMessage(int messageNum, const Message switch (messageNum) { case 0x1011: if (_enabled) { - sendMessage(_parentScene, 0x2002, 0); + sendMessage(_parentScene, NM_POSITION_CHANGE, 0); } messageResult = 1; break; @@ -501,7 +501,7 @@ uint32 SsScene3010DeadBoltButton::handleMessage(int messageNum, const MessagePar _buttonLocked = true; sendMessage(_parentScene, 0x2000, _buttonIndex); } else { - sendMessage(_parentScene, 0x2002, _buttonIndex); + sendMessage(_parentScene, NM_POSITION_CHANGE, _buttonIndex); } _needRefresh = true; updatePosition(); -- cgit v1.2.3 From da5cdd1c030ec6f7f9b41c3496700e47b8dadff1 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 25 Dec 2013 19:13:04 +0200 Subject: NEVERHOOD: Move car to the correct position when entering a new scene --- engines/neverhood/modules/module2700.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/modules/module2700.cpp b/engines/neverhood/modules/module2700.cpp index 5880c31c14..13c30048a4 100644 --- a/engines/neverhood/modules/module2700.cpp +++ b/engines/neverhood/modules/module2700.cpp @@ -955,14 +955,14 @@ Scene2704::Scene2704(NeverhoodEngine *vm, Module *parentModule, int which, uint3 if (testPoint.x > 0 && testPoint.x < 640 && testPoint.y > 0 && testPoint.y < 480) sendMessage(_asCar, NM_CAR_ENTER, 0); else - sendMessage(_asCar, NM_CAR_MOVE_TO_PREV_POINT, 0); + sendMessage(_asCar, NM_CAR_MOVE_TO_PREV_POINT, 150); } else { NPoint testPoint = (*_trackPoints)[0]; sendMessage(_asCar, NM_POSITION_CHANGE, 0); if (testPoint.x > 0 && testPoint.x < 640 && testPoint.y > 0 && testPoint.y < 480) sendMessage(_asCar, NM_CAR_ENTER, 0); else - sendMessage(_asCar, NM_CAR_MOVE_TO_NEXT_POINT, 0); + sendMessage(_asCar, NM_CAR_MOVE_TO_NEXT_POINT, 150); } if (clipRect) { -- cgit v1.2.3 From 9c295171b62ddeff6608d54d0e3fa56691f15618 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 26 Dec 2013 16:49:01 +0200 Subject: NEVERHOOD: Add an option to scale the making of videos to full screen --- engines/neverhood/detection.cpp | 9 +++++++++ engines/neverhood/menumodule.cpp | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/detection.cpp b/engines/neverhood/detection.cpp index 10f2bc1e00..feba193609 100644 --- a/engines/neverhood/detection.cpp +++ b/engines/neverhood/detection.cpp @@ -170,6 +170,14 @@ static const ExtraGuiOption neverhoodExtraGuiOption2 = { false }; +static const ExtraGuiOption neverhoodExtraGuiOption3 = { + _s("Scale the making of videos to full screen"), + _s("Scale the making of videos, so that they use the whole screen"), + "scalemakingofvideos", + false +}; + + class NeverhoodMetaEngine : public AdvancedMetaEngine { public: NeverhoodMetaEngine() : AdvancedMetaEngine(Neverhood::gameDescriptions, sizeof(Neverhood::NeverhoodGameDescription), neverhoodGames) { @@ -225,6 +233,7 @@ const ExtraGuiOptions NeverhoodMetaEngine::getExtraGuiOptions(const Common::Stri ExtraGuiOptions options; options.push_back(neverhoodExtraGuiOption1); options.push_back(neverhoodExtraGuiOption2); + options.push_back(neverhoodExtraGuiOption3); return options; } diff --git a/engines/neverhood/menumodule.cpp b/engines/neverhood/menumodule.cpp index b6aff48e0e..8929fb35c6 100644 --- a/engines/neverhood/menumodule.cpp +++ b/engines/neverhood/menumodule.cpp @@ -112,7 +112,7 @@ void MenuModule::createScene(int sceneNum, int which) { _childObject = new CreditsScene(_vm, this, true); break; case MAKING_OF: - createSmackerScene(kMakingOfSmackerFileHashList, false, true, true); + createSmackerScene(kMakingOfSmackerFileHashList, ConfMan.getBool("scalemakingofvideos"), true, true); break; case LOAD_GAME_MENU: createLoadGameMenu(); -- cgit v1.2.3 From 4ffbae38154949fdcf0e55cc18dbf8047e608829 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 28 Dec 2013 13:27:57 +0200 Subject: NEVERHOOD: Fix looping sounds (bug #6473) Based on salty-horse's patch - thanks! --- engines/neverhood/sound.cpp | 16 ++++++++++++---- engines/neverhood/sound.h | 1 + 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/sound.cpp b/engines/neverhood/sound.cpp index 3ea45491a7..4946de1681 100644 --- a/engines/neverhood/sound.cpp +++ b/engines/neverhood/sound.cpp @@ -66,6 +66,12 @@ void SoundResource::play() { soundItem->playSound(false); } +void SoundResource::playLooping() { + AudioResourceManSoundItem *soundItem = getSoundItem(); + if (soundItem) + soundItem->playSound(true); +} + void SoundResource::stop() { AudioResourceManSoundItem *soundItem = getSoundItem(); if (soundItem) @@ -244,7 +250,7 @@ void SoundItem::update() { } else if (--_currCountdown == 0) _soundResource->play(); } else if (_playLooping && !_soundResource->isPlaying()) - _soundResource->play(); + _soundResource->playLooping(); } // SoundMan @@ -558,10 +564,12 @@ int NeverhoodAudioStream::readBuffer(int16 *buffer, const int numSamples) { } if (bytesRead < bytesToRead || _stream->pos() >= _stream->size() || _stream->err() || _stream->eos()) { - if (_isLooping) + if (_isLooping) { _stream->seek(0); - else + _prevValue = 0; + } else { _endOfData = true; + } } } @@ -609,7 +617,7 @@ void AudioResourceManSoundItem::playSound(bool looping) { if (_data) { const byte *shiftValue = _resourceHandle.extData(); Common::MemoryReadStream *stream = new Common::MemoryReadStream(_data, _resourceHandle.size(), DisposeAfterUse::NO); - NeverhoodAudioStream *audioStream = new NeverhoodAudioStream(22050, *shiftValue, false, DisposeAfterUse::YES, stream); + NeverhoodAudioStream *audioStream = new NeverhoodAudioStream(22050, *shiftValue, looping, DisposeAfterUse::YES, stream); _vm->_mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundHandle, audioStream, -1, VOLUME(_volume), PANNING(_panning)); debug(1, "playing sound %08X", _fileHash); diff --git a/engines/neverhood/sound.h b/engines/neverhood/sound.h index 548fe88501..1f80f8d6b0 100644 --- a/engines/neverhood/sound.h +++ b/engines/neverhood/sound.h @@ -50,6 +50,7 @@ public: void unload(); void play(uint32 fileHash); void play(); + void playLooping(); void stop(); void setVolume(int16 volume); void setPan(int16 pan); -- cgit v1.2.3 From 6ed7f1dd4e71082d3e23108bd3e001a53d10cab6 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 28 Dec 2013 14:47:35 +0200 Subject: NEVERHOOD: Close the game menu when pressing the Escape key --- engines/neverhood/menumodule.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'engines/neverhood') diff --git a/engines/neverhood/menumodule.cpp b/engines/neverhood/menumodule.cpp index 8929fb35c6..f9de63ecc6 100644 --- a/engines/neverhood/menumodule.cpp +++ b/engines/neverhood/menumodule.cpp @@ -195,6 +195,14 @@ void MenuModule::updateScene() { } uint32 MenuModule::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { + switch(messageNum) { + case NM_KEYPRESS_ESC: + leaveModule(0); + break; + default: + break; + } + return Module::handleMessage(messageNum, param, sender);; } -- cgit v1.2.3 From 185c232b60ec25ed5ab7f8cb8bb9e59ac987e4c0 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 28 Dec 2013 14:52:37 +0200 Subject: NEVERHOOD: Fix quitting via the menu (bug #6474) --- engines/neverhood/menumodule.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/menumodule.cpp b/engines/neverhood/menumodule.cpp index f9de63ecc6..cf634d7d42 100644 --- a/engines/neverhood/menumodule.cpp +++ b/engines/neverhood/menumodule.cpp @@ -150,7 +150,6 @@ void MenuModule::updateScene() { leaveModule(0); break; case kMainMenuQuitGame: - leaveModule(0); _vm->quitGame(); break; case kMainMenuCredits: -- cgit v1.2.3 From ba3172b55f0b2bc2ebae1cb90804714e44d60c6f Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sat, 28 Dec 2013 14:21:48 +0100 Subject: NEVERHOOD: Fix crash when playing uncompressed sounds This happened to me when (or shortly afterwards; I'm not quite sure) lighting the fuse on the TNT dummy. --- engines/neverhood/sound.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/sound.cpp b/engines/neverhood/sound.cpp index 4946de1681..6888cc56bc 100644 --- a/engines/neverhood/sound.cpp +++ b/engines/neverhood/sound.cpp @@ -560,7 +560,7 @@ int NeverhoodAudioStream::readBuffer(int16 *buffer, const int numSamples) { } } else { memcpy(buffer, _buffer, bytesRead); - buffer += bytesRead; + buffer += samplesRead; } if (bytesRead < bytesToRead || _stream->pos() >= _stream->size() || _stream->err() || _stream->eos()) { -- cgit v1.2.3 From 4dc80ffdfe9527865ffc5ce19233a200d94b0245 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 1 Jan 2014 20:06:39 +0200 Subject: NEVERHOOD: Fix the mouse cursor in scene 3, module 3000 (after bridge) Color 255 should be white. Right now, this is a scene-specific workaround to avoid rechecking all scenes just for a glitch that happens in a specific scene. Many thanks to eriktorbjorn for figuring out that this is a palette issue, instead of a resource issue --- engines/neverhood/smackerplayer.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'engines/neverhood') diff --git a/engines/neverhood/smackerplayer.cpp b/engines/neverhood/smackerplayer.cpp index 4b4982f68e..b560279857 100644 --- a/engines/neverhood/smackerplayer.cpp +++ b/engines/neverhood/smackerplayer.cpp @@ -21,6 +21,7 @@ */ #include "graphics/palette.h" +#include "neverhood/gamemodule.h" #include "neverhood/smackerplayer.h" #include "neverhood/palette.h" #include "neverhood/resourceman.h" @@ -251,6 +252,15 @@ void SmackerPlayer::updatePalette() { tempPalette[i * 4 + 1] = smackerPalette[i * 3 + 1]; tempPalette[i * 4 + 2] = smackerPalette[i * 3 + 2]; } + + // WORKAROUND: Scene 3, module 3000 defines a black color 255 instead of + // white, which results in the mouse cursor showing black. I'm not sure if + // color 255 is always supposed to be white. It's not feasible to check + // all scenes for a glitch that only seems to manifest in one, therefore + // we define color 255 to be white only for that scene. + if (_vm->_gameModule->getCurrentModuleNum() == 3000 && _vm->_gameState.sceneNum == 3) + tempPalette[255 * 4 + 0] = tempPalette[255 * 4 + 1] = tempPalette[255 * 4 + 2] = 0xFF; + _palette->copyPalette(tempPalette, 0, 256, 0); } -- cgit v1.2.3 From 90e3e812bef2e2acf39978e09c9149023f93020a Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 2 Jan 2014 01:53:59 +0200 Subject: NEVERHOOD: Stop background sounds during credits (bug #6475) --- engines/neverhood/menumodule.cpp | 2 -- engines/neverhood/neverhood.cpp | 5 ++--- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/menumodule.cpp b/engines/neverhood/menumodule.cpp index cf634d7d42..a8d88a7109 100644 --- a/engines/neverhood/menumodule.cpp +++ b/engines/neverhood/menumodule.cpp @@ -412,7 +412,6 @@ CreditsScene::CreditsScene(NeverhoodEngine *vm, Module *parentModule, bool canAb _ticksTime = _vm->_system->getMillis() + 202100; - _vm->toggleSoundUpdate(true); _musicResource = new MusicResource(_vm); _musicResource->load(0x30812225); _musicResource->play(0); @@ -422,7 +421,6 @@ CreditsScene::CreditsScene(NeverhoodEngine *vm, Module *parentModule, bool canAb CreditsScene::~CreditsScene() { _musicResource->unload(); delete _musicResource; - _vm->toggleSoundUpdate(false); } void CreditsScene::update() { diff --git a/engines/neverhood/neverhood.cpp b/engines/neverhood/neverhood.cpp index b961bccea7..af09624380 100644 --- a/engines/neverhood/neverhood.cpp +++ b/engines/neverhood/neverhood.cpp @@ -194,10 +194,9 @@ void NeverhoodEngine::mainLoop() { nextFrameTime = _screen->getNextFrameTime(); }; - if (_updateSound) { + if (_updateSound) _soundMan->update(); - _audioResourceMan->updateMusic(); - } + _audioResourceMan->updateMusic(); _system->updateScreen(); _system->delayMillis(10); -- cgit v1.2.3 From acf63388efbfff052cf2695aa80637a1838b9e2d Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 5 Jan 2014 16:18:59 +0100 Subject: NEVERHOOD: Stop the background music when showing disk player This is consistent with all other disk players in the game. Only this one had it starting the music instead. Probably a typo. --- engines/neverhood/modules/module2800.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/modules/module2800.cpp b/engines/neverhood/modules/module2800.cpp index 8f23de33db..8fe527650e 100644 --- a/engines/neverhood/modules/module2800.cpp +++ b/engines/neverhood/modules/module2800.cpp @@ -203,7 +203,7 @@ void Module2800::createScene(int sceneNum, int which) { break; case 26: _vm->gameState().sceneNum = 26; - _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2); + _vm->_soundMan->stopMusic(0xD2FA4D14, 0, 2); _childObject = new DiskplayerScene(_vm, this, 4); break; case 1001: -- cgit v1.2.3 From 6849120a9ec67eda743bd1a7156d8a89550e115e Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 5 Jan 2014 18:01:10 +0200 Subject: NEVERHOOD: Simplify and document Module2800::createScene() --- engines/neverhood/modules/module2800.cpp | 105 +++++++++++-------------------- 1 file changed, 38 insertions(+), 67 deletions(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/modules/module2800.cpp b/engines/neverhood/modules/module2800.cpp index 8fe527650e..a8c5fb6438 100644 --- a/engines/neverhood/modules/module2800.cpp +++ b/engines/neverhood/modules/module2800.cpp @@ -59,154 +59,123 @@ Module2800::~Module2800() { _vm->_soundMan->deleteGroup(0x64210814); } +#define statueCloseup(backgroundFileHash, cursorFileHash) \ + _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2); \ + createStaticScene(backgroundFileHash, cursorFileHash) + void Module2800::createScene(int sceneNum, int which) { debug(1, "Module2800::createScene(%d, %d)", sceneNum, which); _sceneNum = sceneNum; + + if (_sceneNum != 1001) + _vm->gameState().sceneNum = _sceneNum; + switch (_sceneNum) { - case 0: - _vm->gameState().sceneNum = 0; + case 0: // in front of radio _vm->_soundMan->stopMusic(0xD2FA4D14, 0, 0); _childObject = new Scene2801(_vm, this, which); break; - case 1: - _vm->gameState().sceneNum = 1; + case 1: // radio _vm->_soundMan->stopMusic(0xD2FA4D14, 0, 0); if (getGlobalVar(V_RADIO_ENABLED)) _childObject = new Scene2802(_vm, this, which); else createStaticScene(0x000C6444, 0xC6440008); break; - case 2: - _vm->gameState().sceneNum = 2; + case 2: // outside shrink machine _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2); if (getGlobalVar(V_KLAYMEN_SMALL)) _childObject = new Scene2803Small(_vm, this, which); else _childObject = new Scene2803(_vm, this, which); break; - case 3: - _vm->gameState().sceneNum = 3; + case 3: // glass cylinder with diamonds _childObject = new Scene2804(_vm, this, which); break; - case 4: - _vm->gameState().sceneNum = 4; + case 4: // outside the transporter _vm->_soundMan->stopMusic(0xD2FA4D14, 0, 2); _childObject = new Scene2805(_vm, this, which); break; - case 5: - _vm->gameState().sceneNum = 5; + case 5: // left test tube room _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2); _childObject = new Scene2806(_vm, this, which); break; - case 6: - _vm->gameState().sceneNum = 6; + case 6: // the three test tubes next to the window _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2); _childObject = new Scene2807(_vm, this, which); break; - case 7: - _vm->gameState().sceneNum = 7; + case 7: // left test tube room closeup _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2); _childObject = new Scene2808(_vm, this, 0); break; - case 8: - _vm->gameState().sceneNum = 8; + case 8: // right test tube room _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2); _childObject = new Scene2809(_vm, this, which); break; - case 9: - _vm->gameState().sceneNum = 9; + case 9: // statue room _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2); _childObject = new Scene2810(_vm, this, which); break; - case 10: - _vm->gameState().sceneNum = 10; + case 10: // right test tube room closeup _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2); _childObject = new Scene2808(_vm, this, 1); break; - case 11: - _vm->gameState().sceneNum = 11; + case 11: // disk player room (above the statue room) _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2); _childObject = new Scene2812(_vm, this, which); break; case 12: - _vm->gameState().sceneNum = 12; - _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2); - createStaticScene(0x0000A245, 0x0A241008); + statueCloseup(0x0000A245, 0x0A241008); break; case 13: - _vm->gameState().sceneNum = 13; - _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2); - createStaticScene(0x81C60635, 0x60631814); + statueCloseup(0x81C60635, 0x60631814); break; case 14: - _vm->gameState().sceneNum = 14; - _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2); - createStaticScene(0xCA811204, 0x11200CA0); + statueCloseup(0xCA811204, 0x11200CA0); break; case 15: - _vm->gameState().sceneNum = 15; - _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2); - createStaticScene(0x2D438A00, 0x38A042DC); + statueCloseup(0x2D438A00, 0x38A042DC); break; case 16: - _vm->gameState().sceneNum = 16; - _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2); - createStaticScene(0x0A806204, 0x062000A0); + statueCloseup(0x0A806204, 0x062000A0); break; case 17: - _vm->gameState().sceneNum = 17; - _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2); - createStaticScene(0x010F9284, 0xF9280018); + statueCloseup(0x010F9284, 0xF9280018); break; case 18: - _vm->gameState().sceneNum = 18; - _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2); - createStaticScene(0x0100022B, 0x0022F018); + statueCloseup(0x0100022B, 0x0022F018); break; case 19: - _vm->gameState().sceneNum = 19; - _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2); - createStaticScene(0x10866205, 0x66201100); + statueCloseup(0x10866205, 0x66201100); break; case 20: - _vm->gameState().sceneNum = 20; - _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2); - createStaticScene(0x01C58000, 0x58004014); + statueCloseup(0x01C58000, 0x58004014); break; - case 21: - _vm->gameState().sceneNum = 21; + case 21: // statue with ladder down button _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2); _childObject = new Scene2822(_vm, this, which); break; case 22: - _vm->gameState().sceneNum = 22; - _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2); - createStaticScene(0x9408121E, 0x8121A948); + statueCloseup(0x9408121E, 0x8121A948); break; case 23: - _vm->gameState().sceneNum = 23; - _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2); - createStaticScene(0x048C0600, 0xC0604040); + statueCloseup(0x048C0600, 0xC0604040); break; case 24: - _vm->gameState().sceneNum = 24; - _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2); - createStaticScene(0x04270A94, 0x70A9004A); + statueCloseup(0x04270A94, 0x70A9004A); break; - case 25: - _vm->gameState().sceneNum = 25; + case 25: // window _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2); if (getGlobalVar(V_SHRINK_LIGHTS_ON)) createStaticScene(0x01600204, 0x0020001E); else createStaticScene(0x08611204, 0x1120008E); break; - case 26: - _vm->gameState().sceneNum = 26; + case 26: // disk player _vm->_soundMan->stopMusic(0xD2FA4D14, 0, 2); _childObject = new DiskplayerScene(_vm, this, 4); break; - case 1001: + case 1001: // tower rotation video _vm->_soundMan->stopMusic(0xD2FA4D14, 0, 0); _musicResource->stop(0); _currentMusicFileHash = 0; @@ -217,6 +186,8 @@ void Module2800::createScene(int sceneNum, int which) { _childObject->handleUpdate(); } +#undef statueCloseup + void Module2800::updateScene() { if (!updateChild()) { switch (_sceneNum) { -- cgit v1.2.3 From 784786a26d47e8d30a9930a2229cd517e88ada1a Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 6 Jan 2014 08:17:19 +0200 Subject: NEVERHOOD: Fix bug #6479 - "NEVERHOOD: Radio shows the wrong picture at first" --- engines/neverhood/smackerplayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/smackerplayer.cpp b/engines/neverhood/smackerplayer.cpp index b560279857..014e094b94 100644 --- a/engines/neverhood/smackerplayer.cpp +++ b/engines/neverhood/smackerplayer.cpp @@ -161,7 +161,7 @@ void SmackerPlayer::close() { void SmackerPlayer::gotoFrame(int frameNumber) { if (_smackerDecoder) { _smackerDecoder->forceSeekToFrame(frameNumber); - _smackerDecoder->decodeNextFrame(); + updateFrame(); } } -- cgit v1.2.3 From ab17bfb3d64a175dd5b6586b09789d784baa0b19 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Mon, 6 Jan 2014 14:37:56 +0100 Subject: NEVERHOOD: Use constants for messages in a couple of places Ideally, we should always use constants of course. But I guess we don't yet have sensible names for all messages. --- engines/neverhood/gamemodule.cpp | 4 ++-- engines/neverhood/messages.h | 9 +++++---- engines/neverhood/modules/module2800.cpp | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/gamemodule.cpp b/engines/neverhood/gamemodule.cpp index 31eee4da55..45f9465a11 100644 --- a/engines/neverhood/gamemodule.cpp +++ b/engines/neverhood/gamemodule.cpp @@ -95,7 +95,7 @@ void GameModule::handleMouseMove(int16 x, int16 y) { mousePos.x = x; mousePos.y = y; debug(2, "GameModule::handleMouseMove(%d, %d)", x, y); - sendPointMessage(_childObject, 0, mousePos); + sendPointMessage(_childObject, NM_MOUSE_MOVE, mousePos); } } @@ -115,7 +115,7 @@ void GameModule::handleMouseUp(int16 x, int16 y) { mousePos.x = x; mousePos.y = y; debug(2, "GameModule::handleMouseUp(%d, %d)", x, y); - sendPointMessage(_childObject, 0x0002, mousePos); + sendPointMessage(_childObject, NM_MOUSE_RELEASE, mousePos); } } diff --git a/engines/neverhood/messages.h b/engines/neverhood/messages.h index 7f165787bf..9816c2ca86 100644 --- a/engines/neverhood/messages.h +++ b/engines/neverhood/messages.h @@ -28,6 +28,7 @@ namespace Neverhood { enum NeverhoodMessage { NM_MOUSE_MOVE = 0x0000, NM_MOUSE_CLICK = 0x0001, + NM_MOUSE_RELEASE = 0x0002, NM_MOUSE_HIDE = 0x101D, NM_MOUSE_SHOW = 0x101E, NM_KEYPRESS_SPACE = 0x0009, @@ -56,12 +57,12 @@ enum NeverhoodMessage { NM_KLAYMEN_CLOSE_DOOR = 0x4809, NM_KLAYMEN_MOVE_OBJECT = 0x480A, NM_KLAYMEN_LOWER_LEVER = 0x480F, - NM_KLAYMEN_PICKUP = 0x4812, - NM_KLAYMEN_PRESS_BUTTON = 0x4816, - NM_KLAYMEN_INSERT_DISK = 0x481A, + NM_KLAYMEN_PICKUP = 0x4812, + NM_KLAYMEN_PRESS_BUTTON = 0x4816, + NM_KLAYMEN_INSERT_DISK = 0x481A, NM_KLAYMEN_TURN_TO_USE = 0x481D, NM_KLAYMEN_RETURN_FROM_USE = 0x481E, - NM_KLAYMEN_RELEASE_LEVER = 0x4827, + NM_KLAYMEN_RELEASE_LEVER = 0x4827, NM_MOVE_TO_BACK = 0x482A, NM_MOVE_TO_FRONT = 0x482B diff --git a/engines/neverhood/modules/module2800.cpp b/engines/neverhood/modules/module2800.cpp index a8c5fb6438..5d892de224 100644 --- a/engines/neverhood/modules/module2800.cpp +++ b/engines/neverhood/modules/module2800.cpp @@ -574,7 +574,7 @@ uint32 Scene2802::handleMessage(int messageNum, const MessageParam ¶m, Entit } } break; - case 0x0002: + case NM_MOUSE_RELEASE: if (_countdown1 == 0) _currTuneStatus = 0; else { -- cgit v1.2.3 From bb4a6c28996511b9c57465807276d8d8fb624cd4 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Mon, 6 Jan 2014 14:47:17 +0100 Subject: NEVERHOOD: Add mousewheel support to original save/load dialogs --- engines/neverhood/gamemodule.cpp | 12 ++++++++++++ engines/neverhood/gamemodule.h | 2 ++ engines/neverhood/menumodule.cpp | 6 ++++++ engines/neverhood/messages.h | 6 +++++- engines/neverhood/neverhood.cpp | 6 ++++++ 5 files changed, 31 insertions(+), 1 deletion(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/gamemodule.cpp b/engines/neverhood/gamemodule.cpp index 45f9465a11..12703d9f39 100644 --- a/engines/neverhood/gamemodule.cpp +++ b/engines/neverhood/gamemodule.cpp @@ -119,6 +119,18 @@ void GameModule::handleMouseUp(int16 x, int16 y) { } } +void GameModule::handleWheelUp() { + if (_childObject) { + sendMessage(_childObject, NM_MOUSE_WHEELUP, 0); + } +} + +void GameModule::handleWheelDown() { + if (_childObject) { + sendMessage(_childObject, NM_MOUSE_WHEELDOWN, 0); + } +} + void GameModule::handleSpaceKey() { if (_childObject) { debug(2, "GameModule::handleSpaceKey()"); diff --git a/engines/neverhood/gamemodule.h b/engines/neverhood/gamemodule.h index 2f2fecf463..198f8f6715 100644 --- a/engines/neverhood/gamemodule.h +++ b/engines/neverhood/gamemodule.h @@ -40,6 +40,8 @@ public: void handleMouseMove(int16 x, int16 y); void handleMouseDown(int16 x, int16 y); void handleMouseUp(int16 x, int16 y); + void handleWheelUp(); + void handleWheelDown(); void handleSpaceKey(); void handleAsciiKey(char key); void handleKeyDown(Common::KeyCode keyCode); diff --git a/engines/neverhood/menumodule.cpp b/engines/neverhood/menumodule.cpp index a8d88a7109..cf21bc094e 100644 --- a/engines/neverhood/menumodule.cpp +++ b/engines/neverhood/menumodule.cpp @@ -1025,6 +1025,12 @@ uint32 GameStateMenu::handleMessage(int messageNum, const MessageParam ¶m, E break; } break; + case NM_MOUSE_WHEELUP: + _listBox->scrollUp(); + break; + case NM_MOUSE_WHEELDOWN: + _listBox->scrollDown(); + break; } return 0; } diff --git a/engines/neverhood/messages.h b/engines/neverhood/messages.h index 9816c2ca86..5f1e1b87dd 100644 --- a/engines/neverhood/messages.h +++ b/engines/neverhood/messages.h @@ -65,7 +65,11 @@ enum NeverhoodMessage { NM_KLAYMEN_RELEASE_LEVER = 0x4827, NM_MOVE_TO_BACK = 0x482A, - NM_MOVE_TO_FRONT = 0x482B + NM_MOVE_TO_FRONT = 0x482B, + + // New to ScummVM + NM_MOUSE_WHEELUP = 0xF000, + NM_MOUSE_WHEELDOWN = 0xF001 }; } // End of namespace Neverhood diff --git a/engines/neverhood/neverhood.cpp b/engines/neverhood/neverhood.cpp index af09624380..82590d6c96 100644 --- a/engines/neverhood/neverhood.cpp +++ b/engines/neverhood/neverhood.cpp @@ -178,6 +178,12 @@ void NeverhoodEngine::mainLoop() { case Common::EVENT_RBUTTONUP: _gameModule->handleMouseUp(event.mouse.x, event.mouse.y); break; + case Common::EVENT_WHEELUP: + _gameModule->handleWheelUp(); + break; + case Common::EVENT_WHEELDOWN: + _gameModule->handleWheelDown(); + break; case Common::EVENT_QUIT: _system->quit(); break; -- cgit v1.2.3 From 6cfa27c2d562caf30d7a9b83ecb6b337089b9bfd Mon Sep 17 00:00:00 2001 From: johndoe123 Date: Mon, 6 Jan 2014 16:11:56 +0100 Subject: NEVERHOOD: Fix bug #6478 "NEVERHOOD: No footstep sounds" --- engines/neverhood/gamemodule.cpp | 4 +++- engines/neverhood/neverhood.cpp | 4 ++-- engines/neverhood/sound.cpp | 9 ++++----- 3 files changed, 9 insertions(+), 8 deletions(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/gamemodule.cpp b/engines/neverhood/gamemodule.cpp index 12703d9f39..5e9981caa6 100644 --- a/engines/neverhood/gamemodule.cpp +++ b/engines/neverhood/gamemodule.cpp @@ -79,7 +79,7 @@ GameModule::GameModule(NeverhoodEngine *vm) _mainMenuRequested(false) { // Other initializations moved to actual engine class - _vm->_soundMan->playSoundThree(0x002D0031, 0x8861079); + _vm->_soundMan->playSoundThree(0x002D0031, 0x08861079); SetMessageHandler(&GameModule::handleMessage); } @@ -427,6 +427,8 @@ void GameModule::checkRequests() { _vm->_audioResourceMan->stopAllSounds(); _vm->_soundMan->stopAllMusic(); _vm->_soundMan->stopAllSounds(); + // Reinsert turning sound because SoundMan::stopAllSounds() removes it + _vm->_soundMan->playSoundThree(0x002D0031, 0x08861079); delete _childObject; delete _prevChildObject; _childObject = NULL; diff --git a/engines/neverhood/neverhood.cpp b/engines/neverhood/neverhood.cpp index 82590d6c96..6b1f2d9346 100644 --- a/engines/neverhood/neverhood.cpp +++ b/engines/neverhood/neverhood.cpp @@ -197,11 +197,11 @@ void NeverhoodEngine::mainLoop() { _gameModule->draw(); _console->onFrame(); _screen->update(); + if (_updateSound) + _soundMan->update(); nextFrameTime = _screen->getNextFrameTime(); }; - if (_updateSound) - _soundMan->update(); _audioResourceMan->updateMusic(); _system->updateScreen(); diff --git a/engines/neverhood/sound.cpp b/engines/neverhood/sound.cpp index 6888cc56bc..5821fd6df3 100644 --- a/engines/neverhood/sound.cpp +++ b/engines/neverhood/sound.cpp @@ -241,13 +241,13 @@ void SoundItem::update() { if (_playOnceAfterCountdown) { if (_currCountdown == 0) _currCountdown = _initialCountdown; - else if (--_currCountdown == 0) + else if (--_currCountdown <= 0) _soundResource->play(); } else if (_playOnceAfterRandomCountdown) { if (_currCountdown == 0) { if (_minCountdown > 0 && _maxCountdown > 0 && _minCountdown < _maxCountdown) _currCountdown = _vm->_rnd->getRandomNumberRng(_minCountdown, _maxCountdown); - } else if (--_currCountdown == 0) + } else if (--_currCountdown <= 0) _soundResource->play(); } else if (_playLooping && !_soundResource->isPlaying()) _soundResource->playLooping(); @@ -257,8 +257,8 @@ void SoundItem::update() { SoundMan::SoundMan(NeverhoodEngine *vm) : _vm(vm), _soundIndex1(-1), _soundIndex2(-1), _soundIndex3(-1), - _initialCountdown(0), _playOnceAfterCountdown(false), - _initialCountdown3(0), _playOnceAfterCountdown3(false) { + _initialCountdown(15), _playOnceAfterCountdown(false), + _initialCountdown3(9), _playOnceAfterCountdown3(false) { } SoundMan::~SoundMan() { @@ -379,7 +379,6 @@ void SoundMan::update() { if (soundItem) soundItem->update(); } - for (uint i = 0; i < _musicItems.size(); ++i) { MusicItem *musicItem = _musicItems[i]; if (musicItem) -- cgit v1.2.3 From 62246364c35282f72fbf8e4e5cf627497f1144c2 Mon Sep 17 00:00:00 2001 From: johndoe123 Date: Mon, 6 Jan 2014 16:52:17 +0100 Subject: NEVERHOOD: Fix bug #6480 "NEVERHOOD: Car glitches" --- engines/neverhood/modules/module1600.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/modules/module1600.cpp b/engines/neverhood/modules/module1600.cpp index d66d5c1b8e..cfc0c05eed 100644 --- a/engines/neverhood/modules/module1600.cpp +++ b/engines/neverhood/modules/module1600.cpp @@ -307,7 +307,7 @@ Scene1608::Scene1608(NeverhoodEngine *vm, Module *parentModule, int which) _clipRect2 = _clipRect1; _clipRect2.y2 = 215; _kmScene1608->setClipRect(_clipRect1); - _asCar->setClipRect(_clipRect1); + _asCar->setClipRect(_clipRect3); _asIdleCarLower->setClipRect(_clipRect1); _asIdleCarFull->setClipRect(_clipRect1); _asTape = insertSprite(this, 13, 1100, 412, 443, 0x9148A011); -- cgit v1.2.3 From cd2e204d995b02fa79bfca1acbc3ca10b58c6803 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Mon, 6 Jan 2014 19:34:07 +0100 Subject: NEVERHOOD: Fix palette fading The palette didn't fade all the way to white when using the shrinking machine, which caused visible glitches. I've verified against a YouTube "Let's Play" that in the original it did fade all the way. Whether or not it did it in this exact way I do not know, but... close enough. --- engines/neverhood/palette.cpp | 13 ++++++++++--- engines/neverhood/palette.h | 1 + 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/palette.cpp b/engines/neverhood/palette.cpp index 941bcc3cd3..134fec7163 100644 --- a/engines/neverhood/palette.cpp +++ b/engines/neverhood/palette.cpp @@ -119,7 +119,7 @@ void Palette::startFadeToBlack(int counter) { _fadeToG = 0; _fadeToB = 0; _palCounter = counter; - _fadeStep = 255 / counter; + _fadeStep = calculateFadeStep(counter); _status = 1; } @@ -131,7 +131,7 @@ void Palette::startFadeToWhite(int counter) { _fadeToG = 255; _fadeToB = 255; _palCounter = counter; - _fadeStep = 255 / counter; + _fadeStep = calculateFadeStep(counter); _status = 1; } @@ -140,7 +140,7 @@ void Palette::startFadeToPalette(int counter) { if (counter == 0) counter = 1; _palCounter = counter; - _fadeStep = 255 / counter; + _fadeStep = calculateFadeStep(counter); _status = 2; } @@ -203,4 +203,11 @@ void Palette::fadeColor(byte *rgb, byte toR, byte toG, byte toB) { #undef FADE } +int Palette::calculateFadeStep(int counter) { + int fadeStep = 255 / counter; + if (255 % counter) + fadeStep++; + return fadeStep; +} + } // End of namespace Neverhood diff --git a/engines/neverhood/palette.h b/engines/neverhood/palette.h index c83207caae..016f856104 100644 --- a/engines/neverhood/palette.h +++ b/engines/neverhood/palette.h @@ -61,6 +61,7 @@ protected: int _fadeStep; void update(); void fadeColor(byte *rgb, byte toR, byte toG, byte toB); + int calculateFadeStep(int counter); }; } // End of namespace Neverhood -- cgit v1.2.3 From 475ccb24b2c9c12e01a315af4ab5d6a055a53fb2 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Mon, 6 Jan 2014 20:02:20 +0100 Subject: NEVERHOOD: Minor adjustment to original load/delete dialogs This makes space for one additional savegame slot, giving them the same number of slots as the original save dialog. I can't compare to the original, but it arguably looks better this way. --- engines/neverhood/menumodule.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/menumodule.cpp b/engines/neverhood/menumodule.cpp index cf21bc094e..b332418cf5 100644 --- a/engines/neverhood/menumodule.cpp +++ b/engines/neverhood/menumodule.cpp @@ -1083,7 +1083,7 @@ static const NRect kLoadGameMenuButtonCollisionBounds[] = { { 182, 358, 241, 433 } }; -static const NRect kLoadGameMenuListBoxRect = { 0, 0, 320, 271 }; +static const NRect kLoadGameMenuListBoxRect = { 0, 0, 320, 272 }; static const NRect kLoadGameMenuTextEditRect = { 0, 0, 320, 17 }; static const NRect kLoadGameMenuMouseRect = { 263, 48, 583, 65 }; @@ -1116,7 +1116,7 @@ static const NRect kDeleteGameMenuButtonCollisionBounds[] = { { 395, 278, 452, 372 } }; -static const NRect kDeleteGameMenuListBoxRect = { 0, 0, 320, 271 }; +static const NRect kDeleteGameMenuListBoxRect = { 0, 0, 320, 272 }; static const NRect kDeleteGameMenuTextEditRect = { 0, 0, 320, 17 }; DeleteGameMenu::DeleteGameMenu(NeverhoodEngine *vm, Module *parentModule, SavegameList *savegameList) -- cgit v1.2.3 From 9754be2d07599a2b9db7816450d282c7cecd78cb Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Mon, 6 Jan 2014 22:29:32 +0100 Subject: NEVERHOOD: Tiny cleanup --- engines/neverhood/module.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/module.cpp b/engines/neverhood/module.cpp index d1578e680c..3ef4554334 100644 --- a/engines/neverhood/module.cpp +++ b/engines/neverhood/module.cpp @@ -48,7 +48,7 @@ void Module::draw() { uint32 Module::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { switch (messageNum) { case 0x0008: - sendMessage(_parentModule, 8, 0); + sendMessage(_parentModule, 0x0008, 0); return 0; case 0x1009: _moduleResult = param.asInteger(); -- cgit v1.2.3 From 67483e591f943b65aeced1a5b76486d44aa2d364 Mon Sep 17 00:00:00 2001 From: johndoe123 Date: Mon, 6 Jan 2014 23:17:35 +0100 Subject: NEVERHOOD: Correct fix for bug #6480 The car clipping rectangle wasn't set correctly when the car is on the upper level. --- engines/neverhood/modules/module1600.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/modules/module1600.cpp b/engines/neverhood/modules/module1600.cpp index cfc0c05eed..76c5ca93d2 100644 --- a/engines/neverhood/modules/module1600.cpp +++ b/engines/neverhood/modules/module1600.cpp @@ -401,7 +401,7 @@ void Scene1608::upRidingCar() { sendPointMessage(_asCar, 0x2004, _mouseClickPos); _mouseClicked = false; } - if (_asCar->getX() < 300) { + if (_asCar->getY() < 330) { if (_carClipFlag) { _carClipFlag = false; _asCar->setClipRect(_clipRect1); -- cgit v1.2.3 From 4137128cf65b96f942d70e8456968d4bab105117 Mon Sep 17 00:00:00 2001 From: johndoe123 Date: Thu, 9 Jan 2014 15:33:47 +0100 Subject: NEVERHOOD: Fix sprite shadows (e.g. when on top in module 1000, scene 1) --- engines/neverhood/graphics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/graphics.cpp b/engines/neverhood/graphics.cpp index 490959020f..e976844c16 100644 --- a/engines/neverhood/graphics.cpp +++ b/engines/neverhood/graphics.cpp @@ -299,11 +299,11 @@ void unpackSpriteRle(const byte *source, int width, int height, byte *dest, int } source += copy; } - dest += destPitch; if (replaceColors) for (int xc = 0; xc < width; xc++) if (dest[xc] == oldColor) dest[xc] = newColor; + dest += destPitch; } } rows = READ_LE_UINT16(source); -- cgit v1.2.3 From 24b1ff15ee5a05c66ebc4532f66b1616c405aadf Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sat, 11 Jan 2014 17:21:16 +0100 Subject: NEVERHOOD: Set engine to 'built by default' --- engines/neverhood/configure.engine | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/configure.engine b/engines/neverhood/configure.engine index 0767a631f9..46910e293e 100644 --- a/engines/neverhood/configure.engine +++ b/engines/neverhood/configure.engine @@ -1,3 +1,3 @@ # This file is included from the main "configure" script # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps] -add_engine neverhood "Neverhood" no +add_engine neverhood "Neverhood" yes -- cgit v1.2.3 From a29160939a845225286c65d8c2946815a99bccae Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 11 Jan 2014 23:38:06 +0100 Subject: NEVERHOOD: Initialize NeverhoodEngine::_console variable to nullptr. This fixes a nasty crash in case neverhood.dat is not present. --- engines/neverhood/neverhood.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/neverhood.cpp b/engines/neverhood/neverhood.cpp index 6b1f2d9346..1119bfbb08 100644 --- a/engines/neverhood/neverhood.cpp +++ b/engines/neverhood/neverhood.cpp @@ -45,7 +45,7 @@ namespace Neverhood { -NeverhoodEngine::NeverhoodEngine(OSystem *syst, const NeverhoodGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) { +NeverhoodEngine::NeverhoodEngine(OSystem *syst, const NeverhoodGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc), _console(nullptr) { // Setup mixer if (!_mixer->isReady()) { warning("Sound initialization failed."); -- cgit v1.2.3 From 592526dc5d66b4249f8acd1d4b3ad3d7fa1854bf Mon Sep 17 00:00:00 2001 From: johndoe123 Date: Sun, 12 Jan 2014 00:33:42 +0100 Subject: NEVERHOOD: Fix "Klaymen! Up here!" in module 1100, scene 2 --- engines/neverhood/sound.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/sound.cpp b/engines/neverhood/sound.cpp index 5821fd6df3..04043692f8 100644 --- a/engines/neverhood/sound.cpp +++ b/engines/neverhood/sound.cpp @@ -214,7 +214,7 @@ void SoundItem::setSoundParams(bool playOnceAfterRandomCountdown, int16 minCount _minCountdown = minCountdown; if (maxCountdown > 0) _maxCountdown = maxCountdown; - if (firstMinCountdown >= firstMaxCountdown) + if (firstMinCountdown > firstMaxCountdown) _currCountdown = firstMinCountdown; else if (firstMinCountdown > 0 && firstMaxCountdown > 0 && firstMinCountdown < firstMaxCountdown) _currCountdown = _vm->_rnd->getRandomNumberRng(firstMinCountdown, firstMaxCountdown); -- cgit v1.2.3 From be55f3277c9c3123dae9fc24750348b837101262 Mon Sep 17 00:00:00 2001 From: johndoe123 Date: Tue, 14 Jan 2014 19:53:33 +0100 Subject: NEVERHOOD: Fix for bug #6493: "NEVERHOOD: Many sounds playback as loud static (Wii)" --- engines/neverhood/sound.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/sound.cpp b/engines/neverhood/sound.cpp index 04043692f8..023eda4c02 100644 --- a/engines/neverhood/sound.cpp +++ b/engines/neverhood/sound.cpp @@ -558,8 +558,10 @@ int NeverhoodAudioStream::readBuffer(int16 *buffer, const int numSamples) { *buffer++ = _prevValue << _shiftValue; } } else { - memcpy(buffer, _buffer, bytesRead); - buffer += samplesRead; + while (samplesRead--) { + *buffer++ = READ_LE_UINT16(src); + src += 2; + } } if (bytesRead < bytesToRead || _stream->pos() >= _stream->size() || _stream->err() || _stream->eos()) { -- cgit v1.2.3 From a5b617a0a6bf97367c5995478e4cf0aa639a8d1e Mon Sep 17 00:00:00 2001 From: johndoe123 Date: Tue, 14 Jan 2014 19:55:14 +0100 Subject: NEVERHOOD: Fix for bug #6481: 'NEVERHOOD: Wrong walk sound in navigation scene' --- engines/neverhood/modules/module1100.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/modules/module1100.cpp b/engines/neverhood/modules/module1100.cpp index e7dd6e4210..e40508e502 100644 --- a/engines/neverhood/modules/module1100.cpp +++ b/engines/neverhood/modules/module1100.cpp @@ -136,15 +136,20 @@ void Module1100::updateScene() { switch (_sceneNum) { case 0: _countdown = 0; - _vm->_soundMan->playTwoSounds(0x0002C818, 0x48498E46, 0x50399F64, 0); _vm->_soundMan->setSoundVolume(0x48498E46, 65); _vm->_soundMan->setSoundVolume(0x50399F64, 65); - if (_moduleResult == 0) + if (_moduleResult == 0) { + _vm->_soundMan->playTwoSounds(0x0002C818, 0x48498E46, 0x50399F64, 0); createScene(1, 0); - else if (_moduleResult == 1) + } else if (_moduleResult == 1) { + /* NOTE This fixes a bug in the original where the "tunnel" footstep + sounds are played instead of the correct footsteps. */ + _vm->_soundMan->playTwoSounds(0x0002C818, 0x41861371, 0x43A2507F, 0); createScene(8, 0); + } break; case 1: + _countdown = 0; _vm->_soundMan->playTwoSounds(0x0002C818, 0x41861371, 0x43A2507F, 0); if (getGlobalVar(V_ROBOT_HIT)) { if (_moduleResult == 0) -- cgit v1.2.3 From b808d4818ef0669fe88ac347022e123fa609e380 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sun, 16 Feb 2014 18:37:48 +0100 Subject: NEVERHOOD: Janitorial - Remove trailing spaces --- engines/neverhood/modules/module1100.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/modules/module1100.cpp b/engines/neverhood/modules/module1100.cpp index e40508e502..1601f3a140 100644 --- a/engines/neverhood/modules/module1100.cpp +++ b/engines/neverhood/modules/module1100.cpp @@ -142,7 +142,7 @@ void Module1100::updateScene() { _vm->_soundMan->playTwoSounds(0x0002C818, 0x48498E46, 0x50399F64, 0); createScene(1, 0); } else if (_moduleResult == 1) { - /* NOTE This fixes a bug in the original where the "tunnel" footstep + /* NOTE This fixes a bug in the original where the "tunnel" footstep sounds are played instead of the correct footsteps. */ _vm->_soundMan->playTwoSounds(0x0002C818, 0x41861371, 0x43A2507F, 0); createScene(8, 0); -- cgit v1.2.3 From 6563171e7b7f373dde50b64da318c14c8207df32 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 18 Feb 2014 02:34:22 +0100 Subject: NEVERHOOD: Make GPL headers consisten in themselves. --- engines/neverhood/background.cpp | 4 ++-- engines/neverhood/background.h | 4 ++-- engines/neverhood/blbarchive.cpp | 4 ++-- engines/neverhood/blbarchive.h | 4 ++-- engines/neverhood/console.cpp | 4 ++-- engines/neverhood/console.h | 4 ++-- engines/neverhood/detection.cpp | 4 ++-- engines/neverhood/diskplayerscene.cpp | 4 ++-- engines/neverhood/diskplayerscene.h | 4 ++-- engines/neverhood/entity.cpp | 4 ++-- engines/neverhood/entity.h | 4 ++-- engines/neverhood/gamemodule.cpp | 4 ++-- engines/neverhood/gamemodule.h | 4 ++-- engines/neverhood/gamevars.cpp | 4 ++-- engines/neverhood/gamevars.h | 4 ++-- engines/neverhood/graphics.cpp | 4 ++-- engines/neverhood/graphics.h | 4 ++-- engines/neverhood/klaymen.cpp | 4 ++-- engines/neverhood/klaymen.h | 4 ++-- engines/neverhood/menumodule.cpp | 4 ++-- engines/neverhood/menumodule.h | 4 ++-- engines/neverhood/messages.h | 4 ++-- engines/neverhood/microtiles.cpp | 5 ++--- engines/neverhood/microtiles.h | 5 ++--- engines/neverhood/module.cpp | 4 ++-- engines/neverhood/module.h | 4 ++-- engines/neverhood/modules/module1000.cpp | 4 ++-- engines/neverhood/modules/module1000.h | 4 ++-- engines/neverhood/modules/module1000_sprites.cpp | 4 ++-- engines/neverhood/modules/module1000_sprites.h | 4 ++-- engines/neverhood/modules/module1100.cpp | 4 ++-- engines/neverhood/modules/module1100.h | 4 ++-- engines/neverhood/modules/module1100_sprites.cpp | 4 ++-- engines/neverhood/modules/module1100_sprites.h | 4 ++-- engines/neverhood/modules/module1200.cpp | 4 ++-- engines/neverhood/modules/module1200.h | 4 ++-- engines/neverhood/modules/module1200_sprites.cpp | 4 ++-- engines/neverhood/modules/module1200_sprites.h | 4 ++-- engines/neverhood/modules/module1300.cpp | 4 ++-- engines/neverhood/modules/module1300.h | 4 ++-- engines/neverhood/modules/module1300_sprites.cpp | 4 ++-- engines/neverhood/modules/module1300_sprites.h | 4 ++-- engines/neverhood/modules/module1400.cpp | 4 ++-- engines/neverhood/modules/module1400.h | 4 ++-- engines/neverhood/modules/module1400_sprites.cpp | 4 ++-- engines/neverhood/modules/module1400_sprites.h | 4 ++-- engines/neverhood/modules/module1500.cpp | 4 ++-- engines/neverhood/modules/module1500.h | 4 ++-- engines/neverhood/modules/module1600.cpp | 4 ++-- engines/neverhood/modules/module1600.h | 4 ++-- engines/neverhood/modules/module1600_sprites.cpp | 4 ++-- engines/neverhood/modules/module1600_sprites.h | 4 ++-- engines/neverhood/modules/module1700.cpp | 4 ++-- engines/neverhood/modules/module1700.h | 4 ++-- engines/neverhood/modules/module1700_sprites.cpp | 4 ++-- engines/neverhood/modules/module1700_sprites.h | 4 ++-- engines/neverhood/modules/module1800.cpp | 4 ++-- engines/neverhood/modules/module1800.h | 4 ++-- engines/neverhood/modules/module1900.cpp | 4 ++-- engines/neverhood/modules/module1900.h | 4 ++-- engines/neverhood/modules/module1900_sprites.cpp | 4 ++-- engines/neverhood/modules/module1900_sprites.h | 4 ++-- engines/neverhood/modules/module2000.cpp | 4 ++-- engines/neverhood/modules/module2000.h | 4 ++-- engines/neverhood/modules/module2000_sprites.cpp | 4 ++-- engines/neverhood/modules/module2000_sprites.h | 4 ++-- engines/neverhood/modules/module2100.cpp | 4 ++-- engines/neverhood/modules/module2100.h | 4 ++-- engines/neverhood/modules/module2100_sprites.cpp | 4 ++-- engines/neverhood/modules/module2100_sprites.h | 4 ++-- engines/neverhood/modules/module2200.cpp | 4 ++-- engines/neverhood/modules/module2200.h | 4 ++-- engines/neverhood/modules/module2200_sprites.cpp | 4 ++-- engines/neverhood/modules/module2200_sprites.h | 4 ++-- engines/neverhood/modules/module2300.cpp | 4 ++-- engines/neverhood/modules/module2300.h | 4 ++-- engines/neverhood/modules/module2400.cpp | 4 ++-- engines/neverhood/modules/module2400.h | 4 ++-- engines/neverhood/modules/module2400_sprites.cpp | 4 ++-- engines/neverhood/modules/module2400_sprites.h | 4 ++-- engines/neverhood/modules/module2500.cpp | 4 ++-- engines/neverhood/modules/module2500.h | 4 ++-- engines/neverhood/modules/module2500_sprites.cpp | 4 ++-- engines/neverhood/modules/module2500_sprites.h | 4 ++-- engines/neverhood/modules/module2600.cpp | 4 ++-- engines/neverhood/modules/module2600.h | 4 ++-- engines/neverhood/modules/module2600_sprites.cpp | 4 ++-- engines/neverhood/modules/module2600_sprites.h | 4 ++-- engines/neverhood/modules/module2700.cpp | 4 ++-- engines/neverhood/modules/module2700.h | 4 ++-- engines/neverhood/modules/module2700_sprites.cpp | 4 ++-- engines/neverhood/modules/module2700_sprites.h | 4 ++-- engines/neverhood/modules/module2800.cpp | 4 ++-- engines/neverhood/modules/module2800.h | 4 ++-- engines/neverhood/modules/module2800_sprites.cpp | 4 ++-- engines/neverhood/modules/module2800_sprites.h | 4 ++-- engines/neverhood/modules/module2900.cpp | 4 ++-- engines/neverhood/modules/module2900.h | 4 ++-- engines/neverhood/modules/module2900_sprites.cpp | 4 ++-- engines/neverhood/modules/module2900_sprites.h | 4 ++-- engines/neverhood/modules/module3000.cpp | 4 ++-- engines/neverhood/modules/module3000.h | 4 ++-- engines/neverhood/modules/module3000_sprites.cpp | 4 ++-- engines/neverhood/modules/module3000_sprites.h | 4 ++-- engines/neverhood/mouse.cpp | 4 ++-- engines/neverhood/mouse.h | 4 ++-- engines/neverhood/navigationscene.cpp | 4 ++-- engines/neverhood/navigationscene.h | 4 ++-- engines/neverhood/neverhood.cpp | 4 ++-- engines/neverhood/neverhood.h | 4 ++-- engines/neverhood/palette.cpp | 4 ++-- engines/neverhood/palette.h | 4 ++-- engines/neverhood/resource.cpp | 4 ++-- engines/neverhood/resource.h | 4 ++-- engines/neverhood/resourceman.cpp | 4 ++-- engines/neverhood/resourceman.h | 4 ++-- engines/neverhood/saveload.cpp | 5 ++--- engines/neverhood/scene.cpp | 4 ++-- engines/neverhood/scene.h | 4 ++-- engines/neverhood/screen.cpp | 4 ++-- engines/neverhood/screen.h | 4 ++-- engines/neverhood/smackerplayer.cpp | 4 ++-- engines/neverhood/smackerplayer.h | 4 ++-- engines/neverhood/smackerscene.cpp | 4 ++-- engines/neverhood/smackerscene.h | 4 ++-- engines/neverhood/sound.cpp | 4 ++-- engines/neverhood/sound.h | 4 ++-- engines/neverhood/sprite.cpp | 4 ++-- engines/neverhood/sprite.h | 4 ++-- engines/neverhood/staticdata.cpp | 4 ++-- engines/neverhood/staticdata.h | 4 ++-- 131 files changed, 262 insertions(+), 265 deletions(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/background.cpp b/engines/neverhood/background.cpp index d6a9900d38..77c1e057a6 100644 --- a/engines/neverhood/background.cpp +++ b/engines/neverhood/background.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/background.h b/engines/neverhood/background.h index ef88be21c0..d4ba20c8e5 100644 --- a/engines/neverhood/background.h +++ b/engines/neverhood/background.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/blbarchive.cpp b/engines/neverhood/blbarchive.cpp index c743037e63..d1d8cf1aa2 100644 --- a/engines/neverhood/blbarchive.cpp +++ b/engines/neverhood/blbarchive.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/blbarchive.h b/engines/neverhood/blbarchive.h index 620b12b8ac..25e816ddcd 100644 --- a/engines/neverhood/blbarchive.h +++ b/engines/neverhood/blbarchive.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/console.cpp b/engines/neverhood/console.cpp index 34438d821f..a4d1366880 100644 --- a/engines/neverhood/console.cpp +++ b/engines/neverhood/console.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/console.h b/engines/neverhood/console.h index 70260a96af..bf1b201270 100644 --- a/engines/neverhood/console.h +++ b/engines/neverhood/console.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/detection.cpp b/engines/neverhood/detection.cpp index feba193609..57580395bf 100644 --- a/engines/neverhood/detection.cpp +++ b/engines/neverhood/detection.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/diskplayerscene.cpp b/engines/neverhood/diskplayerscene.cpp index 7513034bf3..96a935851c 100644 --- a/engines/neverhood/diskplayerscene.cpp +++ b/engines/neverhood/diskplayerscene.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/diskplayerscene.h b/engines/neverhood/diskplayerscene.h index 150d5c58ed..2ae85b9a0b 100644 --- a/engines/neverhood/diskplayerscene.h +++ b/engines/neverhood/diskplayerscene.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/entity.cpp b/engines/neverhood/entity.cpp index 1ebf1dcf6c..68390051f5 100644 --- a/engines/neverhood/entity.cpp +++ b/engines/neverhood/entity.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/entity.h b/engines/neverhood/entity.h index 5c29bf8a4f..4edb19239d 100644 --- a/engines/neverhood/entity.h +++ b/engines/neverhood/entity.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/gamemodule.cpp b/engines/neverhood/gamemodule.cpp index 5e9981caa6..12ae66658c 100644 --- a/engines/neverhood/gamemodule.cpp +++ b/engines/neverhood/gamemodule.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/gamemodule.h b/engines/neverhood/gamemodule.h index 198f8f6715..b8f7276773 100644 --- a/engines/neverhood/gamemodule.h +++ b/engines/neverhood/gamemodule.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/gamevars.cpp b/engines/neverhood/gamevars.cpp index 9c080fea24..72b688c194 100644 --- a/engines/neverhood/gamevars.cpp +++ b/engines/neverhood/gamevars.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/gamevars.h b/engines/neverhood/gamevars.h index 3aec4d1da4..9bb49ebf5b 100644 --- a/engines/neverhood/gamevars.h +++ b/engines/neverhood/gamevars.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/graphics.cpp b/engines/neverhood/graphics.cpp index e976844c16..3d1724ed8a 100644 --- a/engines/neverhood/graphics.cpp +++ b/engines/neverhood/graphics.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/graphics.h b/engines/neverhood/graphics.h index b80bd60729..12fb2d2215 100644 --- a/engines/neverhood/graphics.h +++ b/engines/neverhood/graphics.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/klaymen.cpp b/engines/neverhood/klaymen.cpp index a813440f62..de940bda79 100644 --- a/engines/neverhood/klaymen.cpp +++ b/engines/neverhood/klaymen.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/klaymen.h b/engines/neverhood/klaymen.h index a614560fc0..6c25d5b4de 100644 --- a/engines/neverhood/klaymen.h +++ b/engines/neverhood/klaymen.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/menumodule.cpp b/engines/neverhood/menumodule.cpp index b332418cf5..255d04dc86 100644 --- a/engines/neverhood/menumodule.cpp +++ b/engines/neverhood/menumodule.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/menumodule.h b/engines/neverhood/menumodule.h index 9da9c849a9..6508ccbdf2 100644 --- a/engines/neverhood/menumodule.h +++ b/engines/neverhood/menumodule.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/messages.h b/engines/neverhood/messages.h index 5f1e1b87dd..15a762fbe9 100644 --- a/engines/neverhood/messages.h +++ b/engines/neverhood/messages.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/microtiles.cpp b/engines/neverhood/microtiles.cpp index 3dd6475046..a1075b8d09 100644 --- a/engines/neverhood/microtiles.cpp +++ b/engines/neverhood/microtiles.cpp @@ -8,17 +8,16 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * */ #include "neverhood/microtiles.h" diff --git a/engines/neverhood/microtiles.h b/engines/neverhood/microtiles.h index 29af3d956a..15152600df 100644 --- a/engines/neverhood/microtiles.h +++ b/engines/neverhood/microtiles.h @@ -8,17 +8,16 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * */ #ifndef NEVERHOOD_MICROTILES_H diff --git a/engines/neverhood/module.cpp b/engines/neverhood/module.cpp index 3ef4554334..0d6b70c9a2 100644 --- a/engines/neverhood/module.cpp +++ b/engines/neverhood/module.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/module.h b/engines/neverhood/module.h index 8ab2159030..d4c954c716 100644 --- a/engines/neverhood/module.h +++ b/engines/neverhood/module.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1000.cpp b/engines/neverhood/modules/module1000.cpp index 788e22dc1b..cdeb457df5 100644 --- a/engines/neverhood/modules/module1000.cpp +++ b/engines/neverhood/modules/module1000.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1000.h b/engines/neverhood/modules/module1000.h index 4b17c92b3b..d2afaf69ee 100644 --- a/engines/neverhood/modules/module1000.h +++ b/engines/neverhood/modules/module1000.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1000_sprites.cpp b/engines/neverhood/modules/module1000_sprites.cpp index a028df4b10..dd504ae25a 100644 --- a/engines/neverhood/modules/module1000_sprites.cpp +++ b/engines/neverhood/modules/module1000_sprites.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1000_sprites.h b/engines/neverhood/modules/module1000_sprites.h index 564b3cc335..8a03824086 100644 --- a/engines/neverhood/modules/module1000_sprites.h +++ b/engines/neverhood/modules/module1000_sprites.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1100.cpp b/engines/neverhood/modules/module1100.cpp index 1601f3a140..cca80f3f62 100644 --- a/engines/neverhood/modules/module1100.cpp +++ b/engines/neverhood/modules/module1100.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1100.h b/engines/neverhood/modules/module1100.h index 38bac1f298..31f5f8a04e 100644 --- a/engines/neverhood/modules/module1100.h +++ b/engines/neverhood/modules/module1100.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1100_sprites.cpp b/engines/neverhood/modules/module1100_sprites.cpp index 49a388ffca..b5fd8490f6 100644 --- a/engines/neverhood/modules/module1100_sprites.cpp +++ b/engines/neverhood/modules/module1100_sprites.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1100_sprites.h b/engines/neverhood/modules/module1100_sprites.h index c8e5a838da..2e50902664 100644 --- a/engines/neverhood/modules/module1100_sprites.h +++ b/engines/neverhood/modules/module1100_sprites.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1200.cpp b/engines/neverhood/modules/module1200.cpp index 8bf42b3b96..ba5e18ab15 100644 --- a/engines/neverhood/modules/module1200.cpp +++ b/engines/neverhood/modules/module1200.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1200.h b/engines/neverhood/modules/module1200.h index d9d4dd11f2..492f0d42f0 100644 --- a/engines/neverhood/modules/module1200.h +++ b/engines/neverhood/modules/module1200.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1200_sprites.cpp b/engines/neverhood/modules/module1200_sprites.cpp index 5848e16092..04bd4c1cb7 100644 --- a/engines/neverhood/modules/module1200_sprites.cpp +++ b/engines/neverhood/modules/module1200_sprites.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1200_sprites.h b/engines/neverhood/modules/module1200_sprites.h index ef1ec40ced..ae820f0530 100644 --- a/engines/neverhood/modules/module1200_sprites.h +++ b/engines/neverhood/modules/module1200_sprites.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1300.cpp b/engines/neverhood/modules/module1300.cpp index fe119c1732..d806019e6c 100644 --- a/engines/neverhood/modules/module1300.cpp +++ b/engines/neverhood/modules/module1300.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1300.h b/engines/neverhood/modules/module1300.h index 2f59ff16c2..4a0ca6c062 100644 --- a/engines/neverhood/modules/module1300.h +++ b/engines/neverhood/modules/module1300.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1300_sprites.cpp b/engines/neverhood/modules/module1300_sprites.cpp index 0c1632501e..b4b42198e1 100644 --- a/engines/neverhood/modules/module1300_sprites.cpp +++ b/engines/neverhood/modules/module1300_sprites.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1300_sprites.h b/engines/neverhood/modules/module1300_sprites.h index e044d3cec8..6f4faaa234 100644 --- a/engines/neverhood/modules/module1300_sprites.h +++ b/engines/neverhood/modules/module1300_sprites.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1400.cpp b/engines/neverhood/modules/module1400.cpp index 018f27e2b7..551b6874ff 100644 --- a/engines/neverhood/modules/module1400.cpp +++ b/engines/neverhood/modules/module1400.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1400.h b/engines/neverhood/modules/module1400.h index 53ad7125ab..52f72db6d3 100644 --- a/engines/neverhood/modules/module1400.h +++ b/engines/neverhood/modules/module1400.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1400_sprites.cpp b/engines/neverhood/modules/module1400_sprites.cpp index 478b328034..30a5c340c9 100644 --- a/engines/neverhood/modules/module1400_sprites.cpp +++ b/engines/neverhood/modules/module1400_sprites.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1400_sprites.h b/engines/neverhood/modules/module1400_sprites.h index 49b91fe0cf..fe0db66d27 100644 --- a/engines/neverhood/modules/module1400_sprites.h +++ b/engines/neverhood/modules/module1400_sprites.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1500.cpp b/engines/neverhood/modules/module1500.cpp index eaa23e586b..8e51b1aff5 100644 --- a/engines/neverhood/modules/module1500.cpp +++ b/engines/neverhood/modules/module1500.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1500.h b/engines/neverhood/modules/module1500.h index f244948918..6c8bf32340 100644 --- a/engines/neverhood/modules/module1500.h +++ b/engines/neverhood/modules/module1500.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1600.cpp b/engines/neverhood/modules/module1600.cpp index 76c5ca93d2..0adcd939cd 100644 --- a/engines/neverhood/modules/module1600.cpp +++ b/engines/neverhood/modules/module1600.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1600.h b/engines/neverhood/modules/module1600.h index f08eaad8fc..b1c9662f79 100644 --- a/engines/neverhood/modules/module1600.h +++ b/engines/neverhood/modules/module1600.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1600_sprites.cpp b/engines/neverhood/modules/module1600_sprites.cpp index b7b3658c5e..09e3d0afe1 100644 --- a/engines/neverhood/modules/module1600_sprites.cpp +++ b/engines/neverhood/modules/module1600_sprites.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1600_sprites.h b/engines/neverhood/modules/module1600_sprites.h index fa59475dad..1c51160be3 100644 --- a/engines/neverhood/modules/module1600_sprites.h +++ b/engines/neverhood/modules/module1600_sprites.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1700.cpp b/engines/neverhood/modules/module1700.cpp index 1062691cd2..6ff34ecd91 100644 --- a/engines/neverhood/modules/module1700.cpp +++ b/engines/neverhood/modules/module1700.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1700.h b/engines/neverhood/modules/module1700.h index 09daff2acf..57d04312bb 100644 --- a/engines/neverhood/modules/module1700.h +++ b/engines/neverhood/modules/module1700.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1700_sprites.cpp b/engines/neverhood/modules/module1700_sprites.cpp index d6e00c95f3..3a6784b0f5 100644 --- a/engines/neverhood/modules/module1700_sprites.cpp +++ b/engines/neverhood/modules/module1700_sprites.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1700_sprites.h b/engines/neverhood/modules/module1700_sprites.h index 4117de01d9..afa5d9f7ad 100644 --- a/engines/neverhood/modules/module1700_sprites.h +++ b/engines/neverhood/modules/module1700_sprites.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1800.cpp b/engines/neverhood/modules/module1800.cpp index 282292a516..17d6367252 100644 --- a/engines/neverhood/modules/module1800.cpp +++ b/engines/neverhood/modules/module1800.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1800.h b/engines/neverhood/modules/module1800.h index d3f3a635c3..35af1f8e58 100644 --- a/engines/neverhood/modules/module1800.h +++ b/engines/neverhood/modules/module1800.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1900.cpp b/engines/neverhood/modules/module1900.cpp index 5fdc6091dc..71926d6950 100644 --- a/engines/neverhood/modules/module1900.cpp +++ b/engines/neverhood/modules/module1900.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1900.h b/engines/neverhood/modules/module1900.h index d785c6f506..78128f8f37 100644 --- a/engines/neverhood/modules/module1900.h +++ b/engines/neverhood/modules/module1900.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1900_sprites.cpp b/engines/neverhood/modules/module1900_sprites.cpp index 9e43203def..074a83cdcd 100644 --- a/engines/neverhood/modules/module1900_sprites.cpp +++ b/engines/neverhood/modules/module1900_sprites.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module1900_sprites.h b/engines/neverhood/modules/module1900_sprites.h index 7e57b11618..6df02e2279 100644 --- a/engines/neverhood/modules/module1900_sprites.h +++ b/engines/neverhood/modules/module1900_sprites.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2000.cpp b/engines/neverhood/modules/module2000.cpp index ad18e65cdd..498f50989e 100644 --- a/engines/neverhood/modules/module2000.cpp +++ b/engines/neverhood/modules/module2000.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2000.h b/engines/neverhood/modules/module2000.h index 8dc72c57dc..6e1cfb6fe6 100644 --- a/engines/neverhood/modules/module2000.h +++ b/engines/neverhood/modules/module2000.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2000_sprites.cpp b/engines/neverhood/modules/module2000_sprites.cpp index 35edd8e73f..ccf383d26d 100644 --- a/engines/neverhood/modules/module2000_sprites.cpp +++ b/engines/neverhood/modules/module2000_sprites.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2000_sprites.h b/engines/neverhood/modules/module2000_sprites.h index ca84aa73ca..62b738d9fb 100644 --- a/engines/neverhood/modules/module2000_sprites.h +++ b/engines/neverhood/modules/module2000_sprites.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2100.cpp b/engines/neverhood/modules/module2100.cpp index e95eb58420..9488057fa4 100644 --- a/engines/neverhood/modules/module2100.cpp +++ b/engines/neverhood/modules/module2100.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2100.h b/engines/neverhood/modules/module2100.h index c5256434d9..e660eba7c0 100644 --- a/engines/neverhood/modules/module2100.h +++ b/engines/neverhood/modules/module2100.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2100_sprites.cpp b/engines/neverhood/modules/module2100_sprites.cpp index f43c0afed5..4d2e4956e6 100644 --- a/engines/neverhood/modules/module2100_sprites.cpp +++ b/engines/neverhood/modules/module2100_sprites.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2100_sprites.h b/engines/neverhood/modules/module2100_sprites.h index 85a6b9f27d..c1116ef9a5 100644 --- a/engines/neverhood/modules/module2100_sprites.h +++ b/engines/neverhood/modules/module2100_sprites.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2200.cpp b/engines/neverhood/modules/module2200.cpp index f1d5d2854d..f9033a9dbe 100644 --- a/engines/neverhood/modules/module2200.cpp +++ b/engines/neverhood/modules/module2200.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2200.h b/engines/neverhood/modules/module2200.h index 6b414304ae..5250bf3fe9 100644 --- a/engines/neverhood/modules/module2200.h +++ b/engines/neverhood/modules/module2200.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2200_sprites.cpp b/engines/neverhood/modules/module2200_sprites.cpp index ddf31f7920..7c1e84c3cf 100644 --- a/engines/neverhood/modules/module2200_sprites.cpp +++ b/engines/neverhood/modules/module2200_sprites.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2200_sprites.h b/engines/neverhood/modules/module2200_sprites.h index 9aaf3b6aae..9327b1cb9f 100644 --- a/engines/neverhood/modules/module2200_sprites.h +++ b/engines/neverhood/modules/module2200_sprites.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2300.cpp b/engines/neverhood/modules/module2300.cpp index 689d53570f..c0edc95873 100644 --- a/engines/neverhood/modules/module2300.cpp +++ b/engines/neverhood/modules/module2300.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2300.h b/engines/neverhood/modules/module2300.h index 0a1e1d57a4..57235986d9 100644 --- a/engines/neverhood/modules/module2300.h +++ b/engines/neverhood/modules/module2300.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2400.cpp b/engines/neverhood/modules/module2400.cpp index 867fb692f2..3acb952db9 100644 --- a/engines/neverhood/modules/module2400.cpp +++ b/engines/neverhood/modules/module2400.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2400.h b/engines/neverhood/modules/module2400.h index 61603f3e00..0ab56dd86a 100644 --- a/engines/neverhood/modules/module2400.h +++ b/engines/neverhood/modules/module2400.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2400_sprites.cpp b/engines/neverhood/modules/module2400_sprites.cpp index 32c00cde27..f31fd59907 100644 --- a/engines/neverhood/modules/module2400_sprites.cpp +++ b/engines/neverhood/modules/module2400_sprites.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2400_sprites.h b/engines/neverhood/modules/module2400_sprites.h index a901eb101c..5d9464af13 100644 --- a/engines/neverhood/modules/module2400_sprites.h +++ b/engines/neverhood/modules/module2400_sprites.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2500.cpp b/engines/neverhood/modules/module2500.cpp index eb1b65cd83..7e93b0ebc0 100644 --- a/engines/neverhood/modules/module2500.cpp +++ b/engines/neverhood/modules/module2500.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2500.h b/engines/neverhood/modules/module2500.h index de6226ef0c..57ab22889a 100644 --- a/engines/neverhood/modules/module2500.h +++ b/engines/neverhood/modules/module2500.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2500_sprites.cpp b/engines/neverhood/modules/module2500_sprites.cpp index 1394a87db6..b628cd8f02 100644 --- a/engines/neverhood/modules/module2500_sprites.cpp +++ b/engines/neverhood/modules/module2500_sprites.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2500_sprites.h b/engines/neverhood/modules/module2500_sprites.h index e7f7b05702..b5c2a1ac01 100644 --- a/engines/neverhood/modules/module2500_sprites.h +++ b/engines/neverhood/modules/module2500_sprites.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2600.cpp b/engines/neverhood/modules/module2600.cpp index 3c3e733b3f..d0f6090ea8 100644 --- a/engines/neverhood/modules/module2600.cpp +++ b/engines/neverhood/modules/module2600.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2600.h b/engines/neverhood/modules/module2600.h index 99ec3a34ca..0f13ed4b09 100644 --- a/engines/neverhood/modules/module2600.h +++ b/engines/neverhood/modules/module2600.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2600_sprites.cpp b/engines/neverhood/modules/module2600_sprites.cpp index 2506a6eb48..ffba6a4e59 100644 --- a/engines/neverhood/modules/module2600_sprites.cpp +++ b/engines/neverhood/modules/module2600_sprites.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2600_sprites.h b/engines/neverhood/modules/module2600_sprites.h index c36e72cae8..0b4954ceb1 100644 --- a/engines/neverhood/modules/module2600_sprites.h +++ b/engines/neverhood/modules/module2600_sprites.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2700.cpp b/engines/neverhood/modules/module2700.cpp index 13c30048a4..9399981cfd 100644 --- a/engines/neverhood/modules/module2700.cpp +++ b/engines/neverhood/modules/module2700.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2700.h b/engines/neverhood/modules/module2700.h index 97b4f1cbea..9ac2159765 100644 --- a/engines/neverhood/modules/module2700.h +++ b/engines/neverhood/modules/module2700.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2700_sprites.cpp b/engines/neverhood/modules/module2700_sprites.cpp index 8dd2fa3461..e17cddc834 100644 --- a/engines/neverhood/modules/module2700_sprites.cpp +++ b/engines/neverhood/modules/module2700_sprites.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2700_sprites.h b/engines/neverhood/modules/module2700_sprites.h index 394ba896a1..7da0223bce 100644 --- a/engines/neverhood/modules/module2700_sprites.h +++ b/engines/neverhood/modules/module2700_sprites.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2800.cpp b/engines/neverhood/modules/module2800.cpp index 5d892de224..a59c3f8156 100644 --- a/engines/neverhood/modules/module2800.cpp +++ b/engines/neverhood/modules/module2800.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2800.h b/engines/neverhood/modules/module2800.h index 26e44bc543..73a13610e3 100644 --- a/engines/neverhood/modules/module2800.h +++ b/engines/neverhood/modules/module2800.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2800_sprites.cpp b/engines/neverhood/modules/module2800_sprites.cpp index 35596da6b5..f9a58de92d 100644 --- a/engines/neverhood/modules/module2800_sprites.cpp +++ b/engines/neverhood/modules/module2800_sprites.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2800_sprites.h b/engines/neverhood/modules/module2800_sprites.h index 91f26d7849..ec34a7ccf5 100644 --- a/engines/neverhood/modules/module2800_sprites.h +++ b/engines/neverhood/modules/module2800_sprites.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2900.cpp b/engines/neverhood/modules/module2900.cpp index ca734972ca..3bf98eca35 100644 --- a/engines/neverhood/modules/module2900.cpp +++ b/engines/neverhood/modules/module2900.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2900.h b/engines/neverhood/modules/module2900.h index 5f6ed29a12..8d6dad5660 100644 --- a/engines/neverhood/modules/module2900.h +++ b/engines/neverhood/modules/module2900.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2900_sprites.cpp b/engines/neverhood/modules/module2900_sprites.cpp index 59780b33a0..1ec820abdf 100644 --- a/engines/neverhood/modules/module2900_sprites.cpp +++ b/engines/neverhood/modules/module2900_sprites.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module2900_sprites.h b/engines/neverhood/modules/module2900_sprites.h index 9f7df502e1..3ad7f2eefd 100644 --- a/engines/neverhood/modules/module2900_sprites.h +++ b/engines/neverhood/modules/module2900_sprites.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module3000.cpp b/engines/neverhood/modules/module3000.cpp index dc6fb984ef..59b2df260e 100644 --- a/engines/neverhood/modules/module3000.cpp +++ b/engines/neverhood/modules/module3000.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module3000.h b/engines/neverhood/modules/module3000.h index a88dea513e..e5c251f828 100644 --- a/engines/neverhood/modules/module3000.h +++ b/engines/neverhood/modules/module3000.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module3000_sprites.cpp b/engines/neverhood/modules/module3000_sprites.cpp index 3c0c5fe209..3f883eaa72 100644 --- a/engines/neverhood/modules/module3000_sprites.cpp +++ b/engines/neverhood/modules/module3000_sprites.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/modules/module3000_sprites.h b/engines/neverhood/modules/module3000_sprites.h index 7316613327..2c1369251d 100644 --- a/engines/neverhood/modules/module3000_sprites.h +++ b/engines/neverhood/modules/module3000_sprites.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/mouse.cpp b/engines/neverhood/mouse.cpp index f11a3f99ea..0abbeba19d 100644 --- a/engines/neverhood/mouse.cpp +++ b/engines/neverhood/mouse.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/mouse.h b/engines/neverhood/mouse.h index d6f42b4071..3e71f60de2 100644 --- a/engines/neverhood/mouse.h +++ b/engines/neverhood/mouse.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/navigationscene.cpp b/engines/neverhood/navigationscene.cpp index adbb6aef7a..a1eeae9c1c 100644 --- a/engines/neverhood/navigationscene.cpp +++ b/engines/neverhood/navigationscene.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/navigationscene.h b/engines/neverhood/navigationscene.h index c17446811c..8e286effb9 100644 --- a/engines/neverhood/navigationscene.h +++ b/engines/neverhood/navigationscene.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/neverhood.cpp b/engines/neverhood/neverhood.cpp index 1119bfbb08..c0a235cae3 100644 --- a/engines/neverhood/neverhood.cpp +++ b/engines/neverhood/neverhood.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/neverhood.h b/engines/neverhood/neverhood.h index 4d923d1f0e..0661bcba0e 100644 --- a/engines/neverhood/neverhood.h +++ b/engines/neverhood/neverhood.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/palette.cpp b/engines/neverhood/palette.cpp index 134fec7163..39f1ecdbf1 100644 --- a/engines/neverhood/palette.cpp +++ b/engines/neverhood/palette.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/palette.h b/engines/neverhood/palette.h index 016f856104..f1b365fe47 100644 --- a/engines/neverhood/palette.h +++ b/engines/neverhood/palette.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/resource.cpp b/engines/neverhood/resource.cpp index b45dbff3b9..8aba0ad37b 100644 --- a/engines/neverhood/resource.cpp +++ b/engines/neverhood/resource.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/resource.h b/engines/neverhood/resource.h index 40236d9d22..a9d5b86d17 100644 --- a/engines/neverhood/resource.h +++ b/engines/neverhood/resource.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/resourceman.cpp b/engines/neverhood/resourceman.cpp index f6937384c0..2065a13347 100644 --- a/engines/neverhood/resourceman.cpp +++ b/engines/neverhood/resourceman.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/resourceman.h b/engines/neverhood/resourceman.h index 29bf40a6b8..306e02f788 100644 --- a/engines/neverhood/resourceman.h +++ b/engines/neverhood/resourceman.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/saveload.cpp b/engines/neverhood/saveload.cpp index 01988769e6..8fe6c9a155 100644 --- a/engines/neverhood/saveload.cpp +++ b/engines/neverhood/saveload.cpp @@ -8,17 +8,16 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * */ #include "common/savefile.h" diff --git a/engines/neverhood/scene.cpp b/engines/neverhood/scene.cpp index b8cde73e81..58056b65a9 100644 --- a/engines/neverhood/scene.cpp +++ b/engines/neverhood/scene.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/scene.h b/engines/neverhood/scene.h index e6183199ce..98a7fa5090 100644 --- a/engines/neverhood/scene.h +++ b/engines/neverhood/scene.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/screen.cpp b/engines/neverhood/screen.cpp index 901ab73b39..cc735c4c16 100644 --- a/engines/neverhood/screen.cpp +++ b/engines/neverhood/screen.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/screen.h b/engines/neverhood/screen.h index a9b5af02f6..82ce90b245 100644 --- a/engines/neverhood/screen.h +++ b/engines/neverhood/screen.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/smackerplayer.cpp b/engines/neverhood/smackerplayer.cpp index 014e094b94..e15e729f81 100644 --- a/engines/neverhood/smackerplayer.cpp +++ b/engines/neverhood/smackerplayer.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/smackerplayer.h b/engines/neverhood/smackerplayer.h index dd7199dd6d..e08854bd96 100644 --- a/engines/neverhood/smackerplayer.h +++ b/engines/neverhood/smackerplayer.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/smackerscene.cpp b/engines/neverhood/smackerscene.cpp index c3915200b5..2b43579130 100644 --- a/engines/neverhood/smackerscene.cpp +++ b/engines/neverhood/smackerscene.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/smackerscene.h b/engines/neverhood/smackerscene.h index 8e5084512f..e2c1802b61 100644 --- a/engines/neverhood/smackerscene.h +++ b/engines/neverhood/smackerscene.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/sound.cpp b/engines/neverhood/sound.cpp index 023eda4c02..d53243d4ba 100644 --- a/engines/neverhood/sound.cpp +++ b/engines/neverhood/sound.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/sound.h b/engines/neverhood/sound.h index 1f80f8d6b0..512b0fef98 100644 --- a/engines/neverhood/sound.h +++ b/engines/neverhood/sound.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/sprite.cpp b/engines/neverhood/sprite.cpp index 05fc9b256f..a566b8ee3b 100644 --- a/engines/neverhood/sprite.cpp +++ b/engines/neverhood/sprite.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/sprite.h b/engines/neverhood/sprite.h index 1d17bf0e70..5422fd15d5 100644 --- a/engines/neverhood/sprite.h +++ b/engines/neverhood/sprite.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/staticdata.cpp b/engines/neverhood/staticdata.cpp index ec9c852118..552ea92604 100644 --- a/engines/neverhood/staticdata.cpp +++ b/engines/neverhood/staticdata.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/neverhood/staticdata.h b/engines/neverhood/staticdata.h index b1cab3bfcd..88dad56f78 100644 --- a/engines/neverhood/staticdata.h +++ b/engines/neverhood/staticdata.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -- cgit v1.2.3 From 35362716334b83e3af61280a1ffa79198c3285e6 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 20 Feb 2014 12:27:32 +0200 Subject: NEVERHOOD: Fix an off-by-one error in Klogg's letters This fixes the buggy Willie letter appearing among the ones from Klogg (bug #6513) --- engines/neverhood/modules/module1000.cpp | 6 +++--- engines/neverhood/modules/module1000.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/modules/module1000.cpp b/engines/neverhood/modules/module1000.cpp index cdeb457df5..a3b5bc67b5 100644 --- a/engines/neverhood/modules/module1000.cpp +++ b/engines/neverhood/modules/module1000.cpp @@ -609,7 +609,7 @@ uint32 Scene1005::getTextIndex() { uint32 textIndex; textIndex = getTextIndex1(); if (getGlobalVar(V_ENTRANCE_OPEN)) { - textIndex = getTextIndex2(); + textIndex = getKloggsTextIndex(); } if (getGlobalVar(V_TEXT_FLAG1) && getGlobalVar(V_TEXT_INDEX) == textIndex) { textIndex = getTextIndex3(); @@ -690,9 +690,9 @@ uint32 Scene1005::getTextIndex1() { return textIndex; } -uint32 Scene1005::getTextIndex2() { +uint32 Scene1005::getKloggsTextIndex() { uint32 textIndex = getGlobalVar(V_TEXT_COUNTING_INDEX1); - if (textIndex + 1 >= 10) { + if (textIndex + 1 > 10) { setGlobalVar(V_TEXT_COUNTING_INDEX1, 0); textIndex = 0; } else { diff --git a/engines/neverhood/modules/module1000.h b/engines/neverhood/modules/module1000.h index d2afaf69ee..58aa92e45f 100644 --- a/engines/neverhood/modules/module1000.h +++ b/engines/neverhood/modules/module1000.h @@ -101,7 +101,7 @@ protected: void drawTextToBackground(); uint32 getTextIndex(); uint32 getTextIndex1(); - uint32 getTextIndex2(); + uint32 getKloggsTextIndex(); uint32 getTextIndex3(); }; -- cgit v1.2.3 From 1a18d1a50e379070e70585336b61ed7a26aa652c Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 19 Mar 2014 19:45:51 +0100 Subject: NEVERHOOD: Fix some uninitialized variables --- engines/neverhood/modules/module1000.cpp | 2 +- engines/neverhood/modules/module1300.cpp | 4 ++-- engines/neverhood/modules/module2700.cpp | 2 +- engines/neverhood/modules/module2900.cpp | 3 ++- 4 files changed, 6 insertions(+), 5 deletions(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/modules/module1000.cpp b/engines/neverhood/modules/module1000.cpp index a3b5bc67b5..b19ba05b32 100644 --- a/engines/neverhood/modules/module1000.cpp +++ b/engines/neverhood/modules/module1000.cpp @@ -228,7 +228,7 @@ uint32 Scene1001::handleMessage(int messageNum, const MessageParam ¶m, Entit } Scene1002::Scene1002(NeverhoodEngine *vm, Module *parentModule, int which) - : Scene(vm, parentModule), _isKlaymenFloor(false), _isClimbingLadder(false) { + : Scene(vm, parentModule), _isKlaymenFloor(false), _isClimbingLadder(false), _asKlaymenPeekHand(nullptr) { NRect tempClipRect; Sprite *tempSprite; diff --git a/engines/neverhood/modules/module1300.cpp b/engines/neverhood/modules/module1300.cpp index d806019e6c..60ff0411a6 100644 --- a/engines/neverhood/modules/module1300.cpp +++ b/engines/neverhood/modules/module1300.cpp @@ -603,7 +603,7 @@ uint32 Scene1305::handleMessage(int messageNum, const MessageParam ¶m, Entit } Scene1306::Scene1306(NeverhoodEngine *vm, Module *parentModule, int which) - : Scene(vm, parentModule) { + : Scene(vm, parentModule), _asKey(nullptr) { if (getGlobalVar(V_HAS_FINAL_KEY) && getGlobalVar(V_KEY3_LOCATION) == 0) setGlobalVar(V_KEY3_LOCATION, 4); @@ -683,7 +683,6 @@ Scene1306::Scene1306(NeverhoodEngine *vm, Module *parentModule, int which) clearRectList(); sendMessage(_asElevator, NM_KLAYMEN_OPEN_DOOR, 0); } - } Scene1306::~Scene1306() { @@ -942,6 +941,7 @@ Scene1308::Scene1308(NeverhoodEngine *vm, Module *parentModule, int which) _sprite2 = insertStaticSprite(0x40043120, 995); _sprite3 = insertStaticSprite(0x43003100, 995); _sprite4 = NULL; + _sprite5 = nullptr; if (which < 0) { // Restoring game diff --git a/engines/neverhood/modules/module2700.cpp b/engines/neverhood/modules/module2700.cpp index 9399981cfd..2a112435fc 100644 --- a/engines/neverhood/modules/module2700.cpp +++ b/engines/neverhood/modules/module2700.cpp @@ -84,7 +84,7 @@ static const uint32 kScene2725StaticSprites[] = { }; Module2700::Module2700(NeverhoodEngine *vm, Module *parentModule, int which) - : Module(vm, parentModule), _soundIndex(0), _radioMusicInitialized(false) { + : Module(vm, parentModule), _soundIndex(0), _radioMusicInitialized(false), _musicFileHash(0) { _vm->_soundMan->addMusic(0x42212411, 0x04020210); _vm->_soundMan->startMusic(0x04020210, 24, 2); diff --git a/engines/neverhood/modules/module2900.cpp b/engines/neverhood/modules/module2900.cpp index 3bf98eca35..69186514a2 100644 --- a/engines/neverhood/modules/module2900.cpp +++ b/engines/neverhood/modules/module2900.cpp @@ -34,11 +34,12 @@ namespace Neverhood { Module2900::Module2900(NeverhoodEngine *vm, Module *parentModule, int which) : Module(vm, parentModule) { + _teleporterModuleResult = -1; + if (which >= 0) setGlobalVar(V_TELEPORTER_WHICH, which); createScene(0, 0); - } void Module2900::createScene(int sceneNum, int which) { -- cgit v1.2.3 From c0d83b0b298f1116cb69948107ba867fc73f16df Mon Sep 17 00:00:00 2001 From: johndoe123 Date: Thu, 17 Apr 2014 23:02:25 +0200 Subject: NEVERHOOD: Fix bug #6520: 'NEVERHOOD: buggy sound of the waterfall' --- engines/neverhood/modules/module2300.cpp | 28 +++++++++--------- engines/neverhood/modules/module2300.h | 2 +- engines/neverhood/modules/module3000.cpp | 49 ++++++++++++++++---------------- engines/neverhood/modules/module3000.h | 4 +-- 4 files changed, 41 insertions(+), 42 deletions(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/modules/module2300.cpp b/engines/neverhood/modules/module2300.cpp index c0edc95873..68ae07f2bb 100644 --- a/engines/neverhood/modules/module2300.cpp +++ b/engines/neverhood/modules/module2300.cpp @@ -31,14 +31,14 @@ static const uint32 kModule2300SoundList[] = { }; Module2300::Module2300(NeverhoodEngine *vm, Module *parentModule, int which) - : Module(vm, parentModule), _soundVolume(0) { + : Module(vm, parentModule), _waterfallSoundVolume(0) { _vm->_soundMan->addSoundList(0x1A214010, kModule2300SoundList); _vm->_soundMan->setSoundListParams(kModule2300SoundList, true, 50, 600, 10, 150); - _isWallBroken = getGlobalVar(V_WALL_BROKEN) != 0; + _isWaterfallRunning = getGlobalVar(V_WALL_BROKEN) != 1; - if (_isWallBroken) { + if (_isWaterfallRunning) { _vm->_soundMan->setSoundVolume(0x90F0D1C3, 0); _vm->_soundMan->playSoundLooping(0x90F0D1C3); } else { @@ -78,8 +78,8 @@ void Module2300::createScene(int sceneNum, int which) { case 1: _vm->gameState().sceneNum = 1; createNavigationScene(0x004B67E8, which); - if (_isWallBroken) { - _soundVolume = 15; + if (_isWaterfallRunning) { + _waterfallSoundVolume = 15; _vm->_soundMan->setSoundVolume(0x90F0D1C3, 15); } break; @@ -92,10 +92,10 @@ void Module2300::createScene(int sceneNum, int which) { if (getGlobalVar(V_WALL_BROKEN)) createNavigationScene(0x004B68F0, which); else { - _vm->_soundMan->setSoundVolume(0x90F0D1C3, _soundVolume); + _vm->_soundMan->setSoundVolume(0x90F0D1C3, _waterfallSoundVolume); createNavigationScene(0x004B68A8, which); - if (_isWallBroken) { - _soundVolume = 87; + if (_isWaterfallRunning) { + _waterfallSoundVolume = 87; _vm->_soundMan->setSoundVolume(0x90F0D1C3, 87); } } @@ -161,10 +161,10 @@ void Module2300::updateScene() { } else { switch (_sceneNum) { case 1: - if (_isWallBroken && navigationScene()->isWalkingForward() && navigationScene()->getNavigationIndex() == 4 && + if (_isWaterfallRunning && navigationScene()->isWalkingForward() && navigationScene()->getNavigationIndex() == 4 && navigationScene()->getFrameNumber() % 2) { - _soundVolume++; - _vm->_soundMan->setSoundVolume(0x90F0D1C3, _soundVolume); + _waterfallSoundVolume++; + _vm->_soundMan->setSoundVolume(0x90F0D1C3, _waterfallSoundVolume); } if (navigationScene()->isWalkingForward() && navigationScene()->getNavigationIndex() == 0 && navigationScene()->getFrameNumber() == 50) { @@ -174,9 +174,9 @@ void Module2300::updateScene() { } break; case 3: - if (_isWallBroken && navigationScene()->isWalkingForward() && navigationScene()->getFrameNumber() % 2) { - _soundVolume--; - _vm->_soundMan->setSoundVolume(0x90F0D1C3, _soundVolume); + if (_isWaterfallRunning && navigationScene()->isWalkingForward() && navigationScene()->getFrameNumber() % 2) { + _waterfallSoundVolume--; + _vm->_soundMan->setSoundVolume(0x90F0D1C3, _waterfallSoundVolume); } break; } diff --git a/engines/neverhood/modules/module2300.h b/engines/neverhood/modules/module2300.h index 57235986d9..b5758b0c86 100644 --- a/engines/neverhood/modules/module2300.h +++ b/engines/neverhood/modules/module2300.h @@ -37,8 +37,8 @@ public: virtual ~Module2300(); protected: int _sceneNum; - bool _isWallBroken; int _soundVolume; + bool _isWaterfallRunning; void createScene(int sceneNum, int which); void updateScene(); }; diff --git a/engines/neverhood/modules/module3000.cpp b/engines/neverhood/modules/module3000.cpp index 59b2df260e..d4809611ad 100644 --- a/engines/neverhood/modules/module3000.cpp +++ b/engines/neverhood/modules/module3000.cpp @@ -39,7 +39,7 @@ static const uint32 kModule3000SoundList[] = { }; Module3000::Module3000(NeverhoodEngine *vm, Module *parentModule, int which) - : Module(vm, parentModule), _soundVolume(0) { + : Module(vm, parentModule), _waterfallSoundVolume(0) { _vm->_soundMan->addSoundList(0x81293110, kModule3000SoundList); _vm->_soundMan->setSoundListParams(kModule3000SoundList, true, 50, 600, 5, 150); @@ -48,9 +48,9 @@ Module3000::Module3000(NeverhoodEngine *vm, Module *parentModule, int which) _vm->_soundMan->playTwoSounds(0x81293110, 0x40030A51, 0xC862CA15, 0); _vm->_soundMan->playTwoSounds(0x81293110, 0x41861371, 0x43A2507F, 0); - _isWallBroken = getGlobalVar(V_WALL_BROKEN) != 0; + _isWaterfallRunning = getGlobalVar(V_WALL_BROKEN) != 1; - if (!_isWallBroken) { + if (_isWaterfallRunning) { _vm->_soundMan->setSoundVolume(0x90F0D1C3, 0); _vm->_soundMan->playSoundLooping(0x90F0D1C3); } @@ -78,12 +78,11 @@ void Module3000::createScene(int sceneNum, int which) { static const byte kNavigationTypes06[] = {5}; debug(1, "Module3000::createScene(%d, %d)", sceneNum, which); _vm->gameState().sceneNum = sceneNum; - _isWallBroken = getGlobalVar(V_WALL_BROKEN) != 0; switch (_vm->gameState().sceneNum) { case 1: if (!getGlobalVar(V_BOLT_DOOR_OPEN)) { createNavigationScene(0x004B7C80, which); - } else if (_isWallBroken) { + } else if (getGlobalVar(V_WALL_BROKEN)) { createNavigationScene(0x004B7CE0, which); } else { createNavigationScene(0x004B7CB0, which); @@ -91,11 +90,11 @@ void Module3000::createScene(int sceneNum, int which) { break; case 2: _vm->_soundMan->playTwoSounds(0x81293110, 0x40030A51, 0xC862CA15, 0); - if (!_isWallBroken) { - _soundVolume = 90; + if (_isWaterfallRunning) { + _waterfallSoundVolume = 90; _vm->_soundMan->setSoundVolume(0x90F0D1C3, 90); } - if (_isWallBroken) { + if (getGlobalVar(V_WALL_BROKEN)) { createNavigationScene(0x004B7D58, which); } else { createNavigationScene(0x004B7D10, which); @@ -104,7 +103,7 @@ void Module3000::createScene(int sceneNum, int which) { case 3: if (getGlobalVar(V_STAIRS_DOWN)) createNavigationScene(0x004B7E60, which); - else if (_isWallBroken) + else if (getGlobalVar(V_WALL_BROKEN)) createNavigationScene(0x004B7DA0, which); else createNavigationScene(0x004B7E00, which); @@ -152,12 +151,12 @@ void Module3000::createScene(int sceneNum, int which) { // NOTE: Newly introduced sceneNums case 1001: if (!getGlobalVar(V_BOLT_DOOR_OPEN)) - if (_isWallBroken) + if (getGlobalVar(V_WALL_BROKEN)) createSmackerScene(0x00940021, true, true, false); else createSmackerScene(0x01140021, true, true, false); else - if (_isWallBroken) + if (getGlobalVar(V_WALL_BROKEN)) createSmackerScene(0x001011B1, true, true, false); else createSmackerScene(0x001021B1, true, true, false); @@ -195,8 +194,8 @@ void Module3000::updateScene() { break; case 2: _vm->_soundMan->playTwoSounds(0x81293110, 0x41861371, 0x43A2507F, 0); - if (_isWallBroken) { - _soundVolume = 0; + if (_isWaterfallRunning) { + _waterfallSoundVolume = 0; _vm->_soundMan->setSoundVolume(0x90F0D1C3, 0); } if (_moduleResult == 0) { @@ -240,7 +239,7 @@ void Module3000::updateScene() { createScene(8, -1); break; case 8: - _isWallBroken = getGlobalVar(V_WALL_BROKEN) != 0; + _isWaterfallRunning = getGlobalVar(V_WALL_BROKEN) != 1; if (_moduleResult != 1) { _vm->_soundMan->setSoundListParams(kModule3000SoundList, true, 0, 0, 0, 0); createScene(4, 1); @@ -301,12 +300,12 @@ void Module3000::updateScene() { } else if (frameNumber == 10) { _vm->_soundMan->playTwoSounds(0x81293110, 0x40030A51, 0xC862CA15, 0); } - if (!_isWallBroken && _soundVolume < 90 && frameNumber % 2) { + if (_isWaterfallRunning && _waterfallSoundVolume < 90 && frameNumber % 2) { if (frameNumber == 0) - _soundVolume = 40; + _waterfallSoundVolume = 40; else - _soundVolume++; - _vm->_soundMan->setSoundVolume(0x90F0D1C3, _soundVolume); + _waterfallSoundVolume++; + _vm->_soundMan->setSoundVolume(0x90F0D1C3, _waterfallSoundVolume); } } } @@ -315,9 +314,9 @@ void Module3000::updateScene() { if (navigationScene()->isWalkingForward()) { uint32 frameNumber = navigationScene()->getFrameNumber(); int navigationIndex = navigationScene()->getNavigationIndex(); - if (!_isWallBroken && _soundVolume > 1 && frameNumber % 2) { - _soundVolume--; - _vm->_soundMan->setSoundVolume(0x90F0D1C3, _soundVolume); + if (_isWaterfallRunning && _waterfallSoundVolume > 1 && frameNumber % 2) { + _waterfallSoundVolume--; + _vm->_soundMan->setSoundVolume(0x90F0D1C3, _waterfallSoundVolume); } if (navigationIndex == 0) { if (frameNumber == 35) { @@ -340,12 +339,12 @@ void Module3000::updateScene() { if (frameNumber == 40) { _vm->_soundMan->playTwoSounds(0x81293110, 0x40030A51, 0xC862CA15, 0); } - if (!_isWallBroken && _soundVolume < 90 && frameNumber % 2) { + if (_isWaterfallRunning && _waterfallSoundVolume < 90 && frameNumber % 2) { if (frameNumber == 0) - _soundVolume = 40; + _waterfallSoundVolume = 40; else - _soundVolume++; - _vm->_soundMan->setSoundVolume(0x90F0D1C3, _soundVolume); + _waterfallSoundVolume++; + _vm->_soundMan->setSoundVolume(0x90F0D1C3, _waterfallSoundVolume); } } } diff --git a/engines/neverhood/modules/module3000.h b/engines/neverhood/modules/module3000.h index e5c251f828..3d895b8d8a 100644 --- a/engines/neverhood/modules/module3000.h +++ b/engines/neverhood/modules/module3000.h @@ -34,8 +34,8 @@ public: Module3000(NeverhoodEngine *vm, Module *parentModule, int which); virtual ~Module3000(); protected: - int _soundVolume; - bool _isWallBroken; + int _waterfallSoundVolume; + bool _isWaterfallRunning; void createScene(int sceneNum, int which); void updateScene(); }; -- cgit v1.2.3 From 191b258593f83239c76c8f864116845675aa2f94 Mon Sep 17 00:00:00 2001 From: johndoe123 Date: Thu, 17 Apr 2014 23:17:39 +0200 Subject: NEVERHOOD: Fix compilation --- engines/neverhood/modules/module2300.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/modules/module2300.h b/engines/neverhood/modules/module2300.h index b5758b0c86..58bffb710c 100644 --- a/engines/neverhood/modules/module2300.h +++ b/engines/neverhood/modules/module2300.h @@ -37,7 +37,7 @@ public: virtual ~Module2300(); protected: int _sceneNum; - int _soundVolume; + int _waterfallSoundVolume; bool _isWaterfallRunning; void createScene(int sceneNum, int which); void updateScene(); -- cgit v1.2.3 From 13507d18583f646dbc19c1868b90b4b876151695 Mon Sep 17 00:00:00 2001 From: johndoe123 Date: Thu, 17 Apr 2014 23:20:47 +0200 Subject: NEVERHOOD: Fix bug #6540: 'NEVERHOOD: lightswitch graphical glitch' --- engines/neverhood/modules/module2200.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/modules/module2200.cpp b/engines/neverhood/modules/module2200.cpp index f9033a9dbe..6618cb3ab0 100644 --- a/engines/neverhood/modules/module2200.cpp +++ b/engines/neverhood/modules/module2200.cpp @@ -885,7 +885,7 @@ void Scene2205::update() { } else if (_isLightOn && !getGlobalVar(V_LIGHTS_ON)) { _palette->addPalette(0xD00A028D, 0, 256, 0); changeBackground(0xD00A028D); - _ssLightSwitch->setFileHashes(0x2D339030, 0xDAC86E84); + _ssLightSwitch->setFileHashes(0xD6C86E84, 0xDAC86E84); sendMessage(_ssDoorFrame, 0x2000, 0); changeMouseCursor(0xA0289D08); _isKlaymenInLight = true; -- cgit v1.2.3 From cfa0c839c33698a18e50ee8a3d126cc8ed7f589d Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 4 May 2014 22:16:46 +0200 Subject: NEVERHOOD: Fixed one of the issues in #6513 The getKloggsTextIndex() function would return 40 twice in a row when wrapping around. This caused one of Willie's nonsense letters to appear instead, since they're supposed to trigger when getTextIndex1() returns the same result more than once. The same bug also appeared (and has been fixed) in getTextIndex3(), but there it just caused the same nonsense letter to appear twice. --- engines/neverhood/modules/module1000.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/modules/module1000.cpp b/engines/neverhood/modules/module1000.cpp index b19ba05b32..be57502d08 100644 --- a/engines/neverhood/modules/module1000.cpp +++ b/engines/neverhood/modules/module1000.cpp @@ -693,22 +693,18 @@ uint32 Scene1005::getTextIndex1() { uint32 Scene1005::getKloggsTextIndex() { uint32 textIndex = getGlobalVar(V_TEXT_COUNTING_INDEX1); if (textIndex + 1 > 10) { - setGlobalVar(V_TEXT_COUNTING_INDEX1, 0); textIndex = 0; - } else { - setGlobalVar(V_TEXT_COUNTING_INDEX1, textIndex + 1); } + setGlobalVar(V_TEXT_COUNTING_INDEX1, textIndex + 1); return textIndex + 40; } uint32 Scene1005::getTextIndex3() { uint32 textIndex = getGlobalVar(V_TEXT_COUNTING_INDEX2); if (textIndex + 1 >= 10) { - setGlobalVar(V_TEXT_COUNTING_INDEX2, 0); textIndex = 0; - } else { - setGlobalVar(V_TEXT_COUNTING_INDEX2, textIndex + 1); } + setGlobalVar(V_TEXT_COUNTING_INDEX2, textIndex + 1); return textIndex + 30; } -- cgit v1.2.3 From 9f4c221a2222d33323549b137767c0bbd68df29d Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 4 May 2014 22:23:14 +0200 Subject: NEVERHOOD: Fixed off-by-one error in getTextIndex3() This is the same fix that was applied to getKloggsTextIndex() some time ago. It restores a missing Willie nonsense letter. While I haven't actually verified for myself that this letter appears in the original game, it is referenced in Wikipedia's article about Absalom. --- engines/neverhood/modules/module1000.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/modules/module1000.cpp b/engines/neverhood/modules/module1000.cpp index be57502d08..5e4d67d2bc 100644 --- a/engines/neverhood/modules/module1000.cpp +++ b/engines/neverhood/modules/module1000.cpp @@ -701,7 +701,7 @@ uint32 Scene1005::getKloggsTextIndex() { uint32 Scene1005::getTextIndex3() { uint32 textIndex = getGlobalVar(V_TEXT_COUNTING_INDEX2); - if (textIndex + 1 >= 10) { + if (textIndex + 1 > 10) { textIndex = 0; } setGlobalVar(V_TEXT_COUNTING_INDEX2, textIndex + 1); -- cgit v1.2.3 From b565d0bf24128f18aac3a5daae48415535f97676 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Mon, 5 May 2014 07:20:49 +0200 Subject: NEVERHOOD: Fix memory leak in BaseSurface I hope this will help the memory leak reported as part of bug #6513 but my computer isn't quite up to the task of doing any extensive Valgrind testing. --- engines/neverhood/graphics.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'engines/neverhood') diff --git a/engines/neverhood/graphics.cpp b/engines/neverhood/graphics.cpp index 3d1724ed8a..939428ed19 100644 --- a/engines/neverhood/graphics.cpp +++ b/engines/neverhood/graphics.cpp @@ -47,6 +47,7 @@ BaseSurface::BaseSurface(NeverhoodEngine *vm, int priority, int16 width, int16 h } BaseSurface::~BaseSurface() { + _surface->free(); delete _surface; } -- cgit v1.2.3 From f0a0537095e0b309f768de0b44cd20d05376c1d9 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Mon, 5 May 2014 11:29:41 +0100 Subject: NEVERHOOD: Fix memory leak from static data loading. This is occurring due to duplicate entry ids, which should probably not be present. --- engines/neverhood/staticdata.cpp | 47 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'engines/neverhood') diff --git a/engines/neverhood/staticdata.cpp b/engines/neverhood/staticdata.cpp index 552ea92604..03af44b2a5 100644 --- a/engines/neverhood/staticdata.cpp +++ b/engines/neverhood/staticdata.cpp @@ -28,6 +28,18 @@ StaticData::StaticData() { } StaticData::~StaticData() { + for (Common::HashMap::iterator i = _hitRectLists.begin(); i != _hitRectLists.end(); ++i) + delete i->_value; + for (Common::HashMap::iterator i = _rectLists.begin(); i != _rectLists.end(); ++i) + delete i->_value; + for (Common::HashMap::iterator i = _messageLists.begin(); i != _messageLists.end(); ++i) + delete i->_value; + for (Common::HashMap::iterator i = _navigationLists.begin(); i != _navigationLists.end(); ++i) + delete i->_value; + for (Common::HashMap::iterator i = _hallOfRecordsInfoItems.begin(); i != _hallOfRecordsInfoItems.end(); ++i) + delete i->_value; + for (Common::HashMap::iterator i = _trackInfoItems.begin(); i != _trackInfoItems.end(); ++i) + delete i->_value; } void StaticData::load(const char *filename) { @@ -69,6 +81,11 @@ void StaticData::load(const char *filename) { messageList->push_back(messageItem); } + if(_messageLists.contains(id)) { + warning("Duplicate id %d in _messageLists - freeing older entry", id); + delete _messageLists[id]; + } + _messageLists[id] = messageList; } @@ -98,6 +115,12 @@ void StaticData::load(const char *filename) { } rectList->push_back(rectItem); } + + if(_rectLists.contains(id)) { + warning("Duplicate id %d in _rectLists - freeing older entry", id); + delete _rectLists[id]; + } + _rectLists[id] = rectList; } @@ -117,6 +140,12 @@ void StaticData::load(const char *filename) { hitRect.type = fd.readUint16LE(); hitRectList->push_back(hitRect); } + + if(_hitRectLists.contains(id)) { + warning("Duplicate id %d in _hitRectLists - freeing older entry", id); + delete _hitRectLists[id]; + } + _hitRectLists[id] = hitRectList; } @@ -138,6 +167,12 @@ void StaticData::load(const char *filename) { navigationItem.mouseCursorFileHash = fd.readUint32LE(); navigationList->push_back(navigationItem); } + + if(_navigationLists.contains(id)) { + warning("Duplicate id %d in _navigationLists - freeing older entry", id); + delete _navigationLists[id]; + } + _navigationLists[id] = navigationList; } @@ -153,6 +188,12 @@ void StaticData::load(const char *filename) { hallOfRecordsInfo->bgFilename3 = fd.readUint32LE(); hallOfRecordsInfo->xPosIndex = fd.readByte(); hallOfRecordsInfo->count = fd.readByte(); + + if(_hallOfRecordsInfoItems.contains(id)) { + warning("Duplicate id %d in _hallOfRecordsInfoItems - freeing older entry", id); + delete _hallOfRecordsInfoItems[id]; + } + _hallOfRecordsInfoItems[id] = hallOfRecordsInfo; } @@ -172,6 +213,12 @@ void StaticData::load(const char *filename) { trackInfo->mouseCursorFilename = fd.readUint32LE(); trackInfo->which1 = fd.readUint16LE(); trackInfo->which2 = fd.readUint16LE(); + + if(_trackInfoItems.contains(id)) { + warning("Duplicate id %d in _trackInfoItems - freeing older entry", id); + delete _trackInfoItems[id]; + } + _trackInfoItems[id] = trackInfo; } -- cgit v1.2.3 From daa8d57a866e2866369e432cf1d624179edc8875 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 27 May 2014 02:04:07 +0200 Subject: ALL: Rename Debugger::DebugPrintf to Debugger::debugPrintf. --- engines/neverhood/console.cpp | 72 +++++++++++++++++++++--------------------- engines/neverhood/gamevars.cpp | 2 +- engines/neverhood/scene.cpp | 2 +- 3 files changed, 38 insertions(+), 38 deletions(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/console.cpp b/engines/neverhood/console.cpp index a4d1366880..b35c29bd5c 100644 --- a/engines/neverhood/console.cpp +++ b/engines/neverhood/console.cpp @@ -55,33 +55,33 @@ bool Console::Cmd_Scene(int argc, const char **argv) { const char *sceneTypes[] = { "normal", "smacker", "navigation" }; - DebugPrintf("Current module: %d, previous module: %d, scene %d (%s scene)\n", currentModule, previousModule, scenenNum, sceneTypes[sceneType]); + debugPrintf("Current module: %d, previous module: %d, scene %d (%s scene)\n", currentModule, previousModule, scenenNum, sceneTypes[sceneType]); if (sceneType == kSceneTypeNormal) { Scene *scene = (Scene *)((GameModule *)_vm->_gameModule->_childObject)->_childObject; // Normal scenes have a background and a cursor file hash - DebugPrintf("Background hash: 0x%x, cursor hash: 0x%x\n", scene->getBackgroundFileHash(), scene->getCursorFileHash()); + debugPrintf("Background hash: 0x%x, cursor hash: 0x%x\n", scene->getBackgroundFileHash(), scene->getCursorFileHash()); } else if (sceneType == kSceneTypeSmacker) { SmackerScene *scene = (SmackerScene *)((GameModule *)_vm->_gameModule->_childObject)->_childObject; // Smacker scenes have a file hash, or a list of hashes // TODO: Only the first file hash is shown - any additional hashes, found in // scenes with a list of hashes (two scenes in module 1100 and the making of // video) aren't shown yet - DebugPrintf("File hash: 0x%x\n", scene->getSmackerFileHash()); + debugPrintf("File hash: 0x%x\n", scene->getSmackerFileHash()); } else if (sceneType == kSceneTypeNavigation) { NavigationScene *scene = (NavigationScene *)((GameModule *)_vm->_gameModule->_childObject)->_childObject; // Navigation scenes have a navigation list and its index NavigationList *navigationList = _vm->_staticData->getNavigationList(scene->getNavigationListId()); int navigationIndex = scene->getGlobalVar(V_NAVIGATION_INDEX); NavigationItem curNavigation = (*navigationList)[navigationIndex]; - DebugPrintf("Navigation list ID: 0x%x, index: %d\n", scene->getNavigationListId(), navigationIndex); - DebugPrintf("File hash: 0x%x, cursor hash: 0x%x, Smacker hashes: [left: 0x%x, middle: 0x%x, right: 0x%x\n", + debugPrintf("Navigation list ID: 0x%x, index: %d\n", scene->getNavigationListId(), navigationIndex); + debugPrintf("File hash: 0x%x, cursor hash: 0x%x, Smacker hashes: [left: 0x%x, middle: 0x%x, right: 0x%x\n", curNavigation.fileHash, curNavigation.mouseCursorFileHash, curNavigation.leftSmackerFileHash, curNavigation.middleSmackerFileHash, curNavigation.rightSmackerFileHash); } - DebugPrintf("Use %s to change scenes\n", argv[0]); - DebugPrintf("Modules are incremental by 100, from 1000 to 3000\n"); + debugPrintf("Use %s to change scenes\n", argv[0]); + debugPrintf("Modules are incremental by 100, from 1000 to 3000\n"); } else { int newModule = atoi(argv[1]); int newScene = atoi(argv[2]); @@ -102,17 +102,17 @@ bool Console::Cmd_Surfaces(int argc, const char **argv) { bool Console::Cmd_Cheat(int argc, const char **argv) { if (argc < 2) { - DebugPrintf("Cheats for various puzzles in the game\n"); - DebugPrintf("Use %s to use a cheat.\n", argv[0]); - DebugPrintf("Cheats:\n-------\n"); - DebugPrintf(" buttons - enables all 3 buttons on the door in the purple building, module 3000, scene 9\n"); - DebugPrintf(" cannon - sets the correct cannon combination in module 3000, scene 8\n"); - DebugPrintf(" dice - shows the correct dice combination in the teddy bear puzzle, module 1100, scene 6\n"); - DebugPrintf(" memory - solves the memory puzzle, module 1400, scene 4\n"); - DebugPrintf(" music - shows the correct index in the radio music puzzle, module 2800, scene 1\n"); - DebugPrintf(" radio - enables the radio, module 3000, scene 9 - same as pulling the rightmost cord in the flytrap room\n"); - DebugPrintf(" symbols - solves the symbols puzzle, module 1600, scene 8. Only available in that room\n"); - DebugPrintf(" tubes - shows the correct test tube combination in module 2800, scenes 7 and 10\n"); + debugPrintf("Cheats for various puzzles in the game\n"); + debugPrintf("Use %s to use a cheat.\n", argv[0]); + debugPrintf("Cheats:\n-------\n"); + debugPrintf(" buttons - enables all 3 buttons on the door in the purple building, module 3000, scene 9\n"); + debugPrintf(" cannon - sets the correct cannon combination in module 3000, scene 8\n"); + debugPrintf(" dice - shows the correct dice combination in the teddy bear puzzle, module 1100, scene 6\n"); + debugPrintf(" memory - solves the memory puzzle, module 1400, scene 4\n"); + debugPrintf(" music - shows the correct index in the radio music puzzle, module 2800, scene 1\n"); + debugPrintf(" radio - enables the radio, module 3000, scene 9 - same as pulling the rightmost cord in the flytrap room\n"); + debugPrintf(" symbols - solves the symbols puzzle, module 1600, scene 8. Only available in that room\n"); + debugPrintf(" tubes - shows the correct test tube combination in module 2800, scenes 7 and 10\n"); return true; } @@ -127,7 +127,7 @@ bool Console::Cmd_Cheat(int argc, const char **argv) { scene->setSubVar(VA_LOCKS_DISABLED, 0x40119852, 1); // kScene3010ButtonNameHashes[1] scene->setSubVar(VA_LOCKS_DISABLED, 0x01180951, 1); // kScene3010ButtonNameHashes[2] - DebugPrintf("All 3 door buttons have been enabled\n"); + debugPrintf("All 3 door buttons have been enabled\n"); } else if (cheatName == "cannon") { Scene *scene = (Scene *)((GameModule *)_vm->_gameModule->_childObject)->_childObject; @@ -137,10 +137,10 @@ bool Console::Cmd_Cheat(int argc, const char **argv) { for (int i = 3; i < 6; i++) scene->setSubVar(VA_CURR_CANNON_SYMBOLS, i, scene->getSubVar(VA_GOOD_CANNON_SYMBOLS_2, i - 3)); - DebugPrintf("Puzzle solved\n"); + debugPrintf("Puzzle solved\n"); } else if (cheatName == "dice") { Scene *scene = (Scene *)((GameModule *)_vm->_gameModule->_childObject)->_childObject; - DebugPrintf("Good: (%d %d %d), current: (%d %d %d)\n", + debugPrintf("Good: (%d %d %d), current: (%d %d %d)\n", scene->getSubVar(VA_GOOD_DICE_NUMBERS, 0), scene->getSubVar(VA_GOOD_DICE_NUMBERS, 1), scene->getSubVar(VA_GOOD_DICE_NUMBERS, 2), scene->getSubVar(VA_CURR_DICE_NUMBERS, 0), scene->getSubVar(VA_CURR_DICE_NUMBERS, 1), scene->getSubVar(VA_CURR_DICE_NUMBERS, 2) ); @@ -162,15 +162,15 @@ bool Console::Cmd_Cheat(int argc, const char **argv) { } } - DebugPrintf("Puzzle solved\n"); + debugPrintf("Puzzle solved\n"); } else if (cheatName == "music") { Scene *scene = (Scene *)((GameModule *)_vm->_gameModule->_childObject)->_childObject; - DebugPrintf("Good music index: %d, current radio music index: %d\n", scene->getGlobalVar(V_CURR_RADIO_MUSIC_INDEX), scene->getGlobalVar(V_GOOD_RADIO_MUSIC_INDEX)); + debugPrintf("Good music index: %d, current radio music index: %d\n", scene->getGlobalVar(V_CURR_RADIO_MUSIC_INDEX), scene->getGlobalVar(V_GOOD_RADIO_MUSIC_INDEX)); } else if (cheatName == "radio") { Scene *scene = (Scene *)((GameModule *)_vm->_gameModule->_childObject)->_childObject; scene->setGlobalVar(V_RADIO_ENABLED, 1); - DebugPrintf("The radio has been enabled\n"); + debugPrintf("The radio has been enabled\n"); } else if (cheatName == "symbols") { if (moduleNum == 1600 && sceneNum == 8) { Scene1609 *scene = ((Scene1609 *)((Module1600 *)_vm->_gameModule->_childObject)->_childObject); @@ -183,14 +183,14 @@ bool Console::Cmd_Cheat(int argc, const char **argv) { scene->_symbolPosition = 11; scene->_countdown1 = 36; - DebugPrintf("Puzzle solved\n"); + debugPrintf("Puzzle solved\n"); } else { - DebugPrintf("Only available in module 1600, scene 8\n"); + debugPrintf("Only available in module 1600, scene 8\n"); } } else if (cheatName == "tubes") { Scene *scene = (Scene *)((GameModule *)_vm->_gameModule->_childObject)->_childObject; - DebugPrintf("Tube set 1: %d %d %d\n", scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 0), scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 1), scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 2)); - DebugPrintf("Tube set 2: %d %d %d\n", scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_2, 0), scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_2, 1), scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_2, 2)); + debugPrintf("Tube set 1: %d %d %d\n", scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 0), scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 1), scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 2)); + debugPrintf("Tube set 2: %d %d %d\n", scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_2, 0), scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_2, 1), scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_2, 2)); } return true; @@ -204,7 +204,7 @@ bool Console::Cmd_Dumpvars(int argc, const char **argv) { bool Console::Cmd_PlaySound(int argc, const char **argv) { if (argc < 2) { - DebugPrintf("Usage: %s \n", argv[0]); + debugPrintf("Usage: %s \n", argv[0]); } else { uint32 soundHash = strtol(argv[1], NULL, 0); AudioResourceManSoundItem *soundItem = new AudioResourceManSoundItem(_vm, soundHash); @@ -223,17 +223,17 @@ bool Console::Cmd_CheckResource(int argc, const char **argv) { const char *resourceNames[] = { "unknown", "unknown", "bitmap", "palette", "animation", "data", "text", "sound", "music", "unknown", "video" }; if (argc < 2) { - DebugPrintf("Gets information about a resource\n"); - DebugPrintf("Usage: %s \n", argv[0]); + debugPrintf("Gets information about a resource\n"); + debugPrintf("Usage: %s \n", argv[0]); } else { uint32 resourceHash = strtol(argv[1], NULL, 0); ResourceHandle handle; _vm->_res->queryResource(resourceHash, handle); if (!handle.isValid()) { - DebugPrintf("Invalid resource hash\n"); + debugPrintf("Invalid resource hash\n"); } else { - DebugPrintf("Resource type: %d (%s). Size: %d bytes\n", handle.type(), resourceNames[handle.type()], handle.size()); + debugPrintf("Resource type: %d (%s). Size: %d bytes\n", handle.type(), resourceNames[handle.type()], handle.size()); } } @@ -242,8 +242,8 @@ bool Console::Cmd_CheckResource(int argc, const char **argv) { bool Console::Cmd_DumpResource(int argc, const char **argv) { if (argc < 3) { - DebugPrintf("Dumps a resource to disk\n"); - DebugPrintf("Usage: %s \n", argv[0]); + debugPrintf("Dumps a resource to disk\n"); + debugPrintf("Usage: %s \n", argv[0]); } else { uint32 resourceHash = strtol(argv[1], NULL, 0); const char *outFileName = argv[2]; @@ -251,7 +251,7 @@ bool Console::Cmd_DumpResource(int argc, const char **argv) { _vm->_res->queryResource(resourceHash, handle); if (!handle.isValid()) { - DebugPrintf("Invalid resource hash\n"); + debugPrintf("Invalid resource hash\n"); } else { _vm->_res->loadResource(handle, _vm->applyResourceFixes()); Common::DumpFile outFile; diff --git a/engines/neverhood/gamevars.cpp b/engines/neverhood/gamevars.cpp index 72b688c194..dcbe5583de 100644 --- a/engines/neverhood/gamevars.cpp +++ b/engines/neverhood/gamevars.cpp @@ -127,7 +127,7 @@ int16 GameVars::getSubVarIndex(int16 varIndex, uint32 subNameHash) { void GameVars::dumpVars(Console *con) { for (Common::Array::iterator it = _vars.begin(); it != _vars.end(); ++it) { GameVar gameVar = *it; - con->DebugPrintf("hash: %08X, var: %08X, first index: %3d, next index: %3d\n", gameVar.nameHash, gameVar.value, gameVar.firstIndex, gameVar.nextIndex); + con->debugPrintf("hash: %08X, var: %08X, first index: %3d, next index: %3d\n", gameVar.nameHash, gameVar.value, gameVar.firstIndex, gameVar.nextIndex); } } diff --git a/engines/neverhood/scene.cpp b/engines/neverhood/scene.cpp index 58056b65a9..1a8e74da38 100644 --- a/engines/neverhood/scene.cpp +++ b/engines/neverhood/scene.cpp @@ -148,7 +148,7 @@ void Scene::printSurfaces(Console *con) { NDrawRect drawRect = _surfaces[index]->getDrawRect(); NRect clipRect = _surfaces[index]->getClipRect(); int priority = _surfaces[index]->getPriority(); - con->DebugPrintf("%d ('%s'): Priority %d, draw rect (%d, %d, %d, %d), clip rect (%d, %d, %d, %d)\n", + con->debugPrintf("%d ('%s'): Priority %d, draw rect (%d, %d, %d, %d), clip rect (%d, %d, %d, %d)\n", index, _surfaces[index]->getName().c_str(), priority, drawRect.x, drawRect.y, drawRect.x2(), drawRect.y2(), clipRect.x1, clipRect.y1, clipRect.x2, clipRect.y2); -- cgit v1.2.3 From ae4ffe01f0e4354938714c546034cd0f9806bfc3 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 27 May 2014 02:04:08 +0200 Subject: ALL: Rename Debugger::DCmd_Register to Debugger::registerCmd. --- engines/neverhood/console.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'engines/neverhood') diff --git a/engines/neverhood/console.cpp b/engines/neverhood/console.cpp index b35c29bd5c..91ab3e767a 100644 --- a/engines/neverhood/console.cpp +++ b/engines/neverhood/console.cpp @@ -34,13 +34,13 @@ namespace Neverhood { Console::Console(NeverhoodEngine *vm) : GUI::Debugger(), _vm(vm) { - DCmd_Register("cheat", WRAP_METHOD(Console, Cmd_Cheat)); - DCmd_Register("checkresource", WRAP_METHOD(Console, Cmd_CheckResource)); - DCmd_Register("dumpresource", WRAP_METHOD(Console, Cmd_DumpResource)); - DCmd_Register("dumpvars", WRAP_METHOD(Console, Cmd_Dumpvars)); - DCmd_Register("playsound", WRAP_METHOD(Console, Cmd_PlaySound)); - DCmd_Register("scene", WRAP_METHOD(Console, Cmd_Scene)); - DCmd_Register("surfaces", WRAP_METHOD(Console, Cmd_Surfaces)); + registerCmd("cheat", WRAP_METHOD(Console, Cmd_Cheat)); + registerCmd("checkresource", WRAP_METHOD(Console, Cmd_CheckResource)); + registerCmd("dumpresource", WRAP_METHOD(Console, Cmd_DumpResource)); + registerCmd("dumpvars", WRAP_METHOD(Console, Cmd_Dumpvars)); + registerCmd("playsound", WRAP_METHOD(Console, Cmd_PlaySound)); + registerCmd("scene", WRAP_METHOD(Console, Cmd_Scene)); + registerCmd("surfaces", WRAP_METHOD(Console, Cmd_Surfaces)); } Console::~Console() { -- cgit v1.2.3 From 639a2dfd2e704871d7262afb8c249c36d4027e41 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Thu, 5 Jun 2014 19:51:28 +0200 Subject: NEVERHOOD: Fix radio part of bug #6513 ("Some nasty bugs") This clears the radio music variable when leaving the room. I've discussed with johndoe123 and he says this is what the original does. (You could also get the same effect by clearing it when entering the room.) --- engines/neverhood/modules/module2700.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'engines/neverhood') diff --git a/engines/neverhood/modules/module2700.cpp b/engines/neverhood/modules/module2700.cpp index 2a112435fc..a510c02558 100644 --- a/engines/neverhood/modules/module2700.cpp +++ b/engines/neverhood/modules/module2700.cpp @@ -461,6 +461,7 @@ void Module2700::updateScene() { _vm->_soundMan->deleteMusic(_musicFileHash); _vm->_soundMan->startMusic(0x04020210, 0, 2); _vm->_soundMan->deleteSoundGroup(0x42212411); + _radioMusicInitialized = false; createScene(20, 3); break; case 22: -- cgit v1.2.3