diff options
author | Eugene Sandulenko | 2014-01-02 15:14:17 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2014-01-02 15:14:17 +0200 |
commit | fcae83afad870dfa0b6986c1b6d2f151675d4218 (patch) | |
tree | 04c7357cb42fe7b7ee3d0f64ffc0ad62c25f17de /engines/fullpipe | |
parent | 3d949b1bdfbef9159188e1632ad63ae9f76c65c8 (diff) | |
download | scummvm-rg350-fcae83afad870dfa0b6986c1b6d2f151675d4218.tar.gz scummvm-rg350-fcae83afad870dfa0b6986c1b6d2f151675d4218.tar.bz2 scummvm-rg350-fcae83afad870dfa0b6986c1b6d2f151675d4218.zip |
FULLPIPE: Implement sceneHandler36()
Diffstat (limited to 'engines/fullpipe')
-rw-r--r-- | engines/fullpipe/scenes/scene36.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/engines/fullpipe/scenes/scene36.cpp b/engines/fullpipe/scenes/scene36.cpp index 744df72778..b973ec9ccd 100644 --- a/engines/fullpipe/scenes/scene36.cpp +++ b/engines/fullpipe/scenes/scene36.cpp @@ -57,4 +57,42 @@ int scene36_updateCursor() { return g_fp->_cursorId; } +int sceneHandler36(ExCommand *cmd) { + if (cmd->_messageKind != 17) + return 0; + + switch (cmd->_messageNum) { + case 29: + if (g_fp->_currentScene->getPictureObjectIdAtPos(cmd->_sceneClickX, cmd->_sceneClickY) == PIC_SC36_MASK) + if (g_vars->scene36_scissors) + if (g_vars->scene36_scissors->_flags & 4) + if (g_fp->_aniMan->isIdle()) + if (!(g_fp->_aniMan->_flags & 0x100) && g_fp->_msgObjectId2 != g_vars->scene36_scissors->_id ) { + handleObjectInteraction(g_fp->_aniMan, g_vars->scene36_scissors, cmd->_keyCode); + + cmd->_messageKind = 0; + } + + break; + + case 33: + if (g_fp->_aniMan2) { + int x = g_fp->_aniMan2->_ox; + + if (x < g_fp->_sceneRect.left + g_vars->scene36_var01) + g_fp->_currentScene->_x = x - g_vars->scene36_var03 - g_fp->_sceneRect.left; + + if (x > g_fp->_sceneRect.right - g_vars->scene36_var01) + g_fp->_currentScene->_x = x + g_vars->scene36_var03 - g_fp->_sceneRect.right; + } + + g_fp->_behaviorManager->updateBehaviors(); + g_fp->startSceneTrack(); + + break; + } + + return 0; +} + } // End of namespace Fullpipe |