aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/scenes
diff options
context:
space:
mode:
authorEugene Sandulenko2014-03-31 23:10:37 +0300
committerEugene Sandulenko2014-03-31 23:10:55 +0300
commitee9ad6cfb5a75e1bf76a49b7d2bd36ea76dd7994 (patch)
treea375d1ceb40160f3322c0a36acda38c26c8763af /engines/fullpipe/scenes
parent2eed6daf72468fdcf5ef0a0ab54871e7d3943ff6 (diff)
downloadscummvm-rg350-ee9ad6cfb5a75e1bf76a49b7d2bd36ea76dd7994.tar.gz
scummvm-rg350-ee9ad6cfb5a75e1bf76a49b7d2bd36ea76dd7994.tar.bz2
scummvm-rg350-ee9ad6cfb5a75e1bf76a49b7d2bd36ea76dd7994.zip
FULLPIPE: Implement sceneHandler29_animBearded()
Diffstat (limited to 'engines/fullpipe/scenes')
-rw-r--r--engines/fullpipe/scenes/scene29.cpp86
1 files changed, 85 insertions, 1 deletions
diff --git a/engines/fullpipe/scenes/scene29.cpp b/engines/fullpipe/scenes/scene29.cpp
index 8d0fb5d6e1..3fe1cac4e7 100644
--- a/engines/fullpipe/scenes/scene29.cpp
+++ b/engines/fullpipe/scenes/scene29.cpp
@@ -498,7 +498,91 @@ void sceneHandler29_shoot() {
}
void sceneHandler29_animBearded() {
- warning("STUB: sceneHandler29_animBearded()");
+ MessageQueue *mq;
+
+ for (uint i = 0; i < g_vars->scene29_var19.size(); i++) {
+ StaticANIObject *ani = g_vars->scene29_var19[i]->ani;
+
+ if (g_vars->scene29_var19[i]->wbflag) {
+ int x = ani->_ox;
+ int y = ani->_oy;
+
+ if (!ani->_movement && ani->_statics->_staticsId == (ST_BRDCMN_RIGHT | 0x4000)) {
+ x -= 4;
+
+ if (x - g_vars->scene29_var20 < 100 || !g_vars->scene29_var10) {
+ mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC29_BRDOUT1), 0, 1);
+
+ mq->replaceKeyCode(-1, ani->_okeyCode);
+ mq->chain(0);
+
+ g_vars->scene29_var19[i]->wbflag = 0;
+ g_vars->scene29_var19[i]->wbcounter = 0;
+ }
+ }
+
+ if (!ani->_movement && ani->_statics->_staticsId == ST_BRDCMN_GOR)
+ ani->startAnim(MV_BRDCMN_GOR, 0, -1);
+
+ if (ani->_movement) {
+ if (ani->_movement->_id == MV_BRDCMN_GOR) {
+ x -= 4;
+
+ if (g_vars->scene29_var20 - x < 60 || x - g_vars->scene29_var20 < -260 || !g_vars->scene29_var10) {
+ ani->changeStatics2(ST_BRDCMN_RIGHT);
+
+ mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC29_BRDOUT2), 0, 1);
+
+ mq->replaceKeyCode(-1, ani->_okeyCode);
+ mq->chain(0);
+
+ g_vars->scene29_var19[i]->wbflag = 0;
+ g_vars->scene29_var19[i]->wbcounter = 0;
+ }
+ }
+ }
+
+ ani->setOXY(x, y);
+ continue;
+ }
+
+ if (g_vars->scene29_var10 && g_vars->scene29_var19[i]->wbcounter > 30) {
+ int newx;
+
+ if (g_fp->_rnd->getRandomNumber(1))
+ goto dostuff;
+
+ if (g_vars->scene29_var20 <= 700) {
+ g_vars->scene29_var19[i]->wbcounter++;
+ continue;
+ }
+
+ if (g_vars->scene29_var20 >= 1100) {
+ dostuff:
+ if (g_vars->scene29_var20 <= 700 || g_vars->scene29_var20 >= 1350) {
+ g_vars->scene29_var19[i]->wbcounter++;
+ continue;
+ }
+
+ mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC29_BRD2), 0, 1);
+
+ newx = g_vars->scene29_var20 - 200;
+ } else {
+ mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC29_BRD1), 0, 1);
+
+ newx = g_vars->scene29_var20 + 350;
+ }
+
+ mq->getExCommandByIndex(0)->_x = newx;
+ mq->replaceKeyCode(-1, ani->_okeyCode);
+ mq->chain(0);
+
+ g_vars->scene29_var19[i]->wbflag = 1;
+ g_vars->scene29_var19[i]->wbcounter = 0;
+ }
+
+ g_vars->scene29_var19[i]->wbcounter++;
+ }
}