Beispiel #1
0
int sceneHandler01(ExCommand *cmd) {
	int res = 0;

	if (cmd->_messageKind != 17)
		return 0;

	if (cmd->_messageNum > MSG_SC1_SHOWOSK) {
		if (cmd->_messageNum == MSG_SC1_UTRUBACLICK)
			handleObjectInteraction(g_fp->_aniMan, g_fp->_currentScene->getPictureObjectById(PIC_SC1_LADDER, 0), 0);

		return 0;
	}

	if (cmd->_messageNum == MSG_SC1_SHOWOSK) {
		g_vars->scene01_picSc01Osk->_flags |= 4;

		g_vars->scene01_picSc01Osk->_priority = 20;
		g_vars->scene01_picSc01Osk2->_priority = 21;

		return 0;
	}

	if (cmd->_messageNum != 0x21) {
		if (cmd->_messageNum == MSG_SC1_SHOWOSK2) {
			g_vars->scene01_picSc01Osk2->_flags |= 4;
			g_vars->scene01_picSc01Osk2->_priority = 20;
			g_vars->scene01_picSc01Osk->_priority = 21;

			return 0;
		}

		return 0;
	}

	if (g_fp->_aniMan2) {
		if (g_fp->_aniMan2->_ox < g_fp->_sceneRect.left + 200) {
			g_fp->_currentScene->_x = g_fp->_aniMan2->_ox - g_fp->_sceneRect.left - 300;
		}

		if (g_fp->_aniMan2->_ox > g_fp->_sceneRect.right - 200)
			g_fp->_currentScene->_x = g_fp->_aniMan2->_ox - g_fp->_sceneRect.right + 300;

		res = 1;
	}
	g_fp->_behaviorManager->updateBehaviors();

	g_fp->startSceneTrack();

	return res;
}
Beispiel #2
0
bool sceneHandler14_arcadeProcessClick(ExCommand *cmd) {
	if (!getCurrSceneSc2MotionController()->_isEnabled)
		return 0;

	if (!g_vars->scene14_grandmaIsHere) {
		if (!cmd->_keyCode) {
			if (g_vars->scene14_pink) {
				if (g_vars->scene14_pink->_flags & 4) {
					if (cmd->_sceneClickX < g_vars->scene14_pink->_ox + 40) {
						handleObjectInteraction(g_fp->_aniMan, g_vars->scene14_pink, 0);
						cmd->_messageKind = 0;
						return true;
					}
				}
			}
		}
		return false;
	}

	if (getCurrSceneSc2MotionController()->_objtype != kObjTypeMctlCompound)
		return false;

	if (!getCurrSceneSc2MotionController()->_motionControllers[0]->_movGraphReactObj->pointInRegion(cmd->_sceneClickX, cmd->_sceneClickY))
		return false;

	if (cmd->_sceneClickX > 1237)
		return false;

	MessageQueue *mq = getCurrSceneSc2MotionController()->startMove(g_fp->_aniMan, 1237, 451, 1, 0);

	if (!mq)
		return false;

	ExCommand *ex = new ExCommand(0, 17, MSG_SC14_STARTARCADE, 0, 0, 0, 1, 0, 0, 0);

	ex->_excFlags |= 3;
	mq->addExCommandToEnd(ex);
	mq->setFlags(mq->getFlags() | 1);

	postExCommand(g_fp->_aniMan->_id, 2, 1237, 451, 0, -1);

	cmd->_messageKind = 0;

	getCurrSceneSc2MotionController()->deactivate();
	getGameLoaderInteractionController()->disableFlag24();
	return true;
}
Beispiel #3
0
int sceneHandlerDbgMenu(ExCommand *ex) {
	if (ex->_messageKind != 17)
		return 0;

	int mx = g_fp->_mouseScreenPos.x + g_fp->_sceneRect.left;
	int my = g_fp->_mouseScreenPos.y + g_fp->_sceneRect.top;

	if (ex->_messageNum == 29) {
		GameObject *obj = sceneHandlerDbgMenu_getObjectAtXY(mx, my);
		if (obj && canInteractAny(0, obj, -3) ) {
			getGameLoaderInteractionController()->enableFlag24();
			handleObjectInteraction(0, obj, 0);
		}
		return 0;
	}
	if (ex->_messageNum != 33) {
		if (ex->_messageNum == MSG_RESTARTGAME) {
			g_fp->_needRestart = true;
			return 0;
		}
		return 0;
	}

	g_fp->_cursorId = PIC_CSR_DEFAULT;
	GameObject *obj = g_fp->_currentScene->getStaticANIObjectAtPos(mx, my);
	if (obj) {
		if (canInteractAny(0, obj, -3)) {
			g_fp->_cursorId = PIC_CSR_DEFAULT;
			g_fp->setCursor(PIC_CSR_DEFAULT);
			return 0;
		}
	} else {
		obj = sceneHandlerDbgMenu_getObjectAtXY(mx, my);
		if (obj && canInteractAny(0, obj, -3) ) {
			g_vars->selector->_flags |= 4;
			g_vars->selector->setOXY(obj->_ox, obj->_oy);
			g_fp->_cursorId = PIC_CSR_DEFAULT;
			g_fp->setCursor(PIC_CSR_DEFAULT);
			return 0;
		}
		g_vars->selector->_flags &= 0xFFFB;
	}
	g_fp->setCursor(g_fp->_cursorId);

	return 0;
}
Beispiel #4
0
void sceneHandler14_exitScene() {
	g_vars->scene14_arcadeIsOn = false;

	if (g_fp->_aniMan->_movement)
		g_fp->_aniMan->_movement->gotoLastFrame();

	g_fp->_aniMan->stopAnim_maybe();

	handleObjectInteraction(g_fp->_aniMan, g_fp->_currentScene->getPictureObjectById(PIC_SC14_RTRUBA, 0), 0);

	g_vars->scene14_grandma->changeStatics2(ST_GMA_SIT);

	chainQueue(QU_SC14_ENDARCADE, 0);

	getGameLoaderInteractionController()->disableFlag24();
	getCurrSceneSc2MotionController()->deactivate();
}
Beispiel #5
0
void sceneHandler06_uPipeClick() {
	if (getGameLoaderInteractionController()->_flag24)
		handleObjectInteraction(g_fp->_aniMan2, g_fp->_currentScene->getPictureObjectById(PIC_SC6_LADDER, 0), 0);
}
Beispiel #6
0
int global_messageHandler3(ExCommand *cmd) {
	int result = 0;

	if (cmd->_messageKind == 17) {
		switch (cmd->_messageNum) {
		case 29:
		case 30:
		case 31:
		case 32:
		case 36:
			if (g_fp->_inputDisabled)
				cmd->_messageKind = 0;
			break;
		default:
			break;
		}
	}

	StaticANIObject *ani, *ani2;

	switch (cmd->_messageKind) {
	case 17:
		switch (cmd->_messageNum) {
		case 61:
			debugC(0, kDebugEvents, "preload: { %d, %d },", cmd->_parentId, cmd->_param);
			return g_fp->_gameLoader->preloadScene(cmd->_parentId, cmd->_param);
		case 62:
			return g_fp->_gameLoader->gotoScene(cmd->_parentId, cmd->_param);
		case 64:
			if (g_fp->_currentScene && g_fp->_msgObjectId2
					&& (!(cmd->_param & 4) || g_fp->_msgObjectId2 != cmd->_field_14 || g_fp->_msgId != cmd->_field_20)) {
				ani = g_fp->_currentScene->getStaticANIObject1ById(g_fp->_msgObjectId2, g_fp->_msgId);
				if (ani) {
					ani->_flags &= 0xFF7F;
					ani->_flags &= 0xFEFF;
					ani->deleteFromGlobalMessageQueue();
				}
			}
			g_fp->_msgX = 0;
			g_fp->_msgY = 0;
			g_fp->_msgObjectId2 = 0;
			g_fp->_msgId = 0;
			if ((cmd->_param & 1) || (cmd->_param & 2)) {
				g_fp->_msgX = cmd->_x;
				g_fp->_msgY = cmd->_y;
			}
			if (cmd->_param & 4) {
				g_fp->_msgObjectId2 = cmd->_field_14;
				g_fp->_msgId = cmd->_field_20;
			}
			return result;
		case 29:
			if (g_fp->_gameLoader->_interactionController->_flag24 && g_fp->_currentScene) {
				ani = g_fp->_currentScene->getStaticANIObjectAtPos(cmd->_sceneClickX, cmd->_sceneClickY);
				ani2 = g_fp->_currentScene->getStaticANIObject1ById(g_fp->_gameLoader->_field_FA, -1);

				if (ani) {
					if (g_fp->_msgObjectId2 == ani->_id && g_fp->_msgId == ani->_odelay) {
						cmd->_messageKind = 0;
						return result;
					}
					if (canInteractAny(ani2, ani, cmd->_param)) {
						handleObjectInteraction(ani2, ani, cmd->_param);
						return 1;
					}
				} else {
					int id = g_fp->_currentScene->getPictureObjectIdAtPos(cmd->_sceneClickX, cmd->_sceneClickY);
					PictureObject *pic = g_fp->_currentScene->getPictureObjectById(id, 0);
					if (pic) {
						if (g_fp->_msgObjectId2 == pic->_id && g_fp->_msgId == pic->_odelay) {
							cmd->_messageKind = 0;
							return result;
						}
						if (!ani2 || canInteractAny(ani2, pic, cmd->_param)) {
							if (!ani2 || (ani2->isIdle() && !(ani2->_flags & 0x80) && !(ani2->_flags & 0x100)))
								handleObjectInteraction(ani2, pic, cmd->_param);
							return 1;
						}
					}
				}
			}
			if (getSc2MctlCompoundBySceneId(g_fp->_currentScene->_sceneId)->_isEnabled && cmd->_param <= 0) {
				if (g_fp->_msgX != cmd->_sceneClickX || g_fp->_msgY != cmd->_sceneClickY) {
					ani = g_fp->_currentScene->getStaticANIObject1ById(g_fp->_gameLoader->_field_FA, -1);
					if (!ani || (ani->isIdle() && !(ani->_flags & 0x80) && !(ani->_flags & 0x100))) {
						debugC(0, kDebugPathfinding, "WWW 1");
						result = startWalkTo(g_fp->_gameLoader->_field_FA, -1, cmd->_sceneClickX, cmd->_sceneClickY, 0);
						if (result) {
							ExCommand *ex = new ExCommand(g_fp->_gameLoader->_field_FA, 17, 64, 0, 0, 0, 1, 0, 0, 0);

							ex->_param = 1;
							ex->_excFlags |= 3;
							ex->_x = cmd->_sceneClickX;
							ex->_y = cmd->_sceneClickY;
							ex->postMessage();
						}
					}
				} else {
					cmd->_messageKind = 0;
				}
			}
			return result;
		default:
			return result;
		}
	case 58:
		g_fp->setCursor(cmd->_param);
		return result;
	case 59:
		setInputDisabled(1);
		return result;
	case 60:
		setInputDisabled(0);
		return result;
	case 56:
		if (cmd->_field_2C) {
			ani = g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_param);
			if (ani) {
				getGameLoaderInventory()->addItem2(ani);
				result = 1;
			}
		} else {
			result = 1;
			getGameLoaderInventory()->addItem(cmd->_parentId, 1);
		}
		getGameLoaderInventory()->rebuildItemRects();
		return result;
	case 57:
		if (cmd->_field_2C) {
			if (!cmd->_field_20) {
				getGameLoaderInventory()->removeItem2(g_fp->_currentScene, cmd->_parentId, cmd->_x, cmd->_y, cmd->_field_14);
				getGameLoaderInventory()->rebuildItemRects();
				return 1;
			}
			ani = g_fp->_currentScene->getStaticANIObject1ById(g_fp->_gameLoader->_field_FA, -1);
			if (ani) {
				getGameLoaderInventory()->removeItem2(g_fp->_currentScene, cmd->_parentId, ani->_ox + cmd->_x, ani->_oy + cmd->_y, ani->_priority + cmd->_field_14);
				getGameLoaderInventory()->rebuildItemRects();
				return 1;
			}
		} else {
			getGameLoaderInventory()->removeItem(cmd->_parentId, 1);
		}
		getGameLoaderInventory()->rebuildItemRects();
		return 1;
	case 55:
		if (g_fp->_currentScene) {
			GameObject *obj;
			if (cmd->_field_14)
				obj = g_fp->_currentScene->getStaticANIObject1ById(cmd->_x, cmd->_y);
			else
				obj = g_fp->_currentScene->getPictureObjectById(cmd->_x, cmd->_y);
			handleObjectInteraction(g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_param), obj, cmd->_field_20);
			result = 1;
		}
		return result;
	case 51:
		return startWalkTo(cmd->_parentId, cmd->_param, cmd->_x, cmd->_y, cmd->_field_20);
	case 52:
		return doSomeAnimation(cmd->_parentId, cmd->_param, cmd->_field_20);
	case 53:
		return doSomeAnimation2(cmd->_parentId, cmd->_param);
	case 63:
		if (cmd->_objtype == kObjTypeObjstateCommand) {
			ObjstateCommand *c = (ObjstateCommand *)cmd;
			result = 1;
			g_fp->setObjectState(c->_objCommandName.c_str(), c->_value);
		}
		return result;
	default:
		return result;
	}
}
Beispiel #7
0
int sceneHandler15(ExCommand *cmd) {
	if (cmd->_messageKind != 17)
		return 0;

	switch(cmd->_messageNum) {
	case MSG_LIFT_CLOSEDOOR:
		g_fp->lift_closedoorSeq();
		break;

	case MSG_LIFT_EXITLIFT:
		g_fp->lift_exitSeq(cmd);
		break;

	case MSG_LIFT_STARTEXITQUEUE:
		g_fp->lift_startExitQueue();
		break;

	case MSG_SC4_HIDEBOOT:
		g_vars->scene15_boot->_flags &= 0xFFFB;
		break;

	case MSG_SC15_STOPCHANTING:
		g_fp->stopAllSoundInstances(SND_15_001);

		g_vars->scene15_chantingCountdown = 120;
		break;

	case MSG_SC15_ASSDRYG:
		if (g_fp->_rnd->getRandomNumber(1))
			g_fp->playSound(SND_15_011, 0);
		else
			g_fp->playSound(SND_15_006, 0);

		break;

	case MSG_SC15_LADDERTOBACK:
		g_vars->scene15_ladder->_priority = 60;
		break;

	case MSG_LIFT_GO:
		g_fp->lift_goAnimation();
		break;

	case MSG_LIFT_CLICKBUTTON:
		g_fp->lift_clickButton();
		break;

	case MSG_SC15_PULL:
		if (g_vars->scene15_plusminus->_statics->_staticsId == ST_PMS_MINUS)
			g_vars->scene15_plusminus->_statics = g_vars->scene15_plusminus->getStaticsById(ST_PMS_PLUS);
		else
			g_vars->scene15_plusminus->_statics = g_vars->scene15_plusminus->getStaticsById(ST_PMS_MINUS);

		break;

	case 64:
		g_fp->lift_hoverButton(cmd);
		break;

	case 29:
		{
			if (g_fp->_currentScene->getPictureObjectIdAtPos(cmd->_sceneClickX, cmd->_sceneClickY) == PIC_SC15_LADDER) {
				handleObjectInteraction(g_fp->_aniMan, g_fp->_currentScene->getPictureObjectById(PIC_SC15_DTRUBA, 0), cmd->_keyCode);
				cmd->_messageKind = 0;

				return 0;
			}

			StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(cmd->_sceneClickX, cmd->_sceneClickY);

			if (ani && ani->_id == ANI_LIFTBUTTON) {
				g_fp->lift_animateButton(ani);

				cmd->_messageKind = 0;
			}
			break;
		}

	case 30:
		// nop
		break;

	case 33:
		if (g_fp->_aniMan2) {
			int x = g_fp->_aniMan2->_ox;

			if (x < g_fp->_sceneRect.left + 200)
				g_fp->_currentScene->_x = x - 300 - g_fp->_sceneRect.left;

			if (x > g_fp->_sceneRect.right - 200)
				g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right;
		}

		if (g_vars->scene15_chantingCountdown > 0) {
			g_vars->scene15_chantingCountdown--;

			if (!g_vars->scene15_chantingCountdown)
				g_fp->playSound(SND_15_001, 1);
		}

		g_fp->_behaviorManager->updateBehaviors();
	}

	return 0;
}
Beispiel #8
0
int sceneHandler17(ExCommand *cmd) {
    if (cmd->_messageKind != 17)
        return 0;

    switch (cmd->_messageNum) {
    case MSG_SC17_DROP:
        sceneHandler17_drop();
        break;

    case MSG_SC17_UPDATEHAND:
        if (g_fp->getObjectState(sO_UsherHand) == g_fp->getObjectEnumState(sO_UsherHand, sO_WithCoin)) {
            g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene17_hand, ST_HND17_EMPTY, QU_HND17_ASK, 0);
            g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene17_hand, ST_HND17_EMPTY, QU_HND17_TOCYCLE, 0);

            g_vars->scene17_handPhase = false;
        } else {
            g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene17_hand, ST_HND17_EMPTY, QU_HND17_ASK, 0);
            g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene17_hand, ST_HND17_EMPTY, QU_HND17_TOCYCLE, 1);

            g_vars->scene17_handPhase = true;
        }
        break;

    case MSG_SC17_FILLBOTTLE:
        sceneHandler17_fillBottle();
        break;

    case MSG_SC17_TESTTRUBA:
        sceneHandler17_testTruba();
        break;

    case MSG_SC17_SHOWBOTTLE:
        sceneHandler17_showBottle();
        break;

    case MSG_SC17_HIDESUGAR:
        sceneHandler17_hideSugar();
        break;

    case MSG_SC17_SHOWSUGAR:
        sceneHandler17_showSugar();
        break;

    case 29:
    {
        int pic = g_fp->_currentScene->getPictureObjectIdAtPos(cmd->_sceneClickX, cmd->_sceneClickY);

        if (pic == PIC_SC17_RTRUBA2 || pic == PIC_SC17_RTRUBA) {
            if (cmd->_param == ANI_INV_COIN || cmd->_param == ANI_INV_BOOT || cmd->_param == ANI_INV_HAMMER) {
                if (g_vars->scene17_handPhase) {
                    if (g_fp->_aniMan->isIdle()) {
                        if (!(g_fp->_aniMan->_flags & 0x100)) {
                            handleObjectInteraction(g_fp->_aniMan, g_vars->scene17_hand, cmd->_param);
                            break;
                        }
                    }
                }
            }
        }
    }
    break;

    case 33:
    {
        int x = g_vars->scene17_sceneEdgeX;
        g_vars->scene17_sceneOldEdgeX = g_vars->scene17_sceneEdgeX;

        if (g_fp->_aniMan2) {
            x = g_fp->_aniMan2->_ox;

            g_vars->scene17_sceneEdgeX = x;

            if (x < g_fp->_sceneRect.left + 200) {
                g_fp->_currentScene->_x = x - 300 - g_fp->_sceneRect.left;

                x = g_vars->scene17_sceneEdgeX;
            }

            if (x > g_fp->_sceneRect.right - 200) {
                g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right;
                x = g_vars->scene17_sceneEdgeX;
            }
        }

        if (g_vars->scene17_sugarIsShown) {
            sceneHandler17_moonshineFill();
            x = g_vars->scene17_sceneEdgeX;
        }

        if (g_vars->scene17_handPhase) {
            if (g_vars->scene17_sceneOldEdgeX < 410 && x >= 410) {
                g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene17_hand, ST_HND17_EMPTY, QU_HND17_TOCYCLE, 0);
                g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene17_hand, ST_HND17_ATTRACT, QU_HND17_ATTRACT, 0);
                g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene17_hand, ST_HND17_EMPTY, QU_HND17_ASK, 1);
            } else if (g_vars->scene17_sceneOldEdgeX > 410 && x <= 410) {
                g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene17_hand, ST_HND17_EMPTY, QU_HND17_TOCYCLE, 1);
                g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene17_hand, ST_HND17_ATTRACT, QU_HND17_ATTRACT, 1);
                g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene17_hand, ST_HND17_EMPTY, QU_HND17_ASK, 0);
            }
        }

        --g_vars->scene17_flyCountdown;

        if (!g_vars->scene17_flyCountdown)
            sceneHandler17_updateFlies();

        g_fp->_floaters->update();

        g_fp->_behaviorManager->updateBehaviors();

        g_fp->startSceneTrack();

        break;
    }
    }

    return 0;
}
Beispiel #9
0
int sceneHandler03(ExCommand *ex) {
	if (ex->_messageKind != 17) {
		if (ex->_messageKind == 57)
			sceneHandler03_giveItem(ex);
		return 0;
	}

	switch (ex->_messageNum) {
	case MSG_LIFT_EXITLIFT:
		g_fp->lift_exitSeq(ex);
		break;

	case MSG_LIFT_CLOSEDOOR:
		g_fp->lift_closedoorSeq();
		break;

	case MSG_SC3_ONTAKECOIN:
		sceneHandler03_eaterFat();
		break;

	case MSG_LIFT_STARTEXITQUEUE:
		g_fp->lift_startExitQueue();
		break;

	case MSG_SC3_RELEASEEGG:
		sceneHandler03_releaseEgg();
		break;

	case MSG_LIFT_CLICKBUTTON:
		g_fp->lift_clickButton();
		break;

	case MSG_SC3_HIDEDOMINO:
		g_vars->scene03_domino->_flags &= 0xFFFB;
		break;

	case MSG_SC3_TAKEEGG:
		sceneHandler03_takeEgg(ex);
		break;

	case MSG_LIFT_GO:
		g_fp->lift_goAnimation();
		break;

	case MSG_SC3_UTRUBACLICK:
		sceneHandler03_goLadder();
		break;

	case MSG_SC3_TESTFAT:
		sceneHandler03_giveCoin(ex);
		break;

	case 64:
		g_fp->lift_hoverButton(ex);
		break;

	case 29:
		{
			StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(ex->_sceneClickX, ex->_sceneClickY);
			if (ani && ani->_id == ANI_LIFTBUTTON) {
				g_fp->lift_animateButton(ani);
				ex->_messageKind = 0;

				return 0;
			}

			if (g_fp->_currentScene->getPictureObjectIdAtPos(ex->_sceneClickX, ex->_sceneClickY) == PIC_SC3_DOMIN) {
				if (g_vars->scene03_domino)
					if (g_vars->scene03_domino->_flags & 4)
						if (g_fp->_aniMan->isIdle())
							if (!(g_fp->_aniMan->_flags & 0x100) && g_fp->_msgObjectId2 != g_vars->scene03_domino->_id) {
								handleObjectInteraction(g_fp->_aniMan, g_vars->scene03_domino, ex->_keyCode);
								ex->_messageKind = 0;

								return 0;
							}
			}

			break;
		}

	case 33:
		{
			int res = 0;

			if (g_fp->_aniMan2) {
				if (g_fp->_aniMan2->_ox < g_fp->_sceneRect.left + 200)
					g_fp->_currentScene->_x = g_fp->_aniMan2->_ox - g_fp->_sceneRect.left - 300;

				if (g_fp->_aniMan2->_ox > g_fp->_sceneRect.right - 200)
					g_fp->_currentScene->_x = g_fp->_aniMan2->_ox - g_fp->_sceneRect.right + 300;

				res = 1;
			}

			g_fp->_behaviorManager->updateBehaviors();

			g_fp->startSceneTrack();

			return res;
		}
	}

	return 0;
}
Beispiel #10
0
void sceneHandler03_goLadder() {
	handleObjectInteraction(g_fp->_aniMan, g_fp->_currentScene->getPictureObjectById(PIC_SC3_LADDER, 0), 0);
}
Beispiel #11
0
int sceneHandler10(ExCommand *ex) {
	if (ex->_messageKind != 17)
		return 0;

	switch(ex->_messageNum) {
	case MSG_LIFT_CLOSEDOOR:
		g_fp->lift_closedoorSeq();
        break;

	case MSG_LIFT_EXITLIFT:
		g_fp->lift_exitSeq(ex);
		break;

	case MSG_LIFT_STARTEXITQUEUE:
		g_fp->lift_startExitQueue();
		break;

	case MSG_LIFT_CLICKBUTTON:
		g_fp->lift_clickButton();
		break;

	case MSG_SC10_LADDERTOBACK:
        g_vars->scene10_ladder->_priority = 49;
		break;

	case MSG_SC10_LADDERTOFORE:
		g_vars->scene10_ladder->_priority = 0;
		break;

	case MSG_LIFT_GO:
		g_fp->lift_goAnimation();
		break;

	case MSG_SC10_CLICKGUM:
		sceneHandler10_clickGum();

		ex->_messageKind = 0;
		break;

	case MSG_SC10_HIDEGUM:
		sceneHandler10_hideGum();
		break;

	case MSG_SC10_SHOWGUM:
		sceneHandler10_showGum();
		break;

	case 64:
		g_fp->lift_sub05(ex);
		break;

	case 29:
		{
			if (g_fp->_currentScene->getPictureObjectIdAtPos(ex->_sceneClickX, ex->_sceneClickY) == PIC_SC10_LADDER) {
				handleObjectInteraction(g_fp->_aniMan, g_fp->_currentScene->getPictureObjectById(PIC_SC10_DTRUBA, 0), ex->_keyCode);
				ex->_messageKind = 0;

				return 0;
			}

			StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(ex->_sceneClickX, ex->_sceneClickY);

			if (ani && ani->_id == ANI_LIFTBUTTON) {
				g_fp->lift_sub1(ani);
				ex->_messageKind = 0;

				return 0;
			}
		}
		break;

	case 33:
		{
			int res = 0;

			if (g_fp->_aniMan2) {
				if (g_fp->_aniMan2->_ox < g_fp->_sceneRect.left + 200)
					g_fp->_currentScene->_x = g_fp->_aniMan2->_ox - g_fp->_sceneRect.left - 300;

				if (g_fp->_aniMan2->_ox > g_fp->_sceneRect.right - 200)
					g_fp->_currentScene->_x = g_fp->_aniMan2->_ox - g_fp->_sceneRect.right + 300;

				res = 1;
			}

			g_fp->_behaviorManager->updateBehaviors();
			g_fp->startSceneTrack();

			return res;
		}
	}

	return 0;
}