bool CDoorbot::ActMsg(CActMsg *msg) { debugC(ERROR_DETAILED, kDebugScripts, "CDoorbot ActMsg action=%s v108=%d v110=%d v114=%d", msg->_action.c_str(), _introMovieNum, _field110, _field114); if (msg->_action == "DoorbotPlayerPressedTopButton") { disableMouse(); startTalking(this, 221471); } else if (msg->_action == "DoorbotPlayerPressedMiddleButton") { startTalking(this, 221470); } else if (msg->_action == "DoorbotPlayerPressedBottomButton") { startTalking(this, 221469); } else if (msg->_action == "DoorbotReachedEmbLobby") { startTalking(this, 221472); } else if (msg->_action == "PlayerPicksUpPhoto") { _field110 = 1; if (!_field114 && _introMovieNum == 4) { stopAnimTimer(_timerId); _timerId = 0; _introMovieNum = 5; startTalking(this, 221484); } } else if (msg->_action == "PlayerPutsPhotoInPet") { _field110 = 2; if (!_field114 && _introMovieNum == 5) { stopAnimTimer(_timerId); _timerId = 0; startTalking(this, 221486); disableMouse(); } } return true; }
bool CTrueTalkNPC::TrueTalkNotifySpeechStartedMsg(CTrueTalkNotifySpeechStartedMsg *msg) { debugC(ERROR_DETAILED, kDebugScripts, "%s TrueTalkNotifySpeechStartedMsg flags=%x dialogueId=%d", getName().c_str(), _npcFlags, msg->_dialogueId); _npcFlags |= NPCFLAG_SPEAKING; ++_speechCounter; if (!(_npcFlags & NPCFLAG_8)) { // Stop any previous animation if (_speechTimerId) stopAnimTimer(_speechTimerId); _speechTimerId = 0; _speechDuration = msg->_speechDuration; _startTicks = getTicksCount(); if (!hasActiveMovie() || (_npcFlags & NPCFLAG_IDLING)) { _npcFlags &= ~NPCFLAG_IDLING; stopMovie(); CNPCPlayTalkingAnimationMsg msg1(_speechDuration, 0, nullptr); msg1.execute(this); if (msg1._names) { CNPCPlayAnimationMsg msg2(msg1._names, msg1._speechDuration); msg2.execute(this); } } } return true; }
bool CMaitreD::TrueTalkNotifySpeechEndedMsg(CTrueTalkNotifySpeechEndedMsg *msg) { if (_field12C) { stopAnimTimer(_timerId); _timerId = startAnimTimer("MD Fight", 3000 + getRandomNumber(3000)); } CTrueTalkNPC::TrueTalkNotifySpeechEndedMsg(msg); return true; }
bool CMaitreD::TrueTalkNotifySpeechStartedMsg(CTrueTalkNotifySpeechStartedMsg *msg) { if (_field12C) { stopAnimTimer(_timerId); _timerId = 0; } CTrueTalkNPC::TrueTalkNotifySpeechStartedMsg(msg); return true; }
bool CMaitreD::LeaveViewMsg(CLeaveViewMsg *msg) { _field134 = _field12C; performAction(true); stopAnimTimer(_timerId); _timerId = 0; _field12C = 0; return true; }
bool CWheelButton::LeaveViewMsg(CLeaveViewMsg *msg) { if (_timerId) { stopAnimTimer(_timerId); _timerId = 0; setVisible(false); } return true; }
bool CMaitreD::TrueTalkTriggerActionMsg(CTrueTalkTriggerActionMsg *msg) { if (msg->_action == 8) { _field12C = 1; stopAnimTimer(_timerId); _timerId = startAnimTimer("MD Fight", 3500, 0); } else if (msg->_action == 9) { stopAnimTimer(_timerId); _timerId = 0; } else if (msg->_action == 10) { _field12C = 0; _v1 = 1; stopAnimTimer(_timerId); _timerId = 0; CMaitreDDefeatedMsg defeatedMsg; defeatedMsg.execute(findRoom()); } return true; }
void Fight::fightEnd( uchar result ) { updateUnits(); _result.fromUChar( result ); //showFightResults(); emit sig_showResults(); stopDataTimer(); stopAnimTimer(); emit sig_quit(); }
Fight::~Fight() { stopDataTimer(); stopAnimTimer(); clear(); delete _lostAttack; delete _lostDefense; delete _attData; if( _pixmap ) { delete _pixmap; } }
bool CIdleSummoner::ActMsg(CActMsg *msg) { if (msg->_action == "Enable") { if (!_fieldD4) _fieldD4 = addTimer(15000, 15000); } else if (msg->_action == "Disable") { if (_fieldD4 > 0) { stopAnimTimer(_fieldD4); _fieldD4 = 0; } } else if (msg->_action == "DoorbotDismissed" || msg->_action == "BellbotDismissed") { _ticks = getTicksCount(); } return true; }
bool CWheelButton::SignalObject(CSignalObject *msg) { bool oldFlag = _fieldE0; _fieldE0 = msg->_numValue != 0; if (oldFlag != _fieldE0) { if (_fieldE0) { _timerId = addTimer(500, 500); } else { stopAnimTimer(_timerId); _timerId = 0; setVisible(false); } } return true; }
bool CDoorbot::TextInputMsg(CTextInputMsg *msg) { if (!(_npcFlags & NPCFLAG_DOORBOT_INTRO)) return CTrueTalkNPC::TextInputMsg(msg); if (_introMovieNum == 1) { stopAnimTimer(_timerId); _introMovieNum = 2; _timerId = 0; if (msg->_input == "yes" || msg->_input == "yeah" || msg->_input == "yea" || msg->_input == "yup" || msg->_input == "yep" || msg->_input == "sure" || msg->_input == "alright" || msg->_input == "all right" || msg->_input == "ok") { startTalking(this, 221479); } else { startTalking(this, 221478); } } return true; }
void ANIM_finish(void) { stopAnimTimer(); FB_disableCustomBuffer(); }
bool CDoorbot::TrueTalkNotifySpeechEndedMsg(CTrueTalkNotifySpeechEndedMsg *msg) { CTrueTalkNPC::TrueTalkNotifySpeechEndedMsg(msg); if (_npcFlags & NPCFLAG_DOORBOT_INTRO) { // Initial speech by Doorbot in switch (msg->_dialogueId) { case 10552: playClip("SE Try Buttons", MOVIE_NOTIFY_OBJECT); _introMovieNum = 9; break; case 10553: enableMouse(); break; case 10557: playClip("SE Move To Right", MOVIE_NOTIFY_OBJECT); _introMovieNum = 11; break; case 10559: stopAnimTimer(_timerId); _timerId = addTimer(0, 2500, 0); break; case 10560: petShow(); petSetArea(PET_CONVERSATION); stopAnimTimer(_timerId); _timerId = addTimer(1, 1000, 0); break; case 10561: enableMouse(); _introMovieNum = 1; stopAnimTimer(_timerId); _timerId = addTimer(2, 10000, 0); break; case 10562: if (_introMovieNum == 1) { stopAnimTimer(_timerId); _timerId = addTimer(2, getRandomNumber(5000), 0); } break; case 10563: case 10564: disableMouse(); startTalking(this, 221480); break; case 10565: startTalking(this, 221481); break; case 10566: stopAnimTimer(_timerId); _timerId = 0; if (_field110 == 2) { playClip("Cloak On", MOVIE_NOTIFY_OBJECT); _introMovieNum = 6; } else { _timerId = addTimer(3, 2000, 0); } break; case 10567: { CActMsg actMsg("BecomeGettable"); actMsg.execute("Photograph"); enableMouse(); stopAnimTimer(_timerId); _timerId = addTimer(4, 5000, 0); break; } case 10568: // Start moving cursor to photograph mouseDisableControl(); mouseSetPosition(Point(600, 250), 2500); _timerId = addTimer(6, 2500, 0); break; case 10569: if (_field110 != 2) { stopAnimTimer(_timerId); _timerId = addTimer(5, 3000, 0); } break; case 10570: mouseSetPosition(Point(200, 430), 2500); _timerId = addTimer(7, 3000, 0); break; case 10571: playClip("Cloak On", MOVIE_NOTIFY_OBJECT); _introMovieNum = 6; break; default: break; } } return true; }
void DIGITAL_finish(void) { stopAnimTimer(); }