uint32 Scene1201::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { uint32 messageResult = Scene::handleMessage(messageNum, param, sender); switch (messageNum) { case NM_ANIMATION_START: if (param.asInteger() == 0x07053000) { _creatureExploded = true; sendMessage(_asCreature, 0x2004, 0); } else if (param.asInteger() == 0x140E5744) sendMessage(_asCreature, NM_KLAYMEN_CLIMB_LADDER, 0); else if (param.asInteger() == 0x40253C40) { _canAcceptInput = false; sendMessage(_asCreature, NM_KLAYMEN_STOP_CLIMBING, 0); } else if (param.asInteger() == 0x090EB048) { if (_klaymen->getX() < 572) setMessageList2(0x004AEC90); else setMessageList2(0x004AEC20); } break; case 0x2001: if (getGlobalVar(V_MATCH_STATUS) == 0) setMessageList2(0x004AECB0); else { sendEntityMessage(_klaymen, 0x1014, _asMatch); setMessageList2(0x004AECC0); } break; case NM_POSITION_CHANGE: if (getGlobalVar(V_TNT_DUMMY_FUSE_LIT)) { // Move the TNT dummy if the fuse is burning sendEntityMessage(_klaymen, 0x1014, _asTntMan); setMessageList2(0x004AECF0, false); } else if (getGlobalVar(V_MATCH_STATUS) == 3) { // Light the TNT dummy if we have the match sendEntityMessage(_klaymen, 0x1014, _asTntMan); if (_klaymen->getX() > _asTntMan->getX()) setMessageList(0x004AECD0); else setMessageList(0x004AECE0); } break; case 0x4814: cancelMessageList(); break; case 0x4826: if (sender == _asTape) { sendEntityMessage(_klaymen, 0x1014, _asTape); setMessageList(0x004AED38); } break; case 0x4829: sendMessage(_asRightDoor, 0x4829, 0); break; case 0x8000: sendMessage(_asKlaymenHead, NM_KLAYMEN_STOP_CLIMBING, 0); break; } return messageResult; }
uint32 Scene2101::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { Scene::handleMessage(messageNum, param, sender); switch (messageNum) { case 0x100D: if (param.asInteger() == 0x02144CB1) sendEntityMessage(_klaymen, 0x1014, _ssFloorButton); else if (param.asInteger() == 0x21E64A00) { if (_doorStatus == 0) setMessageList(0x004B8E80); else setMessageList(0x004B8EC8); } else if (param.asInteger() == 0x41442820) cancelMessageList(); break; case 0x2000: if (param.asInteger() != 0) { setRectList(0x004B9008); _klaymen->setKlaymenIdleTable3(); } else { setRectList(0x004B8FF8); _klaymen->setKlaymenIdleTable1(); } break; case 0x480B: if (sender == _ssFloorButton && _doorStatus == 1) { sendMessage(_asDoor, 0x4808, 0); _doorStatus = 0; _countdown1 = 90; } break; case 0x4826: if (sender == _asTape1 || sender == _asTape2) { if (_klaymen->getX() >= 228 && _klaymen->getX() <= 500) { sendEntityMessage(_klaymen, 0x1014, sender); setMessageList(0x004B8F78); } else if (_klaymen->getX() < 228) setMessageList2(0x004B8F00); } break; } return 0; }