Пример #1
0
bool CBellBot::TrueTalkTriggerActionMsg(CTrueTalkTriggerActionMsg *msg) {
	switch (msg->_action) {
	case 1:
	case 28: {
		_npcFlags &= ~NPCFLAG_IDLING;
		CDismissBotMsg dismissMsg;
		dismissMsg.execute(this);
		break;
	}

	case 5:
		_npcFlags &= ~NPCFLAG_20000;
		playClip("Walk Off", MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
		movieEvent();
		break;

	case 17: {
		CActMsg actMsg("ThrowTVDownWell");
		actMsg.execute("ThrowTVDownWellControl");
		break;
	}

	case 29: {
		CActMsg actMsg("BellbotGetLight");
		actMsg.execute("BellbotGetLightCutScene");
		startTalking(this, 158);
		break;
	}

	default:
		break;
	}

	return true;
}
Пример #2
0
bool CShipSetting::MouseDragStartMsg(CMouseDragStartMsg *msg) {
	if (!checkStartDragging(msg))
		return false;
	if (_itemName == "NULL")
		return true;

	CTurnOff offMsg;
	offMsg.execute(_target);

	if (isEquals("ChickenSetting") || _itemName == "ChickenBridge") {
		CActMsg actMsg("IncreaseQuantity");
		actMsg.execute("ChickenDispenser");
	}

	if (_itemName != "NULL") {
		CPassOnDragStartMsg passMsg(msg->_mousePos, 1);
		passMsg.execute(_itemName);

		msg->_dragItem = getRoot()->findByName(_itemName);

		CVisibleMsg visibleMsg(true);
		visibleMsg.execute(_itemName);
	}

	CSetFrameMsg frameMsg(0);
	frameMsg.execute(_frameTarget);
	_itemName = "NULL";
	_cursorId = CURSOR_ARROW;
	return true;
}
Пример #3
0
bool CMaitreDRightArm::DropZoneLostObjectMsg(CDropZoneLostObjectMsg *msg) {
	CActMsg actMsg("LoseArm");
	actMsg.execute("MaitreDBody");
	actMsg.execute("MaitreD Arm Holder");
	_canTake = true;
	return true;
}
Пример #4
0
bool CGlass::UseWithOtherMsg(CUseWithOtherMsg *msg) {
	CSauceDispensor *dispensor = dynamic_cast<CSauceDispensor *>(msg->_other);
	CChicken *chicken = dynamic_cast<CChicken *>(msg->_other);

	if (dispensor && _condiment == "None") {
		CUse useMsg(this);
		useMsg.execute(dispensor);
	} else if (msg->_other->isEquals("Chicken") && _condiment == "None") {
		if (chicken->_condiment != "None") {
			if (!chicken->_greasy) {
				CActMsg actMsg(_condiment);
				actMsg.execute("Chicken");
			}

			_condiment = "None";
			loadFrame(0);
			_visibleFrame = 0;
		}

		petAddToInventory();
	} else if (msg->_other->isEquals("Napkin") && _condiment == "None") {
		petAddToInventory();
		_condiment = "None";
		loadFrame(0);
		_visibleFrame = 0;
	} else {
		petAddToInventory();
	}

	return true;
}
Пример #5
0
bool CParrot::MovieFrameMsg(CMovieFrameMsg *msg) {
	if (_npcFlags & NPCFLAG_800000) {
		CCarry *chicken = dynamic_cast<CCarry *>(findUnder(getRoot(), "Chicken"));
		if (chicken) {
			CActMsg actMsg("Eaten");
			actMsg.execute(chicken);
		}

		_npcFlags &= ~NPCFLAG_800000;
	}

	switch (msg->_frameNumber) {
	case 244:
		setPosition(Point(_bounds.left, _bounds.top + 45));
		break;
	case 261:
	case 262:
	case 265:
	case 268:
	case 271:
		setPosition(Point(_bounds.left + _field130, _bounds.top));
		break;
	default:
		break;
	}

	return true;
}
Пример #6
0
bool CBarbot::TrueTalkTriggerActionMsg(CTrueTalkTriggerActionMsg *msg) {
	switch (msg->_action) {
	case 6:
		if (_field134) {
			playRange(_frames[27], MOVIE_NOTIFY_OBJECT);
			_frameNum = _frames[27]._endFrame;
		} else if (!_gottenDrunk && _drunkFlag) {
			playRange(_frames[45], MOVIE_NOTIFY_OBJECT);
			playRange(_frames[44], MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH);
			_frameNum = _frames[44]._endFrame;
		}
		break;

	case 7: {
		// "add vodka"
		CActMsg actMsg("Vodka");
		actMsg.execute(this);
		break;
	}

	case 30:
		// "starling puret"
		_addedPuret = true;
		break;

	default:
		break;
	}

	return true;
}
Пример #7
0
bool CNoseHolder::FrameMsg(CFrameMsg *msg) {
	if (!_dragObject) {
		CGameObject *dragObj = getDraggingObject();
		if (!dragObj)
			return false;

		if (!dragObj->isEquals("Feathers") || getView() != findView())
			return false;

		_dragObject = dragObj;
	}

	if (_dragObject) {
		if (!checkPoint(Point(_dragObject->_bounds.left,
				_dragObject->_bounds.top))) {
			_field11C = false;
		} else if (!_field11C) {
			CActMsg actMsg("Sneeze");
			actMsg.execute(this);
			_field11C = true;
		}
	}

	return true;
}
Пример #8
0
bool CChicken::UseWithOtherMsg(CUseWithOtherMsg *msg) {
	if (msg->_other->getName() == "Napkin") {
		if (_field12C || _string6 == "None") {
			CActMsg actMsg("Clean");
			actMsg.execute(this);
			petAddToInventory();
		} else {
			CShowTextMsg textMsg("The chicken is already clean.");
			textMsg.execute("PET");
		}

		petAddToInventory();
	} else {
		CSauceDispensor *dispensor = dynamic_cast<CSauceDispensor *>(msg->_other);
		if (!dispensor || _string6 == "None") {
			return CCarry::UseWithOtherMsg(msg);
		} else {
			setVisible(false);
			CUse use(this);
			use.execute(msg->_other);
		}
	}

	return true;
}
Пример #9
0
bool CCarryParrot::PETGainedObjectMsg(CPETGainedObjectMsg *msg) {
	CParrot::_v4 = 4;
	CActMsg actMsg("Shut");
	actMsg.execute("ParrotCage");

	return true;
}
Пример #10
0
bool CTitania::AddHeadPieceMsg(CAddHeadPieceMsg *msg) {
	if (msg->_value == "VisionCentre") {
		_visionCentre = true;
	} else if (msg->_value == "AuditoryCentre") {
		_auditoryCentre = true;
	} else if (msg->_value == "OlfactoryCentre") {
		_olfactoryCentre = true;
	} else if (msg->_value == "SpeechCentre") {
		_speechCentre = true;
	} else if (msg->_value == "CentralCore") {
		_centralCore = true;
	} else if (msg->_value == "Eye1") {
		_eye1 = true;
	} else if (msg->_value == "Eye2") {
		_eye2 = true;
	} else if (msg->_value == "Ear1") {
		_ear1 = true;
	} else if (msg->_value == "Ear2") {
		_ear2 = true;
	} else if (msg->_value == "Mouth") {
		_mouth = true;
	} else if (msg->_value == "Nose") {
		_nose = true;
	}

	CActMsg actMsg("CheckHead");
	actMsg.execute(this);
	return true;
}
Пример #11
0
bool CCentralCore::DropZoneLostObjectMsg(CDropZoneLostObjectMsg *msg) {
    CString name = msg->_object->getName();
    if (name == "PerchCoreHolder") {
        CParrot::_v2 = 1;
        if (isEquals("CentralCore"))
            CParrot::_v5 = 0;

        CActMsg actMsg("LosePerch");
        actMsg.execute("ParrotLobbyController");
    } else if (name == "PerchHolder") {
        CActMsg actMsg("LoseStick");
        actMsg.execute("ParrotLobbyController");
    }

    return true;
}
Пример #12
0
bool CCage::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
	if (CParrot::_v4 && !CParrot::_v5) {
		CActMsg actMsg(_open ? "Open" : "Shut");
		actMsg.execute(this);
	}

	return true;
}
Пример #13
0
bool CKey::UseWithOtherMsg(CUseWithOtherMsg *msg) {
	if (msg->_other->getName() == "1stClassPhono") {
		CActMsg actMsg("Unlock");
		actMsg.execute(msg->_other);
	}

	return true;
}
Пример #14
0
bool CChicken::PETLostObjectMsg(CPETLostObjectMsg *msg) {
	if (compareViewNameTo("ParrotLobby.Node 1.N")) {
		CActMsg actMsg("StartChickenDrag");
		actMsg.execute("PerchedParrot");
	}

	return true;
}
Пример #15
0
bool CCentralCore::DropZoneGotObjectMsg(CDropZoneGotObjectMsg *msg) {
    CString name = msg->_object->getName();
    if (name == "PerchCoreHolder") {
        if (isEquals("CentralCore")) {
            CParrot::_v5 = 1;
            CActMsg actMsg("CoreReplaced");
            actMsg.execute("ParrotCage");
        }

        CActMsg actMsg("GainPerch");
        actMsg.execute("ParrotLobbyController");
    } else if (name == "PerchHolder") {
        CActMsg actMsg("GainStick");
        actMsg.execute("ParrotLobbyController");
    }

    return true;
}
Пример #16
0
bool CUpLighter::TimerMsg(CTimerMsg *msg) {
	if (_isSpring && _inRoom & !_hosePumping) {
		CActMsg actMsg("Sneeze");
		actMsg.execute(findRoom()->findByName("NoseHolder"));
		addTimer(1000 + getRandomNumber(19000), 0);
	}

	return true;
}
Пример #17
0
bool CLiftbotHead::MouseDragStartMsg(CMouseDragStartMsg *msg) {
	if (!checkStartDragging(msg)) {
		return false;
	} else if (compareViewNameTo("BottomOfWell.Node 8.N")) {
		changeView("BottomOfWell.Node 13.N");
		moveToView();

		CActMsg actMsg("LiftbotHeadTaken");
		actMsg.execute("BOWLiftbotHeadMonitor");

		return CCarry::MouseDragStartMsg(msg);
	} else if (_flag) {
		_flag = false;
		CActMsg actMsg("LoseHead");
		actMsg.execute("FaultyLiftbot");
	}

	return CCarry::MouseDragStartMsg(msg);
}
Пример #18
0
bool CBarShelfVisCentre::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
	if (!_flag) {
		CActMsg actMsg("ClickOnVision");
		actMsg.execute("Barbot");
		addTimer(3000);
		_flag = true;
	}

	return true;
}
Пример #19
0
bool CCDROMTray::MovieEndMsg(CMovieEndMsg *msg) {
	CTreeItem *screen = getRoom()->findByName("newScreen");

	if (screen) {
		CActMsg actMsg(_insertedCD);
		actMsg.execute(screen);
	}

	return true;
}
Пример #20
0
bool CCarryParrot::TimerMsg(CTimerMsg *msg) {
	if (CParrot::_v4 == 1 || CParrot::_v4 == 4) {
		if (++_freeCounter >= 30) {
			CActMsg actMsg("FreeParrot");
			actMsg.execute(this);
		}
	}

	return true;
}
Пример #21
0
bool CCDROMTray::ActMsg(CActMsg *msg) {
	if (msg->_action == "ClickedOn") {
		if (_isOpened) {
			// Closing the tray
			if (_insertedCD == "None") {
				// No CD in tray
				playMovie(55, 65, 0);
				playSound("a#35.wav", 50, 0, 0);
				_isOpened = false;
			} else {
				// Ejecting tray with CD
				CTreeItem *cdrom = getRoom()->findByName(_insertedCD);
				if (cdrom) {
					CActMsg actMsg("Ejected");
					actMsg.execute(cdrom);
				}

				_insertedCD = "None";
				loadFrame(52);
			}
		} else if (_insertedCD == "None") {
			// Opening tray with no CD
			playMovie(44, 54, 0);
			playSound("a#34.wav", 50, 0, 0);
			_isOpened = true;
		} else if (_insertedCD == "newCD1" || _insertedCD == "newCD2") {
			// Opening tray with standard CD
			playMovie(22, 32, 0);
			playSound("a#34.wav", 50, 0, 0);
			_isOpened = true;
		} else if (_insertedCD == "newSTCD") {
			// Opening tray with Starship Titanic CD
			playMovie(0, 10, 0);
			playSound("a#34.wav", 50, 0, 0);
			_isOpened = true;
		}
	} else if (_isOpened) {
		if (msg->_action == "newCD1" || msg->_action == "newCD2") {
			// Standard CD dropped on CDROM Tray
			playMovie(33, 43, MOVIE_NOTIFY_OBJECT);
			playSound("a#35.wav", 50, 0, 0);
		} else if (msg->_action == "newSTCD") {
			// Starship Titanic CD dropped on CDROM Tray
			playMovie(11, 21, MOVIE_NOTIFY_OBJECT);
			playSound("a#35.wav", 50, 0, 0);
		} else {
			return true;
		}

		_insertedCD = msg->_action;
		_isOpened = false;
	}

	return true;
}
Пример #22
0
bool CSpeechDispensor::FrameMsg(CFrameMsg *msg) {
	if (_fieldEC || _seasonNum == SEASON_SUMMER || _seasonNum == SEASON_SPRING)
		return true;

	CGameObject *dragObject = getDraggingObject();
	if (!_dragItem && dragObject && getView() == findView()) {
		if (dragObject->isEquals("Perch")) {
			petDisplayMessage(1, TOO_SHORT_TO_REACH_BRANCHES);
			return true;
		}

		if (dragObject->isEquals("LongStick"))
			_dragItem = dragObject;
	}

	if (_dragItem) {
		Point pt(_itemPos.x + _dragItem->_bounds.left,
			_itemPos.y + _dragItem->_bounds.top);
		if (!checkPoint(pt, true))
			return true;

		switch (_state) {
		case 0:
			playSound("z#93.wav");
			if (_seasonNum == SEASON_WINTER) {
				petDisplayMessage(1, FROZEN_TO_BRANCH);
				_fieldE0 = false;
				_state = 1;
			} else {
				if (++_fieldE0 >= 5) {
					CActMsg actMsg("PlayerGetsSpeechCentre");
					actMsg.execute("SeasonalAdjust");
					CSpeechFallsFromTreeMsg fallMsg(pt);
					fallMsg.execute("SpeechCentre");

					_fieldEC = true;
					_fieldE0 = false;
				}

				_state = 1;
			}
			break;

		case 2:
			_state = 0;
			++_fieldE0;
			break;

		default:
			break;
		}
	}

	return true;
}
Пример #23
0
bool CEnterBridge::EnterRoomMsg(CEnterRoomMsg *msg) {
	if (_flag) {
		CActMsg actMsg("Disable");
		actMsg.execute("ShipAnnouncements");

		setState1C(false);
		_flag = false;
	}

	return true;
}
Пример #24
0
bool CTitania::ActMsg(CActMsg *msg) {
	if (msg->_action == "SleepTitania") {
		setVisible(true);
		playCutscene(52, 104);
		playSound("z#47.wav", 100);
		changeView("Titania.Node 7.S", "");

		petShow();
		enableMouse();
		CSetFrameMsg frameMsg;
		frameMsg.execute("Bomb");

	} else if (msg->_action == "CheckHead") {
		CSenseWorkingMsg workingMsg1("Not Working");
		CSenseWorkingMsg workingMsg2("Not Working");
		CSenseWorkingMsg workingMsg3("Not Working");
		CSenseWorkingMsg workingMsg4("Not Working");

		if (_eye1 && _eye2) {
			workingMsg1._value = _visionCentre ? "Working" : "Random";
		}
		if (_ear1 && _ear2) {
			workingMsg2._value = _auditoryCentre ? "Working" : "Random";
		}
		if (_nose) {
			workingMsg4._value = _olfactoryCentre ? "Working" : "Random";
		}
		if (_mouth) {
			workingMsg3._value = _speechCentre ? "Working" : "Random";
		}

		if (_centralCore && _eye1 && _eye2 && _ear1 && _ear2 && _nose && _mouth
				&& _speechCentre && _olfactoryCentre && _auditoryCentre) {
			playSound("z#47.wav");

			CActMsg actMsg("Woken");
			actMsg.execute("MouthSlot");
			actMsg.execute("VisionCentreSlot");
			setPassengerClass(UNCHECKED);

			addTimer(1000);
		} else {
			workingMsg1.execute("Eye1Slot");
			workingMsg1.execute("Eye2Slot");
			workingMsg2.execute("Ear1Slot");
			workingMsg2.execute("Ear2Slot");
			workingMsg3.execute("MouthSlot");
			workingMsg4.execute("NoseSlot");
		}
	}

	return true;
}
Пример #25
0
bool CPickUpVisCentre::MouseDragStartMsg(CMouseDragStartMsg *msg) {
	if (!checkStartDragging(msg) || !_enabled)
		return false;

	setVisible(false);
	CVisibleMsg visibleMsg;
	visibleMsg.execute("VisionCentre");
	msg->execute("VisionCentre");
	CActMsg actMsg("PlayerTakesVisCentre");
	actMsg.execute("Barbot");
	return true;
}
Пример #26
0
bool CEnterSecClassState::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
	if (getPassengerClass() > 2) {
		playSound("b#105.wav");
		petDisplayMessage(1, CLASS_NOT_PERMITTED_IN_AREA);
	} else if (!compareRoomNameTo("SecClassLittleLift") || _mode == 2)  {
		CActMsg actMsg(getFullViewName().deleteRight(3) + ".S");
		actMsg.execute("SecClassRoomLeaver");
		changeView("secClassState.Node 01.N");
	}

	return true;
}
Пример #27
0
bool CSkipNavigationGlyph::MouseButtonUpMsg(const Point &pt) {
	if (_button && _button->MouseButtonUpMsg(pt)) {
		CPetRemote *remote = static_cast<CPetRemote *>(_owner->getOwner());
		CStarControl *starControl = remote->getPetControl()->getStarControl();
		starControl->forceSolved();

		CActMsg actMsg("SetDestin");
		actMsg.execute("CaptainsWheel");
		return true;
	}

	return false;
}
Пример #28
0
bool CMagazine::UseWithOtherMsg(CUseWithOtherMsg *msg) {
	if (msg->_other->getName() == "SwitchOnDeskbot") {
		// TODO: other _field108 if
		if (false) {
			setVisible(false);
			setPosition(Point(1000, 1000));
			CActMsg actMsg("2ndClassUpgrade");
			actMsg.execute("Deskbot");
		}
	}

	return true;
}
Пример #29
0
bool CNapkin::UseWithOtherMsg(CUseWithOtherMsg *msg) {
	CChicken *chicken = dynamic_cast<CChicken *>(msg->_other);
	if (chicken) {
		if (chicken->_string6 == "None" || chicken->_field12C) {
			CActMsg actMsg("Clean");
			actMsg.execute("Chicken");
		} else {
			petDisplayMessage(CHICKEN_IS_CLEAN);
		}
	}

	petAddToInventory();
	return CCarry::UseWithOtherMsg(msg);
}
Пример #30
0
bool CNapkin::UseWithOtherMsg(CUseWithOtherMsg *msg) {
	CChicken *chicken = static_cast<CChicken *>(msg->_other);
	if (chicken) {
		if (chicken->_string6 == "None" || chicken->_field12C) {
			CActMsg actMsg("Clean");
			actMsg.execute("Chicken");
		} else {
			petDisplayMessage("The Chicken is already quite clean enough, thank you.");
		}
	}

	petAddToInventory();
	return CCarry::UseWithOtherMsg(msg);
}