diff options
author | Eugene Sandulenko | 2014-01-17 13:46:39 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2014-01-17 13:46:39 +0200 |
commit | 8a2b186382c2df86f41bdf4f9d96add0e475551e (patch) | |
tree | d5f6b6a237e4ae2486dc76d8929e575e36421ff9 /engines/fullpipe/scenes/scene35.cpp | |
parent | 05360d66c5fee8bb5e6a7af5100147d3e4841f97 (diff) | |
download | scummvm-rg350-8a2b186382c2df86f41bdf4f9d96add0e475551e.tar.gz scummvm-rg350-8a2b186382c2df86f41bdf4f9d96add0e475551e.tar.bz2 scummvm-rg350-8a2b186382c2df86f41bdf4f9d96add0e475551e.zip |
FULLPIPE: Implement sceneHandler35_genFlies()
Diffstat (limited to 'engines/fullpipe/scenes/scene35.cpp')
-rw-r--r-- | engines/fullpipe/scenes/scene35.cpp | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/engines/fullpipe/scenes/scene35.cpp b/engines/fullpipe/scenes/scene35.cpp index 4cf7fb45d1..e63938e555 100644 --- a/engines/fullpipe/scenes/scene35.cpp +++ b/engines/fullpipe/scenes/scene35.cpp @@ -124,7 +124,34 @@ void sceneHandler35_startFlow() { } void sceneHandler35_genFlies() { - warning("STUB: sceneHandler35_genFlies()"); + StaticANIObject *fly = g_fp->_currentScene->getStaticANIObject1ById(ANI_FLY, -1); + + int xoff = 0; + if ((!fly || !(fly->_flags & 4)) && !(g_fp->_rnd->getRandomNumber(32767) % 30)) { + int x, y; + + if (g_fp->_rnd->getRandomNumber(1)) { + x = 600; + y = 0; + } else { + x = 0; + y = 600; + } + + int numFlies = g_fp->_rnd->getRandomNumber(3) + 1; + + while (numFlies--) { + g_fp->_floaters->genFlies(g_fp->_currentScene, g_fp->_rnd->getRandomNumber(55) + 1057, g_fp->_rnd->getRandomNumber(60) + x + xoff, 4, 1); + + xoff += 40; + + g_fp->_floaters->_array2[g_fp->_floaters->_array2.size() - 1]->val2 = 1084; + g_fp->_floaters->_array2[g_fp->_floaters->_array2.size() - 1]->val3 = y; + g_fp->_floaters->_array2[g_fp->_floaters->_array2.size() - 1]->val11 = 8.0; + } + + g_vars->scene35_var06 = 0; + } } int sceneHandler35(ExCommand *cmd) { |