Beispiel #1
0
bool CSuccUBus::MouseDragStartMsg(CMouseDragStartMsg *msg) {
    CPetControl *pet = getPetControl();
    Rect tempRect = _rect1;
    tempRect.translate(_bounds.left, _bounds.top);

    if (_field1D8 || !_enabled || !_field188 || !tempRect.contains(msg->_mousePos)
            || !pet)
        return true;

    uint petRoomFlags = pet->getRoomFlags();
    CGameObject *mailObject = findMail(petRoomFlags);
    if (!mailObject)
        return true;

    petAddToCarryParcel(mailObject);
    CViewItem *view = getView();
    if (!view)
        return true;

    mailObject->moveUnder(view);
    mailObject->setPosition(Point(msg->_mousePos.x + mailObject->_bounds.width() / 2,
                                  msg->_mousePos.y + mailObject->_bounds.height() / 2));

    CVisibleMsg visibleMsg(true);
    visibleMsg.execute(mailObject);
    CPassOnDragStartMsg dragMsg;
    dragMsg._mousePos = msg->_mousePos;
    dragMsg._value3 = 1;
    dragMsg.execute(mailObject);

    if (!dragMsg._value4)
        msg->_dragItem = mailObject;

    loadFrame(_field184);
    _field188 = 0;
    CSUBTransition transMsg;
    transMsg.execute(this);

    return true;
}
Beispiel #2
0
bool CBrainSlot::MouseDragStartMsg(CMouseDragStartMsg *msg) {
	if (!_value1 || _woken || !checkPoint(msg->_mousePos, false, true))
		return false;

	_cursorId = CURSOR_ARROW;
	CVisibleMsg visibleMsg(true);
	visibleMsg.execute(_target);
	CTakeHeadPieceMsg takeMsg(_target);
	takeMsg.execute("TitaniaControl");

	loadFrame(isEquals("CentralCoreSlot") ? 21 : 0);
	_value1 = 0;

	CPassOnDragStartMsg passMsg;
	passMsg._mousePos = msg->_mousePos;
	passMsg.execute(_target);

	msg->_dragItem = getRoot()->findByName(_target);
	_added = false;

	return true;
}
Beispiel #3
0
bool CParrot::MouseDragStartMsg(CMouseDragStartMsg *msg) {
	if (_field118 && !_v4 && checkPoint(msg->_mousePos, false, true)) {
		setVisible(false);
		CRoomItem *room = findRoom();

		moveUnder(room);
		startTalking(this, 280129);
		performAction(true);

		CCarry *item = dynamic_cast<CCarry *>(getRoot()->findByName(_string2));
		if (item) {
			item->_fieldE0 = 1;
			CPassOnDragStartMsg passMsg;
			passMsg._mousePos = msg->_mousePos;
			passMsg.execute(item);
			msg->_dragItem = item;

			CActMsg actMsg("LoseParrot");
			actMsg.execute("ParrotLobbyController");
		}
	}

	return true;
}