diff options
author | Eugene Sandulenko | 2013-11-29 03:01:36 -0500 |
---|---|---|
committer | Eugene Sandulenko | 2013-11-29 03:01:36 -0500 |
commit | 43b5a0ebf90058b214fdbf02e2441b9da55047e3 (patch) | |
tree | 1d676629426b71d172a79fbcfb57d154290cf256 /engines | |
parent | 73612b897934fd33183ebf3f93658e30f24314cf (diff) | |
download | scummvm-rg350-43b5a0ebf90058b214fdbf02e2441b9da55047e3.tar.gz scummvm-rg350-43b5a0ebf90058b214fdbf02e2441b9da55047e3.tar.bz2 scummvm-rg350-43b5a0ebf90058b214fdbf02e2441b9da55047e3.zip |
FULLPIPE: Implement scene04_speakerCallback()
Diffstat (limited to 'engines')
-rw-r--r-- | engines/fullpipe/scenes/scene04.cpp | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp index 28a9b6fc00..f36dc48e8a 100644 --- a/engines/fullpipe/scenes/scene04.cpp +++ b/engines/fullpipe/scenes/scene04.cpp @@ -36,8 +36,27 @@ namespace Fullpipe { -void scene04_callback(int *param) { - warning("STUB: scene04_callback"); +static const int scene04_speakerPhases[] = { + 0, 1, 2, 3, -1, -1, + 0, 2, 3, -1, -1, -1, + 0, 2, -1, -1, -1, -1 +}; + +void scene04_speakerCallback(int *phase) { + if (g_vars->scene04_soundPlaying) { + if (g_vars->scene04_var17 >= 0) { + *phase = scene04_speakerPhases[g_vars->scene04_var17 + 6 * g_vars->scene04_var16]; + + g_vars->scene04_var17++; + + if (scene04_speakerPhases[g_vars->scene04_var17 + 6 * g_vars->scene04_var16] < 0) { + g_vars->scene04_var17 = 0; + g_vars->scene04_var16 = g_fullpipe->_rnd->getRandomNumber(2); + } + } else { + ++g_vars->scene04_var17; + } + } } void scene04_initScene(Scene *sc) { @@ -166,7 +185,7 @@ void scene04_initScene(Scene *sc) { g_vars->scene04_mamasha->hide(); g_vars->scene04_speaker = sc->getStaticANIObject1ById(ANI_SPEAKER_4, -1); - g_vars->scene04_speaker->_callback2 = scene04_callback; + g_vars->scene04_speaker->_callback2 = scene04_speakerCallback; g_vars->scene04_speaker->startAnim(MV_SPK4_PLAY, 0, -1); g_vars->scene04_var16 = 0; |