[Scummvm-git-logs] scummvm master -> 9fd9a96e7c67a17d75ca33cb4bf78f25747e3e05
Strangerke
noreply at scummvm.org
Thu Jan 23 22:03:17 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
9fd9a96e7c GOT: More renaming in vars.h
Commit: 9fd9a96e7c67a17d75ca33cb4bf78f25747e3e05
https://github.com/scummvm/scummvm/commit/9fd9a96e7c67a17d75ca33cb4bf78f25747e3e05
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2025-01-23T23:03:06+01:00
Commit Message:
GOT: More renaming in vars.h
Changed paths:
engines/got/events.cpp
engines/got/game/boss1.cpp
engines/got/game/boss2.cpp
engines/got/game/boss3.cpp
engines/got/game/move.cpp
engines/got/game/move_patterns.cpp
engines/got/game/object.cpp
engines/got/game/shot_movement.cpp
engines/got/game/shot_pattern.cpp
engines/got/game/special_tile.cpp
engines/got/gfx/image.cpp
engines/got/vars.h
diff --git a/engines/got/events.cpp b/engines/got/events.cpp
index 702e231e0df..b15363048b2 100644
--- a/engines/got/events.cpp
+++ b/engines/got/events.cpp
@@ -104,8 +104,8 @@ void Events::nextFrame() {
_G(rand1) = getRandomNumber(99);
_G(rand2) = getRandomNumber(99);
_G(pge) = _G(pge) ^ 1;
- _G(shot_ok) = true;
- _G(magic_cnt++);
+ _G(shotOk) = true;
+ _G(magicCounter++);
// In demo mode, handle the next key
if (_G(demo) && focusedView()->getName() == "Game") {
diff --git a/engines/got/game/boss1.cpp b/engines/got/game/boss1.cpp
index 82a286affba..2dba2ab9b1a 100644
--- a/engines/got/game/boss1.cpp
+++ b/engines/got/game/boss1.cpp
@@ -70,7 +70,7 @@ int boss1Movement(Actor *actor) {
// Strike
if (actor->_temp1) {
actor->_temp1--;
- if (actor->_x < (_G(thor_x1) + 12))
+ if (actor->_x < (_G(thorX1) + 12))
actor->_temp1 = 0;
actor->_temp2 = 1;
d = 2;
@@ -102,7 +102,7 @@ int boss1Movement(Actor *actor) {
actor->_temp2 = 0;
}
- if (actor->_x > _G(thor_x1) && ABS((_G(thor_y1)) - (actor->_y + 20)) < 8) {
+ if (actor->_x > _G(thorX1) && ABS((_G(thorY1)) - (actor->_y + 20)) < 8) {
actor->_temp3 = 75;
actor->_temp1 = 130;
actor->_temp2 = 0;
diff --git a/engines/got/game/boss2.cpp b/engines/got/game/boss2.cpp
index 6c90eee64f4..523bc1dd88b 100644
--- a/engines/got/game/boss2.cpp
+++ b/engines/got/game/boss2.cpp
@@ -213,7 +213,7 @@ void boss2SetupLevel() {
_G(boss_active) = true;
musicPause();
playSound(BOSS11, true);
- _G(timer_cnt) = 0;
+ _G(timerCounter) = 0;
dropFlag = false;
Common::fill(su, su + 18, 0);
diff --git a/engines/got/game/boss3.cpp b/engines/got/game/boss3.cpp
index 45393b84673..908a1e44999 100644
--- a/engines/got/game/boss3.cpp
+++ b/engines/got/game/boss3.cpp
@@ -137,8 +137,7 @@ static int boss3Movement1(Actor *actor) {
while (true) {
rx = g_events->getRandomNumber(255) + 16;
ry = g_events->getRandomNumber(143);
- if (!overlap(rx, ry, rx + 32, ry + 32, _G(thor_x1), _G(thor_y1),
- _G(thor_x2), _G(thor_y2)))
+ if (!overlap(rx, ry, rx + 32, ry + 32, _G(thorX1), _G(thorY1), _G(thorX2), _G(thorY2)))
break;
}
@@ -477,7 +476,7 @@ void boss3SetupLevel() {
_G(boss_active) = true;
musicPause();
playSound(BOSS11, true);
- _G(timer_cnt) = 0;
+ _G(timerCounter) = 0;
g_events->send("Game", GameMessage("PAUSE", 40));
@@ -565,7 +564,7 @@ void endingScreen() {
_G(actor[i])._moveType = 1;
musicPlay(6, true);
- _G(timer_cnt) = 0;
+ _G(timerCounter) = 0;
memset(expf, 0, 4 * 8);
_G(endgame) = 1;
diff --git a/engines/got/game/move.cpp b/engines/got/game/move.cpp
index bbbf4ee6853..d359e7b93bd 100644
--- a/engines/got/game/move.cpp
+++ b/engines/got/game/move.cpp
@@ -270,7 +270,7 @@ int _actor_shoots(Actor *actor, int dir) {
actor->_shotActor = i;
actor->_currNumShots++;
actor->_shotCountdown = 20;
- _G(shot_ok) = false;
+ _G(shotOk) = false;
return 1;
}
}
@@ -337,12 +337,8 @@ void moveActor(Actor *actor) {
if (actor->_show != 0)
actor->_show--;
- if (!actor->_shotCountdown && _G(shot_ok)) {
- if (actor->_numShotsAllowed) {
- if (actor->_currNumShots < actor->_numShotsAllowed) {
- shotPatternFunc[actor->_shotPattern](actor);
- }
- }
+ if (!actor->_shotCountdown && _G(shotOk) && actor->_numShotsAllowed && actor->_currNumShots < actor->_numShotsAllowed) {
+ shotPatternFunc[actor->_shotPattern](actor);
}
const int scount = actor->_moveCountdown - 1;
diff --git a/engines/got/game/move_patterns.cpp b/engines/got/game/move_patterns.cpp
index 3a48d51935c..96a41423a17 100644
--- a/engines/got/game/move_patterns.cpp
+++ b/engines/got/game/move_patterns.cpp
@@ -490,7 +490,7 @@ int checkMove2(const int x, const int y, Actor *actor) {
continue; // Shot
if (i == 0) {
- if (overlap(x1, y1, x2, y2, _G(thor_x1), _G(thor_y1), _G(thor_x2), _G(thor_y2))) {
+ if (overlap(x1, y1, x2, y2, _G(thorX1), _G(thorY1), _G(thorX2), _G(thorY2))) {
thorDamaged(actor);
return 0;
}
@@ -557,7 +557,7 @@ int checkMove3(const int x, const int y, Actor *actor) {
x2 = (x + actor->_sizeX) - 1;
y2 = (y + actor->_sizeY) - 1;
- if (overlap(x1, y1, x2, y2, _G(thor_x1), _G(thor_real_y1), _G(thor_x2), _G(thor_y2))) {
+ if (overlap(x1, y1, x2, y2, _G(thorX1), _G(thorRealY1), _G(thorX2), _G(thorY2))) {
thorDamaged(actor);
return 0;
}
@@ -597,7 +597,7 @@ int checkMove4(const int x, const int y, Actor *actor) {
if (x < 0 || x > (319 - actor->_sizeX) || y < 0 || y > 175)
return 0;
if (overlap(x, y, x + actor->_sizeX - 1, y + actor->_sizeY - 1,
- _G(thor_x1), _G(thor_y1), _G(thor_x2), _G(thor_y2))) {
+ _G(thorX1), _G(thorY1), _G(thorX2), _G(thorY2))) {
if (actor->_type == 3)
thorDamaged(actor);
return 0;
@@ -690,7 +690,7 @@ int movementZero(Actor *actor) {
setThorVars();
if (_G(hammer)->_active && _G(hammer)->_moveType == 5) {
- if (overlap(_G(thor_x1), _G(thor_y1), _G(thor_x2), _G(thor_y2),
+ if (overlap(_G(thorX1), _G(thorY1), _G(thorX2), _G(thorY2),
_G(hammer)->_x, _G(hammer)->_y, _G(hammer)->_x + 13, _G(hammer)->_y + 13)) {
actorDestroyed(_G(hammer));
}
@@ -873,7 +873,7 @@ int checkSpecialMove1(const int x, const int y, Actor *actor) {
continue;
x4 = act->_x + act->_sizeX;
y4 = act->_y + act->_sizeY;
- if (overlap(_G(thor_x1), _G(thor_y1), _G(thor_x2), _G(thor_y2), x3, y3, x4, y4))
+ if (overlap(_G(thorX1), _G(thorY1), _G(thorX2), _G(thorY2), x3, y3, x4, y4))
return 0;
}
actor->_x = x;
@@ -1004,28 +1004,28 @@ int specialMovementFive(Actor *actor) {
if (_G(diagFlag)) {
switch (_G(diag)) {
case 1:
- if (_G(thor_x1) < (actor->_x + 15))
+ if (_G(thorX1) < (actor->_x + 15))
d = 0;
else
d = 2;
break;
case 2:
- if (_G(thor_x2) < actor->_x)
+ if (_G(thorX2) < actor->_x)
d = 3;
else
d = 0;
break;
case 3:
- if (_G(thor_x2) > (actor->_x))
+ if (_G(thorX2) > (actor->_x))
d = 1;
else
d = 3;
break;
case 4:
- if (_G(thor_x1) > (actor->_x + 15))
+ if (_G(thorX1) > (actor->_x + 15))
d = 2;
else
d = 1;
@@ -1211,11 +1211,11 @@ int movementFour(Actor *actor) {
int y1 = actor->_y;
int f = 0;
- if (x1 > _G(thor_x1) - 1) {
+ if (x1 > _G(thorX1) - 1) {
x1 -= 2;
d = 2;
f = 1;
- } else if (x1 < _G(thor_x1) - 1) {
+ } else if (x1 < _G(thorX1) - 1) {
x1 += 2;
d = 3;
f = 1;
@@ -1225,15 +1225,15 @@ int movementFour(Actor *actor) {
f = checkMove2(x1, y1, actor);
if (!f) {
- if (y1 < (_G(thor_real_y1))) {
- d = (_G(thor_real_y1)) - y1;
+ if (y1 < (_G(thorRealY1))) {
+ d = (_G(thorRealY1)) - y1;
if (d > 2)
d = 2;
y1 += d;
d = 1;
f = 1;
- } else if (y1 > (_G(thor_real_y1))) {
- d = y1 - (_G(thor_real_y1));
+ } else if (y1 > (_G(thorRealY1))) {
+ d = y1 - (_G(thorRealY1));
if (d > 2)
d = 2;
y1 -= d;
@@ -1265,14 +1265,14 @@ int movementFive(Actor *actor) {
xd = 2;
if (actor->_actorNum == 1) {
- if (y1 < (_G(thor_y1) - 6))
+ if (y1 < (_G(thorY1) - 6))
yd = 2;
- else if (y1 > (_G(thor_y1) - 6))
+ else if (y1 > (_G(thorY1) - 6))
yd = -2;
} else {
- if (y1 < (_G(thor_real_y1) - 1))
+ if (y1 < (_G(thorRealY1) - 1))
yd = 2;
- else if (y1 > (_G(thor_real_y1) + 1))
+ else if (y1 > (_G(thorRealY1) + 1))
yd = -2;
}
@@ -2179,12 +2179,12 @@ int movementTwentySeven(Actor *actor) {
}
void setThorVars() {
- _G(thor_x1) = _G(thor)->_x + 1;
- _G(thor_y1) = _G(thor)->_y + 8;
+ _G(thorX1) = _G(thor)->_x + 1;
+ _G(thorY1) = _G(thor)->_y + 8;
- _G(thor_real_y1) = _G(thor)->_y;
- _G(thor_x2) = (_G(thor)->_x + 12);
- _G(thor_y2) = _G(thor)->_y + 15;
+ _G(thorRealY1) = _G(thor)->_y;
+ _G(thorX2) = (_G(thor)->_x + 12);
+ _G(thorY2) = _G(thor)->_y + 15;
}
// Fish
@@ -2321,7 +2321,7 @@ int movementThirtyOne(Actor *actor) {
y1 += 2;
if (!checkMove2(x1, y1, actor))
actorDestroyed(actor);
- } else if (_G(thor_y1) > y1 && ABS(x1 - _G(thor_x1)) < 16) {
+ } else if (_G(thorY1) > y1 && ABS(x1 - _G(thorX1)) < 16) {
const int cx = (actor->_x + (actor->_sizeX / 2)) >> 4;
const int cy = ((actor->_y + actor->_sizeY) - 2) >> 4;
const int ty = _G(thor)->_centerY;
@@ -2543,7 +2543,7 @@ int movementThirtyNine(Actor *actor) {
if (actor->_passValue == 10) {
if (overlap(actor->_x + 1, actor->_y + 1, actor->_x + actor->_sizeX - 1,
- actor->_y + actor->_sizeY - 1, _G(thor_x1), _G(thor_y1), _G(thor_x2), _G(thor_y2))) {
+ actor->_y + actor->_sizeY - 1, _G(thorX1), _G(thorY1), _G(thorX2), _G(thorY2))) {
actor->_hitStrength = 255;
thorDamaged(actor);
}
@@ -2572,7 +2572,7 @@ int movementThirtyNine(Actor *actor) {
// Troll 2
int movementForty(Actor *actor) {
if (overlap(actor->_x + 1, actor->_y + 1, actor->_x + actor->_sizeX + 3,
- actor->_y + actor->_sizeY - 1, _G(thor_x1), _G(thor_y1), _G(thor_x2), _G(thor_y2))) {
+ actor->_y + actor->_sizeY - 1, _G(thorX1), _G(thorY1), _G(thorX2), _G(thorY2))) {
actor->_hitStrength = 150;
thorDamaged(actor);
}
diff --git a/engines/got/game/object.cpp b/engines/got/game/object.cpp
index c2d4e3b0ede..8d75f41de1d 100644
--- a/engines/got/game/object.cpp
+++ b/engines/got/game/object.cpp
@@ -218,12 +218,12 @@ bool useApple(int flag) {
if (flag && _G(thor_info)._magic > 0) {
if (!_G(apple_flag)) {
- _G(magic_cnt) = 0;
+ _G(magicCounter) = 0;
addMagic(-2);
addHealth(1);
playSound(ANGEL, false);
- } else if (_G(magic_cnt) > 8) {
- _G(magic_cnt) = 0;
+ } else if (_G(magicCounter) > 8) {
+ _G(magicCounter) = 0;
addMagic(-2);
addHealth(1);
if (!soundPlaying())
@@ -263,10 +263,10 @@ bool useBoots(int flag) {
if (flag) {
if (_G(thor_info)._magic > 0) {
if (_G(thor)->_numMoves == 1) {
- _G(magic_cnt) = 0;
+ _G(magicCounter) = 0;
addMagic(-1);
- } else if (_G(magic_cnt) > 8) {
- _G(magic_cnt) = 0;
+ } else if (_G(magicCounter) > 8) {
+ _G(magicCounter) = 0;
addMagic(-1);
}
_G(thor)->_numMoves = 2;
@@ -289,7 +289,7 @@ bool useShield(int flag) {
if (flag) {
if (_G(thor_info)._magic) {
if (!_G(shield_on)) {
- _G(magic_cnt) = 0;
+ _G(magicCounter) = 0;
addMagic(-1);
setupMagicItem(1);
@@ -298,8 +298,8 @@ bool useShield(int flag) {
_G(actor[2])._moveCountdown = 1;
_G(actor[2])._speed = 1;
_G(shield_on) = true;
- } else if (_G(magic_cnt) > 8) {
- _G(magic_cnt) = 0;
+ } else if (_G(magicCounter) > 8) {
+ _G(magicCounter) = 0;
addMagic(-1);
}
@@ -334,8 +334,8 @@ bool useLightning(int flag) {
bool useTornado(int flag) {
if (flag) {
if (_G(thor_info)._magic > 10) {
- if (!_G(tornado_used) && !_G(actor[2])._dead && _G(magic_cnt) > 20) {
- _G(magic_cnt) = 0;
+ if (!_G(tornado_used) && !_G(actor[2])._dead && _G(magicCounter) > 20) {
+ _G(magicCounter) = 0;
addMagic(-10);
setupMagicItem(0);
_G(actor[2]) = _G(magic_item[0]);
@@ -350,9 +350,9 @@ bool useTornado(int flag) {
notEnoughMagic();
return false;
}
- if (_G(magic_cnt) > 8) {
+ if (_G(magicCounter) > 8) {
if (_G(tornado_used)) {
- _G(magic_cnt) = 0;
+ _G(magicCounter) = 0;
addMagic(-1);
}
}
diff --git a/engines/got/game/shot_movement.cpp b/engines/got/game/shot_movement.cpp
index f90df5b240c..d1ac52b95e9 100644
--- a/engines/got/game/shot_movement.cpp
+++ b/engines/got/game/shot_movement.cpp
@@ -193,7 +193,7 @@ int shotMovementThree(Actor *actor) {
actor->_temp3--;
actor->_temp4--;
- if (overlap(_G(thor_x1) - 1, _G(thor_y1) - 1, _G(thor_x2) + 1, _G(thor_y2) + 1,
+ if (overlap(_G(thorX1) - 1, _G(thorY1) - 1, _G(thorX2) + 1, _G(thorY2) + 1,
actor->_x, actor->_y, actor->_x + 15, actor->_y + 15)) {
actor->_moveType = 0;
actor->_speed = 6;
@@ -236,7 +236,7 @@ int shotMovementFour(Actor *actor) {
return 0;
}
}
- if (overlap(_G(thor)->_x - 1, _G(thor)->_y - 1, _G(thor_x2) + 1, _G(thor_y2) + 1,
+ if (overlap(_G(thor)->_x - 1, _G(thor)->_y - 1, _G(thorX2) + 1, _G(thorY2) + 1,
actor->_x, actor->_y, actor->_x + 15, actor->_y + 15)) {
thorDamaged(actor);
actorDestroyed(actor);
@@ -249,20 +249,20 @@ int shotMovementFour(Actor *actor) {
int xd = 0;
int d = actor->_lastDir;
- if ((x1 > (_G(thor_x1)) + 1))
+ if ((x1 > (_G(thorX1)) + 1))
xd = -2;
- else if ((x1 < (_G(thor_x1)) - 1))
+ else if ((x1 < (_G(thorX1)) - 1))
xd = 2;
if (actor->_actorNum == 1) {
- if (y1 < (_G(thor_y1) - 6))
+ if (y1 < (_G(thorY1) - 6))
yd = 2;
- else if (y1 > (_G(thor_y1) - 6))
+ else if (y1 > (_G(thorY1) - 6))
yd = -2;
} else {
- if (y1 < (_G(thor_real_y1) - 1))
+ if (y1 < (_G(thorRealY1) - 1))
yd = 2;
- else if (y1 > (_G(thor_real_y1) + 1))
+ else if (y1 > (_G(thorRealY1) + 1))
yd = -2;
}
@@ -573,7 +573,7 @@ int shotMovementEleven(Actor *actor) {
int y1 = actor->_y;
if (!actor->_temp1) {
- calc_angle(_G(thor_x1), _G(thor_real_y1), x1, y1, actor);
+ calc_angle(_G(thorX1), _G(thorRealY1), x1, y1, actor);
actor->_temp1 = 1;
}
@@ -611,7 +611,7 @@ int shotMovementTwelve(Actor *actor) {
int y1 = actor->_y;
if (!actor->_temp5) {
- calc_angle(_G(thor_x1), _G(thor_real_y1), x1, y1, actor);
+ calc_angle(_G(thorX1), _G(thorRealY1), x1, y1, actor);
actor->_temp5 = 1;
}
@@ -638,7 +638,7 @@ int shotMovementTwelve(Actor *actor) {
actor->_temp4 = 240;
actor->_nextFrame = 2;
} else {
- if (overlap(x1 + 2, y1 + 2, x1 + 14, y1 + 14, _G(thor_x1), _G(thor_y1), _G(thor_x2), _G(thor_y2))) {
+ if (overlap(x1 + 2, y1 + 2, x1 + 14, y1 + 14, _G(thorX1), _G(thorY1), _G(thorX2), _G(thorY2))) {
thorDamaged(actor);
}
actor->_x = x1;
@@ -665,7 +665,7 @@ int shotMovementThirteen(Actor *actor) {
int y1 = actor->_y;
if (!actor->_temp5) {
- calc_angle(_G(thor_x1), _G(thor_real_y1), x1, y1, actor);
+ calc_angle(_G(thorX1), _G(thorRealY1), x1, y1, actor);
actor->_temp5 = 1;
}
@@ -709,7 +709,7 @@ int shotMovementThirteen(Actor *actor) {
else
YA = 0 - YA;
} else {
- if (overlap(x1 + 4, y1 + 4, x1 + 12, y1 + 12, _G(thor_x1), _G(thor_y1), _G(thor_x2), _G(thor_y2))) {
+ if (overlap(x1 + 4, y1 + 4, x1 + 12, y1 + 12, _G(thorX1), _G(thorY1), _G(thorX2), _G(thorY2))) {
thorDamaged(actor);
}
actor->_x = x1;
diff --git a/engines/got/game/shot_pattern.cpp b/engines/got/game/shot_pattern.cpp
index 33acd43bb94..af800ea3700 100644
--- a/engines/got/game/shot_pattern.cpp
+++ b/engines/got/game/shot_pattern.cpp
@@ -56,8 +56,8 @@ int shotPatternNone(Actor *actor) {
int shotPatternOne(Actor *actor) {
switch (actor->_lastDir) {
case 0:
- if (ABS(_G(thor_x1) - actor->_x) < 8) {
- if (actor->_y > _G(thor_real_y1)) { //r
+ if (ABS(_G(thorX1) - actor->_x) < 8) {
+ if (actor->_y > _G(thorRealY1)) { //r
if (actorShoots(actor, 0))
return 1;
}
@@ -65,8 +65,8 @@ int shotPatternOne(Actor *actor) {
break;
case 1:
- if (ABS(_G(thor_x1) - actor->_x) < 8) {
- if (actor->_y < _G(thor_real_y1)) { //r
+ if (ABS(_G(thorX1) - actor->_x) < 8) {
+ if (actor->_y < _G(thorRealY1)) { //r
if (actorShoots(actor, 1))
return 1;
}
@@ -74,8 +74,8 @@ int shotPatternOne(Actor *actor) {
break;
case 2:
- if (ABS(_G(thor_real_y1) - actor->_y) < 8) { //r
- if (actor->_x > _G(thor_x1)) {
+ if (ABS(_G(thorRealY1) - actor->_y) < 8) { //r
+ if (actor->_x > _G(thorX1)) {
if (actorShoots(actor, 2))
return 1;
}
@@ -83,8 +83,8 @@ int shotPatternOne(Actor *actor) {
break;
case 3:
- if (ABS(_G(thor_real_y1) - actor->_y) < 8) { //r
- if (actor->_x < _G(thor_x1)) {
+ if (ABS(_G(thorRealY1) - actor->_y) < 8) { //r
+ if (actor->_x < _G(thorX1)) {
if (actorShoots(actor, 3))
return 1;
}
@@ -179,13 +179,13 @@ int shotPatternFive(Actor *actor) {
int shotPatternSix(Actor *actor) {
const int pos = ((actor->_x) / 16) + (((actor->_y) / 16) * 20);
- if (_G(thor_pos) == pos - 20)
+ if (_G(thorPos) == pos - 20)
actorShoots(actor, 0);
- else if (_G(thor_pos) == pos + 20)
+ else if (_G(thorPos) == pos + 20)
actorShoots(actor, 1);
- else if (_G(thor_pos) == pos - 1)
+ else if (_G(thorPos) == pos - 1)
actorShoots(actor, 2);
- else if (_G(thor_pos) == pos + 1)
+ else if (_G(thorPos) == pos + 1)
actorShoots(actor, 3);
else
return 0;
@@ -211,7 +211,7 @@ int shotPatternEight(Actor *actor) {
actor->_i1--;
} else if (_G(rand1) < 10) {
actor->_i1 = actor->_funcPass;
- actor->_i2 = _G(thor_real_y1);
+ actor->_i2 = _G(thorRealY1);
actorShoots(actor, 0);
return 1;
}
diff --git a/engines/got/game/special_tile.cpp b/engines/got/game/special_tile.cpp
index c164519ce2f..08784d054a1 100644
--- a/engines/got/game/special_tile.cpp
+++ b/engines/got/game/special_tile.cpp
@@ -130,8 +130,8 @@ int specialTileThor(const int x, const int y, const int icon) {
case 216:
case 217:
if ((GAME2 && icon == 217) || GAME3) {
- cx = (_G(thor_x1) + 7) / 16;
- cy = (_G(thor_real_y1) + 8) / 16;
+ cx = (_G(thorX1) + 7) / 16;
+ cy = (_G(thorRealY1) + 8) / 16;
if (_G(scrn)._iconGrid[cy][cx] == icon) {
_G(thor)->_vulnerableCountdown = STAMINA;
playSound(WOOP, false);
@@ -167,8 +167,8 @@ int specialTileThor(const int x, const int y, const int icon) {
case 228:
case 229:
// Hole tiles
- cx = (_G(thor_x1) + 7) / 16;
- cy = (_G(thor_real_y1) + 8) / 16;
+ cx = (_G(thorX1) + 7) / 16;
+ cy = (_G(thorRealY1) + 8) / 16;
if (_G(scrn)._iconGrid[cy][cx] == icon) {
_G(thor)->_vulnerableCountdown = STAMINA;
if (icon < 224 && icon > 219)
diff --git a/engines/got/gfx/image.cpp b/engines/got/gfx/image.cpp
index ae114c1fb7f..6900ed8d5db 100644
--- a/engines/got/gfx/image.cpp
+++ b/engines/got/gfx/image.cpp
@@ -100,10 +100,10 @@ int loadStandardActors() {
make_actor_surface(&_G(actor[0]));
- _G(thor_x1) = _G(thor)->_x + 2;
- _G(thor_y1) = _G(thor)->_y + 2;
- _G(thor_x2) = _G(thor)->_x + 14;
- _G(thor_y2) = _G(thor)->_y + 14;
+ _G(thorX1) = _G(thor)->_x + 2;
+ _G(thorY1) = _G(thor)->_y + 2;
+ _G(thorX2) = _G(thor)->_x + 14;
+ _G(thorY2) = _G(thor)->_y + 14;
loadActor(0, 103 + _G(thor_info)._armor); // Load hammer
_G(actor[1]).loadFixed(_G(tmp_buff) + 5120);
diff --git a/engines/got/vars.h b/engines/got/vars.h
index 600a82e4de1..843d77514cd 100644
--- a/engines/got/vars.h
+++ b/engines/got/vars.h
@@ -126,12 +126,18 @@ public:
bool _diagFlag = false;
bool _slowMode = false;
bool _startup = true;
- bool _shot_ok = false;
- int _thor_x1 = 0, _thor_y1 = 0, _thor_x2 = 0, _thor_y2 = 0, _thor_real_y1 = 0;
- int _thor_pos = 0;
- int _max_shot = 0;
-
- uint _timer_cnt = 0, _vbl_cnt = 0, _magic_cnt = 0, _extra_cnt = 0;
+ bool _shotOk = false;
+ int _thorX1 = 0;
+ int _thorY1 = 0;
+ int _thorX2 = 0;
+ int _thorY2 = 0;
+ int _thorRealY1 = 0;
+ int _thorPos = 0;
+
+ uint _timerCounter = 0; // unused?
+ uint _vbl_cnt = 0; // unused?
+ uint _magicCounter = 0;
+ uint _extra_cnt = 0; // unused?
int _ox = 0, _oy = 0, _of = 0;
byte _object_map[TILES_COUNT] = {};
More information about the Scummvm-git-logs
mailing list