aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2013-12-23 21:03:35 +0200
committerFilippos Karapetis2013-12-23 21:03:35 +0200
commit8d7b10f7c3463390a928b7aca889a4bfae5dc8ad (patch)
tree1f8091fe87c8c49bdd3df48d0d68525ae4e0234a /engines
parentfec15ed2ccec8917c63728b44f40417ed983a73b (diff)
downloadscummvm-rg350-8d7b10f7c3463390a928b7aca889a4bfae5dc8ad.tar.gz
scummvm-rg350-8d7b10f7c3463390a928b7aca889a4bfae5dc8ad.tar.bz2
scummvm-rg350-8d7b10f7c3463390a928b7aca889a4bfae5dc8ad.zip
NEVERHOOD: Add names to some message IDs
Diffstat (limited to 'engines')
-rw-r--r--engines/neverhood/diskplayerscene.cpp4
-rw-r--r--engines/neverhood/gamemodule.cpp4
-rw-r--r--engines/neverhood/klaymen.cpp94
-rw-r--r--engines/neverhood/menumodule.cpp8
-rw-r--r--engines/neverhood/messages.h9
-rw-r--r--engines/neverhood/modules/module1000.cpp30
-rw-r--r--engines/neverhood/modules/module1000_sprites.cpp106
-rw-r--r--engines/neverhood/modules/module1100.cpp4
-rw-r--r--engines/neverhood/modules/module1100_sprites.cpp8
-rw-r--r--engines/neverhood/modules/module1200.cpp4
-rw-r--r--engines/neverhood/modules/module1200_sprites.cpp34
-rw-r--r--engines/neverhood/modules/module1300.cpp58
-rw-r--r--engines/neverhood/modules/module1300_sprites.cpp54
-rw-r--r--engines/neverhood/modules/module1400.cpp20
-rw-r--r--engines/neverhood/modules/module1400_sprites.cpp36
-rw-r--r--engines/neverhood/modules/module1500.cpp2
-rw-r--r--engines/neverhood/modules/module1600.cpp8
-rw-r--r--engines/neverhood/modules/module1600_sprites.cpp8
-rw-r--r--engines/neverhood/modules/module1700.cpp2
-rw-r--r--engines/neverhood/modules/module1700_sprites.cpp4
-rw-r--r--engines/neverhood/modules/module1900.cpp2
-rw-r--r--engines/neverhood/modules/module1900_sprites.cpp4
-rw-r--r--engines/neverhood/modules/module2000.cpp2
-rw-r--r--engines/neverhood/modules/module2000_sprites.cpp2
-rw-r--r--engines/neverhood/modules/module2100.cpp12
-rw-r--r--engines/neverhood/modules/module2100_sprites.cpp16
-rw-r--r--engines/neverhood/modules/module2200.cpp28
-rw-r--r--engines/neverhood/modules/module2200_sprites.cpp72
-rw-r--r--engines/neverhood/modules/module2400.cpp20
-rw-r--r--engines/neverhood/modules/module2400_sprites.cpp44
-rw-r--r--engines/neverhood/modules/module2500.cpp2
-rw-r--r--engines/neverhood/modules/module2500_sprites.cpp2
-rw-r--r--engines/neverhood/modules/module2600.cpp2
-rw-r--r--engines/neverhood/modules/module2800.cpp26
-rw-r--r--engines/neverhood/modules/module2800_sprites.cpp54
-rw-r--r--engines/neverhood/modules/module2900.cpp2
-rw-r--r--engines/neverhood/modules/module3000.cpp6
-rw-r--r--engines/neverhood/modules/module3000_sprites.cpp2
-rw-r--r--engines/neverhood/navigationscene.cpp4
-rw-r--r--engines/neverhood/scene.cpp2
-rw-r--r--engines/neverhood/smackerplayer.cpp2
-rw-r--r--engines/neverhood/smackerscene.cpp6
-rw-r--r--engines/neverhood/sprite.cpp6
43 files changed, 412 insertions, 403 deletions
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 &param, 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 &param,
}
}
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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, Ent
uint32 Klaymen::hmClimbLadderUpDown(int messageNum, const MessageParam &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, Entity
uint32 Klaymen::hmGrow(int messageNum, const MessageParam &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param
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 &param, 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 &param, En
uint32 AsScene1002Ring::hmRingPulled1(int messageNum, const MessageParam &param, 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 &param,
uint32 AsScene1002Ring::hmRingPulled2(int messageNum, const MessageParam &param, 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 &param,
uint32 AsScene1002Ring::hmRingHangingLow(int messageNum, const MessageParam &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param) {
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 &param, 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 &param, 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 &param) {
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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param
uint32 KmScene1002::hmFirstMoveVenusFlyTrap(int messageNum, const MessageParam &param, 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 &param, 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 &param
}
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 &param) {
uint32 KmScene1004::hmReadNote(int messageNum, const MessageParam &param, 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 &param, 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 &param, 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 &param, 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 &param) {
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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &para
uint32 AsScene1201TntMan::hmComingDown(int messageNum, const MessageParam &param, 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 &param, 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 &param, 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 &param, 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 &param,
uint32 AsScene1201Creature::hmPincerSnap(int messageNum, const MessageParam &param, 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 &param, 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 &param, 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 &param,
uint32 AsScene1202TntItem::hmChangePosition(int messageNum, const MessageParam &param, 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 &param) {
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 &param) {
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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, Entit
uint32 Scene1306::handleMessage416EB0(int messageNum, const MessageParam &param, 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<KmScene1308>(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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, Entity
uint32 Scene1317::hmHoborgAsKing(int messageNum, const MessageParam &param, 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 &param, Enti
uint32 Scene1317::hmEndMovie(int messageNum, const MessageParam &param, 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 &param, 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 &param, 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 &param, 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 &param,
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 &param, 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 &param, 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 &param, 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 &param) {
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 &param) {
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 &param) {
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 &param) {
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 &param) {
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 &param) {
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 &param) {
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 &param) {
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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param,
uint32 AsScene1401Pipe::hmSuckInProjector(int messageNum, const MessageParam &param, 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 &param, 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 &para
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 &param, 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 &param) {
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 &param) {
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 &param) {
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 &param) {
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 &param) {
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 &param, 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 &param, 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 &param, Entity
uint32 Scene1608::hmUpperFloor(int messageNum, const MessageParam &param, 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 &param, 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 &param, Ent
uint32 AsCommonCar::hmAnimation(int messageNum, const MessageParam &param, 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 &param, 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 &param) {
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 &param, 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 &param) {
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 &param) {
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 &param, 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 &para
uint32 AsScene1907Symbol::hmTryToPlugIn(int messageNum, const MessageParam &param, 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 &param, 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 &param, 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 &param) {
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 &param, 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 &param, 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 &param, 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 &param, 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 &param) {
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 &param) {
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 &param) {
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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param,
_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 &param,
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 &param, 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 &param, 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 &param, 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 &param
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 &param, 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 &param) {
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 &param) {
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 &param) {
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 &param) {
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 &param, 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 &param) {
} 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 &param) {
} 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 &param) {
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 &param) {
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 &param) {
} 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param,
_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 &param, 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 &param, 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 &param) {
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 &param) {
uint32 KmScene2401::hmSpit(int messageNum, const MessageParam &param, 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 &param) {
} 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 &param) {
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 &param) {
} 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 &param) {
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 &param, 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 &param) {
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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param,
uint32 AsScene2803Rope::hmReleased(int messageNum, const MessageParam &param, 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 &param, 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 &param, 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 &para
uint32 AsScene2808Handle::hmActivating(int messageNum, const MessageParam &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param,
uint32 AsScene2812Rope::hmRopingDown(int messageNum, const MessageParam &param, 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 &param, 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 &param) {
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 &para
uint32 KmScene2803Small::hmShrink(int messageNum, const MessageParam &param, 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 &param) {
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 &param) {
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 &param) {
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 &param) {
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 &param) {
_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 &param) {
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 &param, 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 &param, 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 &param, 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 &param, 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 &param, 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 &param,
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 &param, 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) {