mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 22:28:10 +00:00
FULLPIPE: Rename rest of vars on scene09. This completes the scene
This commit is contained in:
parent
0a6a76c478
commit
91146e51f5
@ -165,12 +165,9 @@ Vars::Vars() {
|
||||
scene09_gulperIsPresent = true;
|
||||
scene09_dudeIsOnLadder = false;
|
||||
scene09_interactingHanger = -1;
|
||||
scene09_var11 = -1;
|
||||
scene09_var12 = -1000;
|
||||
scene09_intHangerPhase = -1;
|
||||
scene09_intHangerMaxPhase = -1000;
|
||||
scene09_numMovingHangers = 0;
|
||||
scene09_var13 = 0;
|
||||
scene09_var15 = 0;
|
||||
scene09_var17 = 0;
|
||||
scene09_clickY = 0;
|
||||
scene09_hangerOffsets[0].x = 0;
|
||||
scene09_hangerOffsets[0].y = -15;
|
||||
|
@ -357,15 +357,12 @@ public:
|
||||
bool scene09_gulperIsPresent;
|
||||
bool scene09_dudeIsOnLadder;
|
||||
int scene09_interactingHanger;
|
||||
int scene09_var11;
|
||||
int scene09_var12;
|
||||
int scene09_intHangerPhase;
|
||||
int scene09_intHangerMaxPhase;
|
||||
BallChain scene09_balls;
|
||||
Common::Array<Hanger *> scene09_hangers;
|
||||
BallChain scene09_var07;
|
||||
BallChain scene09_flyingBalls;
|
||||
int scene09_numMovingHangers;
|
||||
int scene09_var13;
|
||||
int scene09_var15;
|
||||
int scene09_var17;
|
||||
int scene09_clickY;
|
||||
Common::Point scene09_hangerOffsets[4];
|
||||
|
||||
|
@ -66,11 +66,11 @@ void scene09_initScene(Scene *sc) {
|
||||
g_vars->scene09_gulperIsPresent = true;
|
||||
g_vars->scene09_dudeIsOnLadder = false;
|
||||
g_vars->scene09_interactingHanger = -1;
|
||||
g_vars->scene09_var11 = -1;
|
||||
g_vars->scene09_var12 = -1000;
|
||||
g_vars->scene09_intHangerPhase = -1;
|
||||
g_vars->scene09_intHangerMaxPhase = -1000;
|
||||
|
||||
g_vars->scene09_balls.cPlexLen = 10;
|
||||
g_vars->scene09_var07.cPlexLen = 10;
|
||||
g_vars->scene09_flyingBalls.cPlexLen = 10;
|
||||
|
||||
while (g_vars->scene09_balls.numBalls) {
|
||||
Ball *b = g_vars->scene09_balls.pHead->p0;
|
||||
@ -85,10 +85,7 @@ void scene09_initScene(Scene *sc) {
|
||||
g_vars->scene09_balls.init(&b);
|
||||
}
|
||||
|
||||
g_vars->scene09_var13 = 3;
|
||||
|
||||
g_vars->scene09_hangers.clear();
|
||||
g_vars->scene09_var15 = 4;
|
||||
g_vars->scene09_numMovingHangers = 4;
|
||||
|
||||
StaticANIObject *hanger = sc->getStaticANIObject1ById(ANI_VISUNCHIK, -1);
|
||||
@ -119,36 +116,36 @@ void scene09_initScene(Scene *sc) {
|
||||
g_vars->scene09_hangers.push_back(hng);
|
||||
}
|
||||
|
||||
while (g_vars->scene09_var07.numBalls) {
|
||||
Ball *ohead = g_vars->scene09_var07.pHead;
|
||||
while (g_vars->scene09_flyingBalls.numBalls) {
|
||||
Ball *ohead = g_vars->scene09_flyingBalls.pHead;
|
||||
|
||||
g_vars->scene09_var07.pHead = g_vars->scene09_var07.pHead->p0;
|
||||
g_vars->scene09_flyingBalls.pHead = g_vars->scene09_flyingBalls.pHead->p0;
|
||||
|
||||
if (g_vars->scene09_var07.pHead)
|
||||
if (g_vars->scene09_flyingBalls.pHead)
|
||||
ohead->p0->p1 = 0;
|
||||
else
|
||||
g_vars->scene09_var07.field_8 = 0;
|
||||
g_vars->scene09_flyingBalls.field_8 = 0;
|
||||
|
||||
ohead->p0 = g_vars->scene09_var07.pTail;
|
||||
ohead->p0 = g_vars->scene09_flyingBalls.pTail;
|
||||
|
||||
g_vars->scene09_var07.pTail = ohead;
|
||||
g_vars->scene09_flyingBalls.pTail = ohead;
|
||||
|
||||
g_vars->scene09_var07.numBalls--;
|
||||
g_vars->scene09_flyingBalls.numBalls--;
|
||||
}
|
||||
|
||||
g_vars->scene09_var07.reset();
|
||||
g_vars->scene09_flyingBalls.reset();
|
||||
|
||||
Ball *b9 = g_vars->scene09_var07.sub04(g_vars->scene09_var07.field_8, 0);
|
||||
Ball *b9 = g_vars->scene09_flyingBalls.sub04(g_vars->scene09_flyingBalls.field_8, 0);
|
||||
|
||||
b9->ani = sc->getStaticANIObject1ById(ANI_BALL9, -1);
|
||||
b9->ani->setAlpha(0xc8);
|
||||
|
||||
if (g_vars->scene09_var07.field_8) {
|
||||
g_vars->scene09_var07.field_8->p0 = b9;
|
||||
g_vars->scene09_var07.field_8 = b9;
|
||||
if (g_vars->scene09_flyingBalls.field_8) {
|
||||
g_vars->scene09_flyingBalls.field_8->p0 = b9;
|
||||
g_vars->scene09_flyingBalls.field_8 = b9;
|
||||
} else {
|
||||
g_vars->scene09_var07.pHead = b9;
|
||||
g_vars->scene09_var07.field_8 = b9;
|
||||
g_vars->scene09_flyingBalls.pHead = b9;
|
||||
g_vars->scene09_flyingBalls.field_8 = b9;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
@ -156,43 +153,43 @@ void scene09_initScene(Scene *sc) {
|
||||
|
||||
newball->setAlpha(0xc8);
|
||||
|
||||
Ball *runPtr = g_vars->scene09_var07.pTail;
|
||||
Ball *lastP = g_vars->scene09_var07.field_8;
|
||||
Ball *runPtr = g_vars->scene09_flyingBalls.pTail;
|
||||
Ball *lastP = g_vars->scene09_flyingBalls.field_8;
|
||||
|
||||
if (!g_vars->scene09_var07.pTail) {
|
||||
g_vars->scene09_var07.cPlex = (byte *)calloc(g_vars->scene09_var07.cPlexLen, sizeof(Ball));
|
||||
if (!g_vars->scene09_flyingBalls.pTail) {
|
||||
g_vars->scene09_flyingBalls.cPlex = (byte *)calloc(g_vars->scene09_flyingBalls.cPlexLen, sizeof(Ball));
|
||||
|
||||
byte *p1 = g_vars->scene09_var07.cPlex + (g_vars->scene09_var07.cPlexLen - 1) * sizeof(Ball);
|
||||
byte *p1 = g_vars->scene09_flyingBalls.cPlex + (g_vars->scene09_flyingBalls.cPlexLen - 1) * sizeof(Ball);
|
||||
|
||||
if (g_vars->scene09_var07.cPlexLen - 1 < 0) {
|
||||
runPtr = g_vars->scene09_var07.pTail;
|
||||
if (g_vars->scene09_flyingBalls.cPlexLen - 1 < 0) {
|
||||
runPtr = g_vars->scene09_flyingBalls.pTail;
|
||||
} else {
|
||||
runPtr = g_vars->scene09_var07.pTail;
|
||||
runPtr = g_vars->scene09_flyingBalls.pTail;
|
||||
|
||||
for (int j = 0; j < g_vars->scene09_var07.cPlexLen; j++) {
|
||||
for (int j = 0; j < g_vars->scene09_flyingBalls.cPlexLen; j++) {
|
||||
((Ball *)p1)->p1 = runPtr;
|
||||
runPtr = (Ball *)p1;
|
||||
|
||||
p1 -= sizeof(Ball);
|
||||
}
|
||||
|
||||
g_vars->scene09_var07.pTail = runPtr;
|
||||
g_vars->scene09_flyingBalls.pTail = runPtr;
|
||||
}
|
||||
}
|
||||
|
||||
g_vars->scene09_var07.pTail = runPtr->p0;
|
||||
g_vars->scene09_flyingBalls.pTail = runPtr->p0;
|
||||
runPtr->p1 = lastP;
|
||||
runPtr->p0 = 0;
|
||||
runPtr->ani = newball;
|
||||
|
||||
g_vars->scene09_var07.numBalls++;
|
||||
g_vars->scene09_flyingBalls.numBalls++;
|
||||
|
||||
if (g_vars->scene09_var07.field_8)
|
||||
g_vars->scene09_var07.field_8->p0 = runPtr;
|
||||
if (g_vars->scene09_flyingBalls.field_8)
|
||||
g_vars->scene09_flyingBalls.field_8->p0 = runPtr;
|
||||
else
|
||||
g_vars->scene09_var07.pHead = runPtr;
|
||||
g_vars->scene09_flyingBalls.pHead = runPtr;
|
||||
|
||||
g_vars->scene09_var07.field_8 = runPtr;
|
||||
g_vars->scene09_flyingBalls.field_8 = runPtr;
|
||||
|
||||
sc->addStaticANIObject(newball, 1);
|
||||
}
|
||||
@ -332,15 +329,15 @@ void sceneHandler09_eatBall() {
|
||||
}
|
||||
}
|
||||
|
||||
ball = g_vars->scene09_var07.sub04(g_vars->scene09_var07.field_8, 0);
|
||||
ball = g_vars->scene09_flyingBalls.sub04(g_vars->scene09_flyingBalls.field_8, 0);
|
||||
ball->ani = g_vars->scene09_flyingBall;
|
||||
|
||||
if (g_vars->scene09_var07.field_8)
|
||||
g_vars->scene09_var07.field_8->p0 = ball;
|
||||
if (g_vars->scene09_flyingBalls.field_8)
|
||||
g_vars->scene09_flyingBalls.field_8->p0 = ball;
|
||||
else
|
||||
g_vars->scene09_var07.pHead = ball;
|
||||
g_vars->scene09_flyingBalls.pHead = ball;
|
||||
|
||||
g_vars->scene09_var07.field_8 = ball;
|
||||
g_vars->scene09_flyingBalls.field_8 = ball;
|
||||
|
||||
g_vars->scene09_flyingBall = 0;
|
||||
g_vars->scene09_numSwallenBalls++;
|
||||
@ -364,29 +361,29 @@ void sceneHandler09_eatBall() {
|
||||
}
|
||||
|
||||
void sceneHandler09_showBall() {
|
||||
if (g_vars->scene09_var07.numBalls) {
|
||||
StaticANIObject *ani = g_vars->scene09_var07.pHead->ani;
|
||||
Ball *ph = g_vars->scene09_var07.pHead;
|
||||
g_vars->scene09_var07.pHead = ph->p0;
|
||||
if (g_vars->scene09_flyingBalls.numBalls) {
|
||||
StaticANIObject *ani = g_vars->scene09_flyingBalls.pHead->ani;
|
||||
Ball *ph = g_vars->scene09_flyingBalls.pHead;
|
||||
g_vars->scene09_flyingBalls.pHead = ph->p0;
|
||||
|
||||
if (g_vars->scene09_var07.pHead)
|
||||
if (g_vars->scene09_flyingBalls.pHead)
|
||||
ph->p0->p1 = 0;
|
||||
else
|
||||
g_vars->scene09_var07.field_8 = 0;
|
||||
g_vars->scene09_flyingBalls.field_8 = 0;
|
||||
|
||||
ph->p0 = g_vars->scene09_var07.pTail;
|
||||
ph->p0 = g_vars->scene09_flyingBalls.pTail;
|
||||
|
||||
g_vars->scene09_var07.pTail = ph;
|
||||
g_vars->scene09_var07.numBalls--;
|
||||
g_vars->scene09_flyingBalls.pTail = ph;
|
||||
g_vars->scene09_flyingBalls.numBalls--;
|
||||
|
||||
if (!g_vars->scene09_var07.numBalls) {
|
||||
g_vars->scene09_var07.numBalls = 0;
|
||||
g_vars->scene09_var07.pTail = 0;
|
||||
g_vars->scene09_var07.field_8 = 0;
|
||||
g_vars->scene09_var07.pHead = 0;
|
||||
if (!g_vars->scene09_flyingBalls.numBalls) {
|
||||
g_vars->scene09_flyingBalls.numBalls = 0;
|
||||
g_vars->scene09_flyingBalls.pTail = 0;
|
||||
g_vars->scene09_flyingBalls.field_8 = 0;
|
||||
g_vars->scene09_flyingBalls.pHead = 0;
|
||||
|
||||
free(g_vars->scene09_var07.cPlex);
|
||||
g_vars->scene09_var07.cPlex = 0;
|
||||
free(g_vars->scene09_flyingBalls.cPlex);
|
||||
g_vars->scene09_flyingBalls.cPlex = 0;
|
||||
}
|
||||
|
||||
Ball *ball = g_vars->scene09_balls.sub04(g_vars->scene09_balls.field_8, 0);
|
||||
@ -494,43 +491,43 @@ void sceneHandler09_ballExplode(Ball *ball) {
|
||||
if (!mq->chain(ball->ani))
|
||||
delete mq;
|
||||
|
||||
Ball *runPtr = g_vars->scene09_var07.pTail;
|
||||
Ball *lastP = g_vars->scene09_var07.field_8;
|
||||
Ball *runPtr = g_vars->scene09_flyingBalls.pTail;
|
||||
Ball *lastP = g_vars->scene09_flyingBalls.field_8;
|
||||
|
||||
if (!g_vars->scene09_var07.pTail) {
|
||||
g_vars->scene09_var07.cPlex = (byte *)calloc(g_vars->scene09_var07.cPlexLen, sizeof(Ball));
|
||||
if (!g_vars->scene09_flyingBalls.pTail) {
|
||||
g_vars->scene09_flyingBalls.cPlex = (byte *)calloc(g_vars->scene09_flyingBalls.cPlexLen, sizeof(Ball));
|
||||
|
||||
byte *p1 = g_vars->scene09_var07.cPlex + (g_vars->scene09_var07.cPlexLen - 1) * sizeof(Ball);
|
||||
byte *p1 = g_vars->scene09_flyingBalls.cPlex + (g_vars->scene09_flyingBalls.cPlexLen - 1) * sizeof(Ball);
|
||||
|
||||
if (g_vars->scene09_var07.cPlexLen - 1 < 0) {
|
||||
runPtr = g_vars->scene09_var07.pTail;
|
||||
if (g_vars->scene09_flyingBalls.cPlexLen - 1 < 0) {
|
||||
runPtr = g_vars->scene09_flyingBalls.pTail;
|
||||
} else {
|
||||
runPtr = g_vars->scene09_var07.pTail;
|
||||
runPtr = g_vars->scene09_flyingBalls.pTail;
|
||||
|
||||
for (int j = 0; j < g_vars->scene09_var07.cPlexLen; j++) {
|
||||
for (int j = 0; j < g_vars->scene09_flyingBalls.cPlexLen; j++) {
|
||||
((Ball *)p1)->p1 = runPtr;
|
||||
runPtr = (Ball *)p1;
|
||||
|
||||
p1 -= sizeof(Ball);
|
||||
}
|
||||
|
||||
g_vars->scene09_var07.pTail = runPtr;
|
||||
g_vars->scene09_flyingBalls.pTail = runPtr;
|
||||
}
|
||||
}
|
||||
|
||||
g_vars->scene09_var07.pTail = runPtr->p0;
|
||||
g_vars->scene09_flyingBalls.pTail = runPtr->p0;
|
||||
runPtr->p1 = lastP;
|
||||
runPtr->p0 = 0;
|
||||
runPtr->ani = ball->ani;
|
||||
|
||||
g_vars->scene09_var07.numBalls++;
|
||||
g_vars->scene09_flyingBalls.numBalls++;
|
||||
|
||||
if (g_vars->scene09_var07.field_8) {
|
||||
g_vars->scene09_var07.field_8->p0 = runPtr;
|
||||
g_vars->scene09_var07.field_8 = runPtr;
|
||||
if (g_vars->scene09_flyingBalls.field_8) {
|
||||
g_vars->scene09_flyingBalls.field_8->p0 = runPtr;
|
||||
g_vars->scene09_flyingBalls.field_8 = runPtr;
|
||||
} else {
|
||||
g_vars->scene09_var07.pHead = runPtr;
|
||||
g_vars->scene09_var07.field_8 = runPtr;
|
||||
g_vars->scene09_flyingBalls.pHead = runPtr;
|
||||
g_vars->scene09_flyingBalls.field_8 = runPtr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -575,16 +572,16 @@ void sceneHandler09_hangerStartCycle() {
|
||||
if (ani->_movement) {
|
||||
ani->startAnim(MV_VSN_CYCLE2, 0, -1);
|
||||
g_vars->scene09_hangers[g_vars->scene09_interactingHanger]->field_8 = 0;
|
||||
g_vars->scene09_hangers[g_vars->scene09_interactingHanger]->phase = g_vars->scene09_var11 + (g_fp->_mouseScreenPos.y - g_vars->scene09_clickY) / 2;
|
||||
g_vars->scene09_hangers[g_vars->scene09_interactingHanger]->phase = g_vars->scene09_intHangerPhase + (g_fp->_mouseScreenPos.y - g_vars->scene09_clickY) / 2;
|
||||
|
||||
if (g_vars->scene09_var12 != -1000 && g_vars->scene09_hangers[g_vars->scene09_interactingHanger]->phase != g_vars->scene09_var12) {
|
||||
if (g_vars->scene09_intHangerMaxPhase != -1000 && g_vars->scene09_hangers[g_vars->scene09_interactingHanger]->phase != g_vars->scene09_intHangerMaxPhase) {
|
||||
ExCommand *ex = new ExCommand(0, 35, SND_9_019, 0, 0, 0, 1, 0, 0, 0);
|
||||
|
||||
ex->_field_14 = 1;
|
||||
ex->_excFlags |= 2;
|
||||
ex->postMessage();
|
||||
|
||||
g_vars->scene09_var12 = -1000;
|
||||
g_vars->scene09_intHangerMaxPhase = -1000;
|
||||
}
|
||||
} else {
|
||||
g_vars->scene09_interactingHanger = -1;
|
||||
@ -662,8 +659,7 @@ int sceneHandler09(ExCommand *cmd) {
|
||||
if (g_vars->scene09_interactingHanger >= 0)
|
||||
sceneHandler09_hangerStartCycle();
|
||||
|
||||
if (!g_vars->scene09_var17)
|
||||
g_fp->_behaviorManager->updateBehaviors();
|
||||
g_fp->_behaviorManager->updateBehaviors();
|
||||
|
||||
g_fp->startSceneTrack();
|
||||
|
||||
@ -704,8 +700,8 @@ int sceneHandler09(ExCommand *cmd) {
|
||||
}
|
||||
|
||||
g_vars->scene09_interactingHanger = hng;
|
||||
g_vars->scene09_var11 = g_vars->scene09_hangers[hng]->phase;
|
||||
g_vars->scene09_var12 = g_vars->scene09_hangers[hng]->phase;
|
||||
g_vars->scene09_intHangerPhase = g_vars->scene09_hangers[hng]->phase;
|
||||
g_vars->scene09_intHangerMaxPhase = g_vars->scene09_hangers[hng]->phase;
|
||||
|
||||
g_vars->scene09_clickY = cmd->_y;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user