Skip to content

Commit

Permalink
FULLPIPE: Implement sceneHandler35_genFlies()
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Jan 17, 2014
1 parent 05360d6 commit 8a2b186
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion engines/fullpipe/scenes/scene35.cpp
Expand Up @@ -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) {
Expand Down

0 comments on commit 8a2b186

Please sign in to comment.