diff options
author | Eugene Sandulenko | 2014-02-02 16:50:49 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2014-02-02 16:51:11 +0200 |
commit | b7ad4c39cd330512d185354bb422b42b0f1f0730 (patch) | |
tree | 714cb2317f747267d9a3394c0ff6a90614902564 | |
parent | 83d62181f0f29a8970f779c0c33bad57a7dc5fb4 (diff) | |
download | scummvm-rg350-b7ad4c39cd330512d185354bb422b42b0f1f0730.tar.gz scummvm-rg350-b7ad4c39cd330512d185354bb422b42b0f1f0730.tar.bz2 scummvm-rg350-b7ad4c39cd330512d185354bb422b42b0f1f0730.zip |
FULLPIPE: Implement scene27_updateCursor()
-rw-r--r-- | engines/fullpipe/scenes/scene27.cpp | 44 |
1 files changed, 30 insertions, 14 deletions
diff --git a/engines/fullpipe/scenes/scene27.cpp b/engines/fullpipe/scenes/scene27.cpp index 9dd8d2a0af..8d55a63193 100644 --- a/engines/fullpipe/scenes/scene27.cpp +++ b/engines/fullpipe/scenes/scene27.cpp @@ -47,9 +47,9 @@ void scene27_initScene(Scene *sc) { g_vars->scene27_batHandler = sc->getStaticANIObject1ById(ANI_BITAHANDLER, -1); g_vars->scene27_balls.numBalls = 0; - g_vars->scene27_balls.pPrev = 0; - g_vars->scene27_balls.pNext = 0; - g_vars->scene27_balls.ball = 0; + g_vars->scene27_balls.pTail = 0; + g_vars->scene27_balls.field_8 = 0; + g_vars->scene27_balls.pHead = 0; CPlex::FreeDataChain(g_vars->scene27_balls.cPlex); g_vars->scene27_balls.cPlex = 0; scene27_bats.clear(); @@ -61,16 +61,16 @@ void scene27_initScene(Scene *sc) { for (int i = 0; i < 4; i++) { StaticANIObject *newbat = new StaticANIObject(g_vars->scene27_bat); - v5 = g_vars->scene27_balls.pPrev; - v6 = g_vars->scene27_balls.pNext; + v5 = g_vars->scene27_balls.pTail; + v6 = g_vars->scene27_balls.field_8; - if (!g_vars->scene27_balls.pPrev) { + if (!g_vars->scene27_balls.pTail) { v7 = CPlex::Create(&g_vars->scene27_balls.cPlex, g_vars->scene27_balls.cPlexLen, 12) + 4 + 12 * g_vars->scene27_balls.cPlexLen - 12; if (g_vars->scene27_balls.cPlexLen - 1 < 0) { - v5 = g_vars->scene27_balls.pPrev; + v5 = g_vars->scene27_balls.pTail; } else { v8 = g_vars->scene27_balls.cPlexLen; - v5 = g_vars->scene27_balls.pPrev; + v5 = g_vars->scene27_balls.pTail; do { *(_DWORD *)v7 = v5; v5 = (Ball *)v7; @@ -78,22 +78,22 @@ void scene27_initScene(Scene *sc) { --v8; } while (v8); - g_vars->scene27_balls.pPrev = v5; + g_vars->scene27_balls.pTail = v5; } } - g_vars->scene27_balls.pPrev = v5->pNext; + g_vars->scene27_balls.pTail = v5->pNext; v5->pPrev = v6; v5->pNext = 0; ++g_vars->scene27_balls.numBalls; v5->ani = 0; v5->ani = newbat; - if (g_vars->scene27_balls.pNext) - g_vars->scene27_balls.pNext->pNext = v5; + if (g_vars->scene27_balls.field_8) + g_vars->scene27_balls.field_8->pNext = v5; else - g_vars->scene27_balls.ball = v5; - g_vars->scene27_balls.pNext = v5; + g_vars->scene27_balls.pHead = v5; + g_vars->scene27_balls.field_8 = v5; sc->addStaticANIObject(newbat, 1); } @@ -122,4 +122,20 @@ void scene27_initScene(Scene *sc) { g_fp->setArcadeOverlay(PIC_CSR_ARCADE7); } +int scene27_updateCursor() { + g_fp->updateCursorCommon(); + + if (g_vars->scene27_var08) { + if (g_fp->_cursorId != PIC_CSR_DEFAULT_INV && g_fp->_cursorId != PIC_CSR_ITN_INV) + g_fp->_cursorId = PIC_CSR_ARCADE7_D; + + } else if (g_fp->_objectIdAtCursor == ANI_MAN) { + if (g_vars->scene27_var09) + if (g_fp->_cursorId == PIC_CSR_DEFAULT) + g_fp->_cursorId = PIC_CSR_ITN; + } + + return g_fp->_cursorId; +} + } // End of namespace Fullpipe |