Skip to content

Commit

Permalink
FULLPIPE: Rename remaining vars in scene14. This completes the scene
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Jan 1, 2014
1 parent fb4bed0 commit 1e3509e
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 33 deletions.
10 changes: 5 additions & 5 deletions engines/fullpipe/scenes.cpp
Expand Up @@ -216,11 +216,11 @@ Vars::Vars() {
scene14_grandmaX = 0;
scene14_grandmaY = 0;
scene14_dude2X = 0;
scene14_var20 = 0;
scene14_var21 = 0;
scene14_var22 = 0;
scene14_var23 = 0;
scene14_var24 = 0;
scene14_ballDeltaX = 0;
scene14_ballDeltaY = 0;
scene14_ballX = 0;
scene14_ballY = 0;
scene14_hitsLeft = 0;

scene15_chantingCountdown = 0;
scene15_plusminus = 0;
Expand Down
10 changes: 5 additions & 5 deletions engines/fullpipe/scenes.h
Expand Up @@ -292,11 +292,11 @@ class Vars {
int scene14_grandmaX;
int scene14_grandmaY;
int scene14_dude2X;
int scene14_var20;
int scene14_var21;
int scene14_var22;
int scene14_var23;
int scene14_var24;
int scene14_ballDeltaX;
int scene14_ballDeltaY;
int scene14_ballX;
int scene14_ballY;
int scene14_hitsLeft;
Common::Point scene14_mouseCursorPos;

int scene15_chantingCountdown;
Expand Down
46 changes: 23 additions & 23 deletions engines/fullpipe/scenes/scene14.cpp
Expand Up @@ -210,14 +210,14 @@ void sceneHandler14_manKickBall() {
int val = (g_vars->scene14_grandmaX + 65 - (g_vars->scene14_dudeX - 85)) / -32;
int den = val;

g_vars->scene14_var22 = g_vars->scene14_dudeX - 85;
g_vars->scene14_var23 = g_vars->scene14_dudeY - 76;
g_vars->scene14_var20 = -32;
g_vars->scene14_ballX = g_vars->scene14_dudeX - 85;
g_vars->scene14_ballY = g_vars->scene14_dudeY - 76;
g_vars->scene14_ballDeltaX = -32;

if (!val)
den = 1;

g_vars->scene14_var21 = (g_vars->scene14_grandmaY - 102 - val * val / 2 - (g_vars->scene14_dudeY - 76)) / den;
g_vars->scene14_ballDeltaY = (g_vars->scene14_grandmaY - 102 - val * val / 2 - (g_vars->scene14_dudeY - 76)) / den;

g_vars->scene14_flyingBall->show1(g_vars->scene14_dudeX - 85, g_vars->scene14_dudeY - 76, -1, 0);
g_vars->scene14_flyingBall->startAnim(MV_BAL14_SPIN, 0, -1);
Expand All @@ -236,7 +236,7 @@ void sceneHandler14_showBallFly() {

if (g_vars->scene14_grandma->_movement) {
x = g_vars->scene14_grandma->_movement->_ox;
g_vars->scene14_var22 = x;
g_vars->scene14_ballX = x;
y = g_vars->scene14_grandma->_movement->_oy;
} else {
x = g_vars->scene14_grandmaX;
Expand All @@ -246,19 +246,19 @@ void sceneHandler14_showBallFly() {
x = x + 38;
y = y - 77;

g_vars->scene14_var20 = 32;
g_vars->scene14_ballDeltaX = 32;

int dist = (g_vars->scene14_dudeX - 16 - x) / 32;
int den = dist;

if (!dist)
den = 1;

g_vars->scene14_var22 = x + 32;
g_vars->scene14_var21 = (g_vars->scene14_dudeY - 40 - dist * dist / 2 - y) / den;
g_vars->scene14_var23 = g_vars->scene14_var21 + y;
g_vars->scene14_ballX = x + 32;
g_vars->scene14_ballDeltaY = (g_vars->scene14_dudeY - 40 - dist * dist / 2 - y) / den;
g_vars->scene14_ballY = g_vars->scene14_ballDeltaY + y;

g_vars->scene14_flyingBall->show1(x + 32, g_vars->scene14_var21 + y, MV_BAL14_SPIN, 0);
g_vars->scene14_flyingBall->show1(x + 32, g_vars->scene14_ballDeltaY + y, MV_BAL14_SPIN, 0);
g_vars->scene14_flyingBall->_priority = 5;
g_vars->scene14_flyingBall->startAnim(MV_BAL14_SPIN, 0, -1);

Expand Down Expand Up @@ -371,7 +371,7 @@ void sceneHandler14_startArcade() {
g_fp->_aniMan2 = 0;
g_vars->scene14_sceneDeltaX = 50;
g_vars->scene14_sceneDiffX = 100;
g_vars->scene14_var24 = 4;
g_vars->scene14_hitsLeft = 4;
g_vars->scene14_pink = 0;

chainQueue(QU_SC14_STARTARCADE, 0);
Expand Down Expand Up @@ -554,7 +554,7 @@ void sceneHandler14_dudeFall() {

sceneHandler14_grandmaJumpThrow();
}
++g_vars->scene14_var24;
++g_vars->scene14_hitsLeft;
}

void sceneHandler14_grandmaStepForward() {
Expand All @@ -574,7 +574,7 @@ void sceneHandler14_arcadeLogic() {
if (g_vars->scene14_dudeIsKicking)
sceneHandler14_clearCallback();

if (g_vars->scene14_var24 <= 1) {
if (g_vars->scene14_hitsLeft <= 1) {
setInputDisabled(1);

sceneHandler14_clearCallback();
Expand All @@ -584,13 +584,13 @@ void sceneHandler14_arcadeLogic() {

chainQueue(QU_SC14_WINARCADE, 1);

--g_vars->scene14_var24;
--g_vars->scene14_hitsLeft;
} else {
ExCommand *ex;

g_vars->scene14_grandma->changeStatics2(ST_GMA_SIT);

if (g_vars->scene14_var24 != 3 || g_vars->scene14_pink) {
if (g_vars->scene14_hitsLeft != 3 || g_vars->scene14_pink) {
MessageQueue *mq = new MessageQueue(g_fp->_globalMessageQueueList->compact());

ex = new ExCommand(ANI_GRANDMA, 1, MV_GMA_BACKOFF, 0, 0, 0, 1, 0, 0, 0);
Expand All @@ -617,22 +617,22 @@ void sceneHandler14_arcadeLogic() {
}

sceneHandler14_grandmaStepForward();
--g_vars->scene14_var24;
--g_vars->scene14_hitsLeft;
}
}

void sceneHandler14_animateBall() {
int x = g_vars->scene14_var20 + g_vars->scene14_var22;
int y = g_vars->scene14_var21 + g_vars->scene14_var23;
int x = g_vars->scene14_ballDeltaX + g_vars->scene14_ballX;
int y = g_vars->scene14_ballDeltaY + g_vars->scene14_ballY;

g_vars->scene14_var22 += g_vars->scene14_var20;
g_vars->scene14_var23 += g_vars->scene14_var21;
g_vars->scene14_ballX += g_vars->scene14_ballDeltaX;
g_vars->scene14_ballY += g_vars->scene14_ballDeltaY;

g_vars->scene14_var21++;
g_vars->scene14_ballDeltaY++;

if (g_vars->scene14_var21 - 1 + g_vars->scene14_var23 > 517) {
if (g_vars->scene14_ballDeltaY - 1 + g_vars->scene14_ballY > 517) {
if (x <= g_vars->scene14_dudeX - 16 ) {
if ( g_vars->scene14_var20 >= 0 || x >= g_vars->scene14_grandmaX + 65 || x <= g_vars->scene14_grandmaX - 135 || y <= g_vars->scene14_grandmaY - 102 ) {
if ( g_vars->scene14_ballDeltaX >= 0 || x >= g_vars->scene14_grandmaX + 65 || x <= g_vars->scene14_grandmaX - 135 || y <= g_vars->scene14_grandmaY - 102 ) {
if (g_vars->scene14_flyingBall->_movement)
g_vars->scene14_flyingBall->_movement->setOXY(x, y);
else
Expand Down

0 comments on commit 1e3509e

Please sign in to comment.