diff options
author | Eugene Sandulenko | 2013-12-25 23:49:18 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2013-12-25 23:49:18 +0200 |
commit | d5f2acb3b24680b3ad0e5c885fb6112c28c1a31b (patch) | |
tree | b01d3ef3303ba211a99ee4684934ccb17f44e4d8 | |
parent | da5cdd1c030ec6f7f9b41c3496700e47b8dadff1 (diff) | |
download | scummvm-rg350-d5f2acb3b24680b3ad0e5c885fb6112c28c1a31b.tar.gz scummvm-rg350-d5f2acb3b24680b3ad0e5c885fb6112c28c1a31b.tar.bz2 scummvm-rg350-d5f2acb3b24680b3ad0e5c885fb6112c28c1a31b.zip |
FULLPIPE: Started implementing sceneHandler11()
-rw-r--r-- | engines/fullpipe/scenes/scene11.cpp | 190 |
1 files changed, 190 insertions, 0 deletions
diff --git a/engines/fullpipe/scenes/scene11.cpp b/engines/fullpipe/scenes/scene11.cpp index d38bc9cee1..240eccf61b 100644 --- a/engines/fullpipe/scenes/scene11.cpp +++ b/engines/fullpipe/scenes/scene11.cpp @@ -141,4 +141,194 @@ void scene11_initScene(Scene *sc) { g_fp->setArcadeOverlay(PIC_CSR_ARCADE5); } +int sceneHandler11(ExCommand *cmd) { +#if 0 + if (cmd->_messageKind != 17) + return 0; + + switch (cmd->_messageNum) { + case MSG_CMN_WINARCADE: + sceneHandler11_winArcade(); + break; + + case MSG_SC11_SITSWINGER: + if (g_fp->getObjectState(sO_Swingie) == getObjectEnumState(sO_Swingie, sO_IsStandingInBoots) + || g_fp->getObjectState(sO_Swingie) == g_fp->getObjectEnumState(sO_Swingie, sO_IsStandingInCorner)) { + g_fp->setObjectState(sO_Swingie, g_fp->getObjectEnumState(sO_Swingie, sO_IsSitting)); + } + break; + + case MSG_SC11_MANCRY: + playSound(g_vars->scene11_var07, 0); + g_vars->scene11_var07 = 0; + break; + + case MSG_SC11_RESTARTMAN: + sceneHandler11_restartMan(); + break; + + case MSG_SC11_HITMAN: + sceneHandler11_hitMan(); + break; + + case MSG_SC11_MANTOSWING: + sceneHandler11_manToSwing(); + break; + + case MSG_SC11_PUTBOOT: + sceneHandler11_putBoot(); + break; + + case MSG_SC11_SHOWSWING: + sceneHandler11_showSwing(); + break; + + case 107: + if (g_vars->scene11_var02) + sceneHandler11_sub01(); + break; + + case 33: + { + if (!g_fp->_aniMan2) + goto LABEL_27; + + int x = g_fp->_aniMan2->_ox; + g_vars->scene11_var21 = g_fp->_aniMan2->_ox; + int y = g_fp->_aniMan2->_oy; + g_vars->scene11_var22 = g_fp->_aniMan2->_oy; + if (g_vars->scene11_var03) { + if (x > g_fp->_sceneRect.right - 200) + OffsetRect(&g_fp->_sceneRect, x - g_fp->_sceneRect.right + 200, 0); + goto LABEL_26; + } + if (g_vars->scene11_var04) { + g_fp->_currentScene->bg._x = g_fp->_sceneWidth - x; + if (g_vars->scene11_var21 < 910) + g_vars->scene11_var04 = 0; + LABEL_26: + v2 = 1; + LABEL_27: + if (g_vars->scene11_var20) { + if (g_fp->_sceneRect.left >= 534 && g_vars->scene11_var06 < 534) + sceneHandler11_sub06(); + g_vars->scene11_var06 = g_fp->_sceneRect.left; + } + if (!g_vars->scene11_var02) + goto LABEL_50; + v6 = g_vars->scene11_var16; + if (g_vars->scene11_var16 <= 0 || g_vars->scene11_var15 - g_vars->scene11_var16 <= 72) { + v7 = g_vars->scene11_var18; + } else { + sceneHandler11_sub02(); + v7 = 0; + v6 = 0; + g_vars->scene11_var18 = 0; + g_vars->scene11_var16 = 0; + } + if (!g_vars->scene11_var02) + goto LABEL_50; + if (g_vars->scene11_var17 == v7 || v6 <= 0 || g_vars->scene11_var15 - v6 <= 2) { + LABEL_49: + if (g_vars->scene11_var02) { + LABEL_61: + g_fp->_behaviorManager_updateBehaviors(); + g_fp->startSceneTrack(); + return v2; + } + LABEL_50: + if (g_vars->scene11_var19 + || 0.0 == g_vars->scene11_var10 + && (v8 = g_vars->scene11_dudeOnSwing->_movement) != 0 + && v8->_currDynamicPhaseIndex == 45 + && (g_vars->scene11_dudeOnSwing->changeStatics2(ST_KCH_STATIC), !g_vars->scene11_var02) + && g_vars->scene11_var19) { + if (!g_vars->scene11_swingie->_movement) { + if (g_vars->scene11_boots->_flags & 4 && g_vars->scene11_boots->_statics->_staticsId == ST_BTS11_2) { + sceneHandler11_sub07(); + BehaviorManager_updateBehaviors(&g_behaviorManager); + startSceneTrack(); + return v2; + } + g_vars->scene11_swingie->startAnim(MV_SWR_SWING, 0, -1); + } + } + goto LABEL_61; + } + if (v7 == 1) { + if (!g_vars->scene11_var17) { + sceneHandler11_sub03(); + LABEL_48: + g_vars->scene11_var16 = g_vars->scene11_var15; + goto LABEL_49; + } + } else { + if (v7 != 2) + goto LABEL_48; + if (!g_vars->scene11_var17) { + sceneHandler11_sub04(); + goto LABEL_48; + } + } + sceneHandler11_sub02(); + goto LABEL_48; + } + if (x >= g_fp->_sceneRect.left + 200) { + if (x <= g_fp->_sceneRect.right - 200) { + LABEL_18: + if (y < g_fp->_sceneRect.top + 200) { + g_fp->_currentScene->bg._y = y - g_fp->_sceneRect.top - 300; + y = g_vars->scene11_var22; + x = g_vars->scene11_var21; + } + if (y > g_fp->_sceneRect.bottom - 300) { + g_fp->_currentScene->bg._y = y - g_fp->_sceneRect.bottom + 300; + x = g_vars->scene11_var21; + } + if (x >= 940) + g_vars->scene11_var04 = 1; + goto LABEL_26; + } + g_fp->_currentScene->bg._x = x - g_fp->_sceneRect.right + 300; + } else { + g_fp->_currentScene->bg._x = x - g_fp->_sceneRect.left - 300; + } + y = g_vars->scene11_var22; + x = g_vars->scene11_var21; + goto LABEL_18; + } + + break; + + case 29: + if (g_vars->scene11_var19) { + if (g_fp->_currentScene->getStaticANIObjectAtPos(g_fp->_sceneRect.left + cmd->_x, g_fp->_sceneRect.top + cmd->_y) == g_vars->scene11_swingie && cmd->_keyCode == ANI_INV_BOOT) + sceneHandler11_putBoot(); + } else { + if (!g_vars->scene11_var02) + goto LABEL_69; + sceneHandler11_sub05(); + g_vars->scene11_var16 = g_vars->scene11_var15; + } + if (!g_vars->scene11_var02) { + LABEL_69: + v10 = (GameObject *)Scene_getStaticANIObjectAtPos(g_fp->_currentScene, cmd->_sceneClickX, cmd->_sceneClickY); + if (!v10 || !canInteractAny(&g_fp->_aniMan->go, v10, cmd->_keyCode)) { + v11 = Scene_getPictureObjectIdAtPos(g_fp->_currentScene, cmd->_sceneClickX, cmd->_sceneClickY); + v12 = (GameObject *)Scene_getPictureObjectById(g_fp->_currentScene, v11, 0); + if (!v12 || !canInteractAny(g_fp->_aniMan, v12, cmd->_keyCode)) { + if ((v13 = cmd->_sceneClickX, g_fp->_sceneRect.right - v13 < 47) && g_fp->_sceneRect.right < g_fp->_sceneWidth - 1 || v13 - g_fp->_sceneRect.left < 47 && g_fp->_sceneRect.left > 0) { + processArcade(cmd); + return 0; + } + } + } + return 0; + } + } +#endif + + return 0; +} + } // End of namespace Fullpipe |