[Scummvm-git-logs] scummvm master -> 4104d8718abc46fe2d0e8c3f5a21c4bab3d0563d
Strangerke
noreply at scummvm.org
Fri Jan 24 05:41:57 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:
4104d8718a GOT: More renaming in var.h (still WIP)
Commit: 4104d8718abc46fe2d0e8c3f5a21c4bab3d0563d
https://github.com/scummvm/scummvm/commit/4104d8718abc46fe2d0e8c3f5a21c4bab3d0563d
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2025-01-24T06:41:50+01:00
Commit Message:
GOT: More renaming in var.h (still WIP)
Changed paths:
engines/got/console.cpp
engines/got/data/thorinfo.h
engines/got/game/back.cpp
engines/got/game/boss1.cpp
engines/got/game/boss2.cpp
engines/got/game/boss3.cpp
engines/got/game/init.cpp
engines/got/game/main.cpp
engines/got/game/move_patterns.cpp
engines/got/game/object.cpp
engines/got/game/script.cpp
engines/got/game/shot_movement.cpp
engines/got/game/special_tile.cpp
engines/got/game/status.cpp
engines/got/gfx/image.cpp
engines/got/got.cpp
engines/got/utils/file.cpp
engines/got/vars.cpp
engines/got/vars.h
engines/got/views/dialogs/say.cpp
engines/got/views/dialogs/select_item.cpp
engines/got/views/dialogs/select_scroll.cpp
engines/got/views/dialogs/skill_level.cpp
engines/got/views/game_content.cpp
engines/got/views/game_status.cpp
engines/got/views/story.cpp
diff --git a/engines/got/console.cpp b/engines/got/console.cpp
index 03652aad2b1..9098c50447e 100644
--- a/engines/got/console.cpp
+++ b/engines/got/console.cpp
@@ -107,7 +107,7 @@ bool Console::cmdSave(int argc, const char **argv) {
}
bool Console::cmdMagic(int argc, const char **argv) {
- _G(thor_info)._magic = (argc == 2) ? CLIP(atoi(argv[1]), 0, 150) : 150;
+ _G(thorInfo)._magic = (argc == 2) ? CLIP(atoi(argv[1]), 0, 150) : 150;
return false;
}
@@ -140,7 +140,7 @@ bool Console::cmdLevel(int argc, const char **argv) {
}
_G(new_level) = atoi(argv[1]);
- _G(warp_flag) = true;
+ _G(warpFlag) = true;
return false;
}
diff --git a/engines/got/data/thorinfo.h b/engines/got/data/thorinfo.h
index 89437b4c225..4faff526bae 100644
--- a/engines/got/data/thorinfo.h
+++ b/engines/got/data/thorinfo.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef GOT_DATA_THOR_INFO_H
-#define GOT_DATA_THOR_INFO_H
+#ifndef GOT_DATA_THORINFO_H
+#define GOT_DATA_THORINFO_H
#include "common/serializer.h"
diff --git a/engines/got/game/back.cpp b/engines/got/game/back.cpp
index 91b48ab998d..a473ef24e72 100644
--- a/engines/got/game/back.cpp
+++ b/engines/got/game/back.cpp
@@ -74,12 +74,12 @@ void showLevel(const int newLevel) {
if (_G(scrn)._iconGrid[_G(thor)->_centerY][_G(thor)->_centerX] == 154)
warning("showLevel - Potential short move missing");
- if (_G(warp_flag))
+ if (_G(warpFlag))
_G(current_level) = newLevel - 5; // Force phase
- _G(warp_flag) = false;
+ _G(warpFlag) = false;
- if (_G(warp_scroll)) {
- _G(warp_scroll) = false;
+ if (_G(warpScroll)) {
+ _G(warpScroll) = false;
if (_G(thor)->_dir == 0)
_G(current_level) = newLevel + 10;
else if (_G(thor)->_dir == 1)
@@ -93,7 +93,7 @@ void showLevel(const int newLevel) {
if (!_G(setup)._scrollFlag)
_G(current_level) = newLevel; // Force no scroll
- if (_G(music_current) != _G(levelMusic))
+ if (_G(currentMusic) != _G(levelMusic))
_G(sound).musicPause();
switch (_G(new_level) - _G(current_level)) {
@@ -127,20 +127,20 @@ void showLevel(const int newLevel) {
void showLevelDone() {
_G(current_level) = _G(new_level);
- _G(thor_info)._lastHealth = _G(thor)->_health;
- _G(thor_info)._lastMagic = _G(thor_info)._magic;
- _G(thor_info)._lastJewels = _G(thor_info)._jewels;
- _G(thor_info)._lastKeys = _G(thor_info)._keys;
- _G(thor_info)._lastScore = _G(thor_info)._score;
- _G(thor_info)._lastItem = _G(thor_info)._selectedItem;
- _G(thor_info)._lastScreen = _G(current_level);
- _G(thor_info)._lastIcon = ((_G(thor)->_x + 8) / 16) + (((_G(thor)->_y + 14) / 16) * 20);
- _G(thor_info)._lastDir = _G(thor)->_dir;
- _G(thor_info)._lastInventory = _G(thor_info)._inventory;
- _G(thor_info)._lastObject = _G(thor_info)._object;
- _G(thor_info)._lastObjectName = _G(thor_info)._objectName;
-
- _G(last_setup) = _G(setup);
+ _G(thorInfo)._lastHealth = _G(thor)->_health;
+ _G(thorInfo)._lastMagic = _G(thorInfo)._magic;
+ _G(thorInfo)._lastJewels = _G(thorInfo)._jewels;
+ _G(thorInfo)._lastKeys = _G(thorInfo)._keys;
+ _G(thorInfo)._lastScore = _G(thorInfo)._score;
+ _G(thorInfo)._lastItem = _G(thorInfo)._selectedItem;
+ _G(thorInfo)._lastScreen = _G(current_level);
+ _G(thorInfo)._lastIcon = ((_G(thor)->_x + 8) / 16) + (((_G(thor)->_y + 14) / 16) * 20);
+ _G(thorInfo)._lastDir = _G(thor)->_dir;
+ _G(thorInfo)._lastInventory = _G(thorInfo)._inventory;
+ _G(thorInfo)._lastObject = _G(thorInfo)._object;
+ _G(thorInfo)._lastObjectName = _G(thorInfo)._objectName;
+
+ _G(lastSetup) = _G(setup);
bool f = true;
if (GAME1 && _G(new_level) == BOSS_LEVEL1) {
diff --git a/engines/got/game/boss1.cpp b/engines/got/game/boss1.cpp
index 2dba2ab9b1a..52387317b51 100644
--- a/engines/got/game/boss1.cpp
+++ b/engines/got/game/boss1.cpp
@@ -260,7 +260,7 @@ void boss1ClosingSequence1() {
}
void boss1ClosingSequence2() {
- _G(thor_info)._armor = 1;
+ _G(thorInfo)._armor = 1;
loadNewThor();
_G(thor)->_dir = 1;
_G(thor)->_nextFrame = 0;
diff --git a/engines/got/game/boss2.cpp b/engines/got/game/boss2.cpp
index bc26e334d9a..973eb7f5683 100644
--- a/engines/got/game/boss2.cpp
+++ b/engines/got/game/boss2.cpp
@@ -388,7 +388,7 @@ void boss2ClosingSequence1() {
}
void boss2ClosingSequence2() {
- _G(thor_info)._armor = 10;
+ _G(thorInfo)._armor = 10;
loadNewThor();
_G(thor)->_dir = 1;
_G(thor)->_nextFrame = 0;
diff --git a/engines/got/game/boss3.cpp b/engines/got/game/boss3.cpp
index a7669b440ff..074897b8608 100644
--- a/engines/got/game/boss3.cpp
+++ b/engines/got/game/boss3.cpp
@@ -486,7 +486,7 @@ void boss3SetupLevel() {
}
musicPlay(7, true);
- _G(apple_drop) = 0;
+ _G(appleDropCounter) = 0;
bossMode = 1;
}
diff --git a/engines/got/game/init.cpp b/engines/got/game/init.cpp
index f4f2c431d63..aae75c3f073 100644
--- a/engines/got/game/init.cpp
+++ b/engines/got/game/init.cpp
@@ -32,27 +32,27 @@
namespace Got {
void setupPlayer() {
- _G(thor_info).clear();
- _G(thor_info)._inventory = 0;
+ _G(thorInfo).clear();
+ _G(thorInfo)._inventory = 0;
if (_G(area) > 1)
- _G(thor_info)._inventory |= APPLE_MAGIC + LIGHTNING_MAGIC;
+ _G(thorInfo)._inventory |= APPLE_MAGIC + LIGHTNING_MAGIC;
if (_G(area) > 2)
- _G(thor_info)._inventory |= BOOTS_MAGIC + WIND_MAGIC;
+ _G(thorInfo)._inventory |= BOOTS_MAGIC + WIND_MAGIC;
_G(thor)->_health = 150;
- _G(thor_info)._magic = _G(area) > 1 ? 150 : 0;
- _G(thor_info)._jewels = 0;
- _G(thor_info)._score = 0;
- _G(thor_info)._keys = 0;
- _G(thor_info)._lastItem = 0;
- _G(thor_info)._object = 0;
- _G(thor_info)._objectName = nullptr;
+ _G(thorInfo)._magic = _G(area) > 1 ? 150 : 0;
+ _G(thorInfo)._jewels = 0;
+ _G(thorInfo)._score = 0;
+ _G(thorInfo)._keys = 0;
+ _G(thorInfo)._lastItem = 0;
+ _G(thorInfo)._object = 0;
+ _G(thorInfo)._objectName = nullptr;
_G(thor)->_lastX[0] = _G(thor)->_x;
_G(thor)->_lastX[1] = _G(thor)->_x;
_G(thor)->_lastY[0] = _G(thor)->_y;
_G(thor)->_lastY[1] = _G(thor)->_y;
- _G(thor_info)._lastIcon = (6 * 20) + 8;
- _G(thor_info)._lastScreen = 23;
+ _G(thorInfo)._lastIcon = (6 * 20) + 8;
+ _G(thorInfo)._lastScreen = 23;
_G(thor)->_dir = 1;
switch (_G(area)) {
@@ -80,13 +80,13 @@ void initGame() {
if (_G(demo)) {
g_vars->setArea(1);
_G(thor)->_health = 100;
- _G(thor_info)._magic = 100;
- _G(thor_info)._jewels = 463;
- _G(thor_info)._score = 12455;
+ _G(thorInfo)._magic = 100;
+ _G(thorInfo)._jewels = 463;
+ _G(thorInfo)._score = 12455;
_G(setup)._difficultyLevel = 0;
- _G(thor_info)._inventory = 1 + 2;
+ _G(thorInfo)._inventory = 1 + 2;
_G(current_level) = 54;
- _G(thor_info)._selectedItem = 2;
+ _G(thorInfo)._selectedItem = 2;
File f("DEMO");
_G(demoKeys).clear();
@@ -116,10 +116,10 @@ void initGame() {
}
int setupBoss(const int num) {
- if (_G(boss_loaded) == num)
+ if (_G(currentBossLoaded) == num)
return 1;
- if (_G(boss_loaded)) {
+ if (_G(currentBossLoaded)) {
for (int rep = 0; rep < 3; rep++) {
if (_G(boss_sound[rep]))
free(_G(boss_sound[rep]));
@@ -189,7 +189,7 @@ int setupBoss(const int num) {
_G(pcsound_length[NUM_SOUNDS - 1]) = f.size();
f.close();
- _G(boss_loaded) = num;
+ _G(currentBossLoaded) = num;
return 1;
}
diff --git a/engines/got/game/main.cpp b/engines/got/game/main.cpp
index d829b5a6314..a949bd4457b 100644
--- a/engines/got/game/main.cpp
+++ b/engines/got/game/main.cpp
@@ -27,9 +27,9 @@ namespace Got {
void setupLoad() {
_G(thor)->_active = true;
- _G(new_level) = _G(thor_info)._lastScreen;
- _G(thor)->_x = (_G(thor_info)._lastIcon % 20) * 16;
- _G(thor)->_y = ((_G(thor_info)._lastIcon / 20) * 16) - 1;
+ _G(new_level) = _G(thorInfo)._lastScreen;
+ _G(thor)->_x = (_G(thorInfo)._lastIcon % 20) * 16;
+ _G(thor)->_y = ((_G(thorInfo)._lastIcon / 20) * 16) - 1;
if (_G(thor)->_x < 1)
_G(thor)->_x = 1;
if (_G(thor)->_y < 0)
@@ -38,17 +38,17 @@ void setupLoad() {
_G(thor)->_lastX[1] = _G(thor)->_x;
_G(thor)->_lastY[0] = _G(thor)->_y;
_G(thor)->_lastY[1] = _G(thor)->_y;
- _G(thor)->_dir = _G(thor_info)._lastDir;
- _G(thor)->_lastDir = _G(thor_info)._lastDir;
- _G(thor)->_health = _G(thor_info)._lastHealth;
- _G(thor_info)._magic = _G(thor_info)._lastMagic;
- _G(thor_info)._jewels = _G(thor_info)._lastJewels;
- _G(thor_info)._keys = _G(thor_info)._lastKeys;
- _G(thor_info)._score = _G(thor_info)._lastScore;
- _G(thor_info)._selectedItem = _G(thor_info)._lastItem;
- _G(thor_info)._inventory = _G(thor_info)._lastInventory;
- _G(thor_info)._object = _G(thor_info)._lastObject;
- _G(thor_info)._objectName = _G(thor_info)._lastObjectName;
+ _G(thor)->_dir = _G(thorInfo)._lastDir;
+ _G(thor)->_lastDir = _G(thorInfo)._lastDir;
+ _G(thor)->_health = _G(thorInfo)._lastHealth;
+ _G(thorInfo)._magic = _G(thorInfo)._lastMagic;
+ _G(thorInfo)._jewels = _G(thorInfo)._lastJewels;
+ _G(thorInfo)._keys = _G(thorInfo)._lastKeys;
+ _G(thorInfo)._score = _G(thorInfo)._lastScore;
+ _G(thorInfo)._selectedItem = _G(thorInfo)._lastItem;
+ _G(thorInfo)._inventory = _G(thorInfo)._lastInventory;
+ _G(thorInfo)._object = _G(thorInfo)._lastObject;
+ _G(thorInfo)._objectName = _G(thorInfo)._lastObjectName;
_G(thor)->_numMoves = 1;
_G(thor)->_vulnerableCountdown = 60;
_G(thor)->_show = 60;
diff --git a/engines/got/game/move_patterns.cpp b/engines/got/game/move_patterns.cpp
index 96a41423a17..3cfc962ae54 100644
--- a/engines/got/game/move_patterns.cpp
+++ b/engines/got/game/move_patterns.cpp
@@ -155,10 +155,10 @@ int (*specialMovementFunc[])(Actor *actor) = {
// Check Thor move
int checkMove0(const int x, const int y, Actor *actor) {
- _G(thor_icon1) = 0;
- _G(thor_icon2) = 0;
- _G(thor_icon3) = 0;
- _G(thor_icon4) = 0;
+ _G(thorIcon1) = 0;
+ _G(thorIcon2) = 0;
+ _G(thorIcon3) = 0;
+ _G(thorIcon4) = 0;
if (x < 0) {
if (_G(current_level) > 0) {
@@ -236,22 +236,22 @@ int checkMove0(const int x, const int y, Actor *actor) {
int ti = 0;
if (icn1 < TILE_FLY) {
- _G(thor_icon1) = 1;
+ _G(thorIcon1) = 1;
ti = 1;
}
if (icn2 < TILE_FLY) {
- _G(thor_icon2) = 1;
+ _G(thorIcon2) = 1;
ti = 1;
}
if (icn3 < TILE_FLY) {
- _G(thor_icon3) = 1;
+ _G(thorIcon3) = 1;
ti = 1;
}
if (icn4 < TILE_FLY) {
- _G(thor_icon4) = 1;
+ _G(thorIcon4) = 1;
ti = 1;
}
@@ -617,18 +617,18 @@ int check_thor_move(const int x, const int y, Actor *actor) {
if (_G(diagFlag) || _G(thor_special_flag))
return 0;
- if (_G(thor_icon1) + _G(thor_icon2) + _G(thor_icon3) + _G(thor_icon4) > 1)
+ if (_G(thorIcon1) + _G(thorIcon2) + _G(thorIcon3) + _G(thorIcon4) > 1)
return 0;
switch (actor->_dir) {
case 0:
- if (_G(thor_icon1)) {
+ if (_G(thorIcon1)) {
actor->_dir = 3;
if (checkMove0(x + THOR_PAD1, y + 2, actor)) {
actor->_dir = 0;
return 1;
}
- } else if (_G(thor_icon3)) {
+ } else if (_G(thorIcon3)) {
actor->_dir = 2;
if (checkMove0(x - THOR_PAD1, y + 2, actor)) {
actor->_dir = 0;
@@ -639,13 +639,13 @@ int check_thor_move(const int x, const int y, Actor *actor) {
break;
case 1:
- if (_G(thor_icon2)) {
+ if (_G(thorIcon2)) {
actor->_dir = 3;
if (checkMove0(x + THOR_PAD1, y - 2, actor)) {
actor->_dir = 1;
return 1;
}
- } else if (_G(thor_icon4)) {
+ } else if (_G(thorIcon4)) {
actor->_dir = 2;
if (checkMove0(x - THOR_PAD1, y - 2, actor)) {
actor->_dir = 1;
@@ -656,20 +656,20 @@ int check_thor_move(const int x, const int y, Actor *actor) {
break;
case 2:
- if (_G(thor_icon1)) {
+ if (_G(thorIcon1)) {
if (checkMove0(x + 2, y + THOR_PAD1, actor))
return 1;
- } else if (_G(thor_icon2)) {
+ } else if (_G(thorIcon2)) {
if (checkMove0(x + 2, y - THOR_PAD1, actor))
return 1;
}
break;
case 3:
- if (_G(thor_icon3)) {
+ if (_G(thorIcon3)) {
if (checkMove0(x - 2, y + THOR_PAD1, actor))
return 1;
- } else if (_G(thor_icon4)) {
+ } else if (_G(thorIcon4)) {
if (checkMove0(x - 2, y - THOR_PAD1, actor))
return 1;
}
@@ -965,10 +965,10 @@ int specialMovementTwo(Actor *actor) {
playSound(ANGEL, false);
_G(thor)->_health += 1;
}
- } else if (_G(thor_info)._magic < 150) {
+ } else if (_G(thorInfo)._magic < 150) {
if (!soundPlaying())
playSound(ANGEL, false);
- _G(thor_info)._magic += 1;
+ _G(thorInfo)._magic += 1;
}
return 1;
diff --git a/engines/got/game/object.cpp b/engines/got/game/object.cpp
index 016c21366c2..e604b5d399d 100644
--- a/engines/got/game/object.cpp
+++ b/engines/got/game/object.cpp
@@ -49,28 +49,28 @@ void showObjects() {
void pickUpObject(int p) {
switch (_G(objectMap[p])) {
case 1: // Red jewel
- if (_G(thor_info)._jewels >= 999) {
+ if (_G(thorInfo)._jewels >= 999) {
cannotCarryMore();
return;
}
addJewels(10);
break;
case 2: // Blue jewel
- if (_G(thor_info)._jewels >= 999) {
+ if (_G(thorInfo)._jewels >= 999) {
cannotCarryMore();
return;
}
addJewels(1);
break;
case 3: // Red potion
- if (_G(thor_info)._magic >= 150) {
+ if (_G(thorInfo)._magic >= 150) {
cannotCarryMore();
return;
}
addMagic(10);
break;
case 4: // Blue potion
- if (_G(thor_info)._magic >= 150) {
+ if (_G(thorInfo)._magic >= 150) {
cannotCarryMore();
return;
}
@@ -92,7 +92,7 @@ void pickUpObject(int p) {
addKeys(1);
break;
case 8: // Treasure
- if (_G(thor_info)._jewels >= 999) {
+ if (_G(thorInfo)._jewels >= 999) {
cannotCarryMore();
return;
}
@@ -126,10 +126,10 @@ void pickUpObject(int p) {
_G(actor[2])._active = false;
_G(shield_on) = false;
_G(tornado_used) = false;
- _G(thor_info)._inventory |= 64;
- _G(thor_info)._selectedItem = 7;
- _G(thor_info)._object = _G(objectMap[p]) - 11;
- _G(thor_info)._objectName = OBJECT_NAMES[_G(thor_info)._object - 1];
+ _G(thorInfo)._inventory |= 64;
+ _G(thorInfo)._selectedItem = 7;
+ _G(thorInfo)._object = _G(objectMap[p]) - 11;
+ _G(thorInfo)._objectName = OBJECT_NAMES[_G(thorInfo)._object - 1];
odinSpeaks((_G(objectMap[p]) - 12) + 501, _G(objectMap[p]) - 1);
break;
case 27:
@@ -147,9 +147,9 @@ void pickUpObject(int p) {
_G(thor)->_numMoves = 1;
_G(actor[2])._active = false;
const int s = 1 << (_G(objectMap[p]) - 27);
- _G(thor_info)._inventory |= s;
+ _G(thorInfo)._inventory |= s;
odinSpeaks((_G(objectMap[p]) - 27) + 516, _G(objectMap[p]) - 1);
- _G(thor_info)._selectedItem = _G(objectMap[p]) - 26;
+ _G(thorInfo)._selectedItem = _G(objectMap[p]) - 26;
addMagic(150);
fillScore(5);
}
@@ -210,7 +210,7 @@ bool useApple(int flag) {
if (_G(thor)->_health == 150)
return false;
- if (flag && _G(thor_info)._magic > 0) {
+ if (flag && _G(thorInfo)._magic > 0) {
if (!_G(apple_flag)) {
_G(magicCounter) = 0;
addMagic(-2);
@@ -235,7 +235,7 @@ bool useApple(int flag) {
}
bool useThunder(int flag) {
- if (flag && _G(thor_info)._magic > 29) {
+ if (flag && _G(thorInfo)._magic > 29) {
if (!_G(thunder_flag)) {
addMagic(-30);
playSound(THUNDER, false);
@@ -255,7 +255,7 @@ bool useThunder(int flag) {
bool useBoots(int flag) {
if (flag) {
- if (_G(thor_info)._magic > 0) {
+ if (_G(thorInfo)._magic > 0) {
if (_G(thor)->_numMoves == 1 || _G(magicCounter) > 8) {
_G(magicCounter) = 0;
addMagic(-1);
@@ -279,13 +279,13 @@ bool useBoots(int flag) {
bool useShield(int flag) {
if (flag) {
- if (_G(thor_info)._magic) {
+ if (_G(thorInfo)._magic) {
if (!_G(shield_on)) {
_G(magicCounter) = 0;
addMagic(-1);
setupMagicItem(1);
- _G(actor[2]) = _G(magic_item[1]);
+ _G(actor[2]) = _G(magicItem[1]);
setupActor(&_G(actor[2]), 2, 0, _G(thor)->_x, _G(thor)->_y);
_G(actor[2])._moveCountdown = 1;
_G(actor[2])._speed = 1;
@@ -312,7 +312,7 @@ bool useShield(int flag) {
bool useLightning(int flag) {
if (flag) {
- if (_G(thor_info)._magic > 14) {
+ if (_G(thorInfo)._magic > 14) {
addMagic(-15);
g_events->send("Game", GameMessage("THROW_LIGHTNING"));
} else {
@@ -325,12 +325,12 @@ bool useLightning(int flag) {
bool useTornado(int flag) {
if (flag) {
- if (_G(thor_info)._magic > 10) {
+ if (_G(thorInfo)._magic > 10) {
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]);
+ _G(actor[2]) = _G(magicItem[0]);
setupActor(&_G(actor[2]), 2, 0, _G(thor)->_x, _G(thor)->_y);
_G(actor[2])._lastDir = _G(thor)->_dir;
@@ -348,7 +348,7 @@ bool useTornado(int flag) {
addMagic(-1);
}
}
- if (_G(thor_info)._magic < 1) {
+ if (_G(thorInfo)._magic < 1) {
actorDestroyed(&_G(actor[2]));
_G(tornado_used) = false;
notEnoughMagic();
@@ -360,10 +360,10 @@ bool useTornado(int flag) {
}
bool useObject(int flag) {
- if (!flag || !(_G(thor_info)._inventory & 64))
+ if (!flag || !(_G(thorInfo)._inventory & 64))
return false;
- odinSpeaks((_G(thor_info)._object - 1) + 5501, _G(thor_info)._object - 1);
+ odinSpeaks((_G(thorInfo)._object - 1) + 5501, _G(thorInfo)._object - 1);
return true;
}
@@ -378,7 +378,7 @@ void useItem() {
}
bool mf = _G(magic_inform);
- switch (_G(thor_info)._selectedItem) {
+ switch (_G(thorInfo)._selectedItem) {
case 1:
ret = useApple(kf);
break;
@@ -429,8 +429,8 @@ void cannotCarryMore() {
}
void deleteObject() {
- _G(thor_info)._inventory &= 0xbf;
- _G(thor_info)._selectedItem = 1;
+ _G(thorInfo)._inventory &= 0xbf;
+ _G(thorInfo)._selectedItem = 1;
}
} // namespace Got
diff --git a/engines/got/game/script.cpp b/engines/got/game/script.cpp
index 2733ba9d9f5..1c0e05fa149 100644
--- a/engines/got/game/script.cpp
+++ b/engines/got/game/script.cpp
@@ -409,22 +409,22 @@ int Scripts::getInternalVariable() {
}
switch (i) {
case 0:
- _lTemp = _G(thor_info)._jewels;
+ _lTemp = _G(thorInfo)._jewels;
break;
case 1:
_lTemp = _G(thor)->_health;
break;
case 2:
- _lTemp = _G(thor_info)._magic;
+ _lTemp = _G(thorInfo)._magic;
break;
case 3:
- _lTemp = _G(thor_info)._score;
+ _lTemp = _G(thorInfo)._score;
break;
case 4:
_lTemp = _G(current_level);
break;
case 5:
- _lTemp = _G(thor_info)._keys;
+ _lTemp = _G(thorInfo)._keys;
break;
case 6:
case 7:
@@ -454,8 +454,8 @@ int Scripts::getInternalVariable() {
_lTemp = _G(setup)._flags[i - 1] ? 1 : 0;
break;
case 23:
- if (_G(thor_info)._inventory & 64)
- _lTemp = _G(thor_info)._object;
+ if (_G(thorInfo)._inventory & 64)
+ _lTemp = _G(thorInfo)._object;
else
_lTemp = 0;
break;
@@ -778,8 +778,8 @@ int Scripts::cmd_say(int mode, int type) {
obj += 10;
}
- Common::fill(_G(tmp_buff), _G(tmp_buff) + TMP_SIZE, 0);
- char *p = (char *)_G(tmp_buff);
+ Common::fill(_G(tmpBuff), _G(tmpBuff) + TMP_SIZE, 0);
+ char *p = (char *)_G(tmpBuff);
while (calcString(0)) {
Common::strcpy_s(p, TMP_SIZE, _tempS);
@@ -800,7 +800,7 @@ int Scripts::cmd_ask() {
char title[41], opt[41];
Common::StringArray opts;
- memset(_G(tmp_buff), 0, TMP_SIZE);
+ memset(_G(tmpBuff), 0, TMP_SIZE);
if (!skipColon())
return 5;
@@ -926,10 +926,10 @@ int Scripts::cmd_itemGive() {
if (i < 1 || i > 15)
return 6;
- _G(thor_info)._inventory |= 64;
- _G(thor_info)._selectedItem = 7;
- _G(thor_info)._object = i;
- _G(thor_info)._objectName = OBJECT_NAMES[_G(thor_info)._object - 1];
+ _G(thorInfo)._inventory |= 64;
+ _G(thorInfo)._selectedItem = 7;
+ _G(thorInfo)._object = i;
+ _G(thorInfo)._objectName = OBJECT_NAMES[_G(thorInfo)._object - 1];
return 0;
}
diff --git a/engines/got/game/shot_movement.cpp b/engines/got/game/shot_movement.cpp
index d1ac52b95e9..94741294fdb 100644
--- a/engines/got/game/shot_movement.cpp
+++ b/engines/got/game/shot_movement.cpp
@@ -225,12 +225,12 @@ int shotMovementFour(Actor *actor) {
actor->_temp1--;
if (!actor->_temp1) {
actorDestroyed(actor);
- _G(apple_drop++);
- if (_G(apple_drop) == 4) {
+ _G(appleDropCounter++);
+ if (_G(appleDropCounter) == 4) {
if (dropObject(actor, 5))
- _G(apple_drop) = 0;
+ _G(appleDropCounter) = 0;
else
- _G(apple_drop) = 3;
+ _G(appleDropCounter) = 3;
} else
dropObject(actor, 3);
return 0;
@@ -692,12 +692,12 @@ int shotMovementThirteen(Actor *actor) {
if (_G(actor[actor->_creator])._currNumShots)
_G(actor[actor->_creator])._currNumShots--;
actorDestroyed(actor);
- _G(apple_drop++);
- if (_G(apple_drop) > 4) {
+ _G(appleDropCounter++);
+ if (_G(appleDropCounter) > 4) {
if (dropObject(actor, 5))
- _G(apple_drop) = 0;
+ _G(appleDropCounter) = 0;
else
- _G(apple_drop) = 4;
+ _G(appleDropCounter) = 4;
} else
dropObject(actor, 4);
return 0;
diff --git a/engines/got/game/special_tile.cpp b/engines/got/game/special_tile.cpp
index 08784d054a1..3455696d906 100644
--- a/engines/got/game/special_tile.cpp
+++ b/engines/got/game/special_tile.cpp
@@ -41,8 +41,8 @@ int specialTileThor(const int x, const int y, const int icon) {
return openDoor1(x, y);
case 202:
if (GAME3) {
- if (_G(thor_info)._inventory & 64) {
- if (_G(thor_info)._object == 4) {
+ if (_G(thorInfo)._inventory & 64) {
+ if (_G(thorInfo)._object == 4) {
eraseDoor(y, x);
deleteObject();
return 1;
@@ -57,7 +57,7 @@ int specialTileThor(const int x, const int y, const int icon) {
return 1;
case 203:
if (!GAME1) {
- if ((_G(thor_info)._inventory & 64) && _G(thor_info)._object == 5) {
+ if ((_G(thorInfo)._inventory & 64) && _G(thorInfo)._object == 5) {
odinSpeaks(2012, 0);
deleteObject();
_G(setup).f10 = true;
@@ -175,16 +175,16 @@ int specialTileThor(const int x, const int y, const int icon) {
playSound(FALL, false);
_G(new_level) = _G(scrn)._newLevel[icon - 220 + (f * 6)];
- _G(warp_scroll) = false;
+ _G(warpScroll) = false;
if (_G(new_level) > 119) {
- _G(warp_scroll) = true;
+ _G(warpScroll) = true;
_G(new_level) -= 128;
}
_G(new_level_tile) = _G(scrn)._newLevelLocation[icon - 220 + (f * 6)];
- _G(warp_flag) = true;
+ _G(warpFlag) = true;
- if (_G(warp_scroll)) {
+ if (_G(warpScroll)) {
if (_G(thor)->_dir == 0)
_G(thor)->_y = 175;
else if (_G(thor)->_dir == 1)
@@ -251,9 +251,9 @@ void eraseDoor(const int x, const int y) {
}
int openDoor1(const int y, const int x) {
- if (_G(thor_info)._keys > 0) {
+ if (_G(thorInfo)._keys > 0) {
eraseDoor(x, y);
- _G(thor_info)._keys--;
+ _G(thorInfo)._keys--;
return 1;
}
@@ -267,9 +267,9 @@ int openDoor1(const int y, const int x) {
}
int cashDoor1(const int y, const int x, const int amount) {
- if (_G(thor_info)._jewels >= amount) {
+ if (_G(thorInfo)._jewels >= amount) {
eraseDoor(x, y);
- _G(thor_info)._jewels -= amount;
+ _G(thorInfo)._jewels -= amount;
return 1;
}
diff --git a/engines/got/game/status.cpp b/engines/got/game/status.cpp
index 3e486fc207f..3b9ad0ddef3 100644
--- a/engines/got/game/status.cpp
+++ b/engines/got/game/status.cpp
@@ -26,15 +26,15 @@
namespace Got {
void addJewels(int num) {
- _G(thor_info)._jewels = CLIP(_G(thor_info)._jewels + num, 0, 999);
+ _G(thorInfo)._jewels = CLIP(_G(thorInfo)._jewels + num, 0, 999);
}
void addScore(int num) {
- _G(thor_info)._score = CLIP(_G(thor_info)._score + num, 0l, 999999l);
+ _G(thorInfo)._score = CLIP(_G(thorInfo)._score + num, 0l, 999999l);
}
void addMagic(int num) {
- _G(thor_info)._magic = CLIP(_G(thor_info)._magic + num, 0, 150);
+ _G(thorInfo)._magic = CLIP(_G(thorInfo)._magic + num, 0, 150);
}
void addHealth(int num) {
@@ -45,7 +45,7 @@ void addHealth(int num) {
}
void addKeys(int num) {
- _G(thor_info)._keys = CLIP(_G(thor_info)._keys + num, 0, 99);
+ _G(thorInfo)._keys = CLIP(_G(thorInfo)._keys + num, 0, 99);
}
void fillHealth() {
diff --git a/engines/got/gfx/image.cpp b/engines/got/gfx/image.cpp
index 6900ed8d5db..905c659ee7e 100644
--- a/engines/got/gfx/image.cpp
+++ b/engines/got/gfx/image.cpp
@@ -86,15 +86,15 @@ void make_actor_surface(Actor *actor) {
for (int d = 0; d < actor->_directions; d++) {
for (int f = 0; f < actor->_framesPerDirection; f++) {
Graphics::ManagedSurface &s = actor->pic[d][f];
- const byte *src = &_G(tmp_buff[256 * ((d * 4) + f)]);
+ const byte *src = &_G(tmpBuff[256 * ((d * 4) + f)]);
createSurface(s, src);
}
}
}
int loadStandardActors() {
- loadActor(0, 100 + _G(thor_info)._armor); // Load Thor
- _G(actor[0]).loadFixed(_G(tmp_buff) + 5120);
+ loadActor(0, 100 + _G(thorInfo)._armor); // Load Thor
+ _G(actor[0]).loadFixed(_G(tmpBuff) + 5120);
setupActor(&_G(actor[0]), 0, 0, 100, 100);
_G(thor) = &_G(actor[0]);
@@ -105,8 +105,8 @@ int loadStandardActors() {
_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);
+ loadActor(0, 103 + _G(thorInfo)._armor); // Load hammer
+ _G(actor[1]).loadFixed(_G(tmpBuff) + 5120);
setupActor(&_G(actor[1]), 1, 0, 100, 100);
_G(actor[1])._active = false;
_G(hammer) = &_G(actor[1]);
@@ -115,37 +115,37 @@ int loadStandardActors() {
// Load sparkle
loadActor(0, 106);
- _G(sparkle).loadFixed(_G(tmp_buff) + 5120);
+ _G(sparkle).loadFixed(_G(tmpBuff) + 5120);
setupActor(&_G(sparkle), 20, 0, 100, 100);
_G(sparkle)._active = false;
make_actor_surface(&_G(sparkle));
// Load explosion
loadActor(0, 107);
- _G(explosion).loadFixed(_G(tmp_buff) + 5120);
+ _G(explosion).loadFixed(_G(tmpBuff) + 5120);
setupActor(&_G(explosion), 21, 0, 100, 100);
_G(explosion)._active = false;
make_actor_surface(&_G(explosion));
// Load tornado
loadActor(0, 108);
- _G(magic_item[0]).loadFixed((const byte *)_G(tmp_buff) + 5120);
- Common::copy(_G(tmp_buff), _G(tmp_buff) + 1024, _G(magic_pic[0]));
+ _G(magicItem[0]).loadFixed((const byte *)_G(tmpBuff) + 5120);
+ Common::copy(_G(tmpBuff), _G(tmpBuff) + 1024, _G(magicPic[0]));
- setupActor(&_G(magic_item[0]), 20, 0, 0, 0);
- _G(magic_item[0])._active = false;
+ setupActor(&_G(magicItem[0]), 20, 0, 0, 0);
+ _G(magicItem[0])._active = false;
// Load shield
loadActor(0, 109);
- _G(magic_item[1]).loadFixed((const byte *)_G(tmp_buff) + 5120);
- Common::copy(_G(tmp_buff), _G(tmp_buff) + 1024, _G(magic_pic[1]));
+ _G(magicItem[1]).loadFixed((const byte *)_G(tmpBuff) + 5120);
+ Common::copy(_G(tmpBuff), _G(tmpBuff) + 1024, _G(magicPic[1]));
- setupActor(&_G(magic_item[1]), 20, 0, 0, 0);
- _G(magic_item[1])._active = false;
+ setupActor(&_G(magicItem[1]), 20, 0, 0, 0);
+ _G(magicItem[1])._active = false;
_G(actor[2])._active = false;
- make_actor_surface(&_G(magic_item[0]));
+ make_actor_surface(&_G(magicItem[0]));
return 1;
}
@@ -155,7 +155,7 @@ void showEnemies() {
_G(actor[i])._active = false;
for (int i = 0; i < MAX_ENEMIES; i++)
- _G(enemy_type[i]) = 0;
+ _G(enemyType[i]) = 0;
for (int i = 0; i < MAX_ENEMIES; i++) {
if (_G(scrn)._actorType[i] > 0) {
@@ -187,7 +187,7 @@ void showEnemies() {
int loadEnemy(const int type) {
for (int i = 0; i < MAX_ENEMIES; i++) {
- if (_G(enemy_type[i]) == type)
+ if (_G(enemyType[i]) == type)
return i;
}
@@ -197,7 +197,7 @@ int loadEnemy(const int type) {
int e = -1;
for (int i = 0; i < MAX_ENEMIES; i++) {
- if (!_G(enemy_type[i])) {
+ if (!_G(enemyType[i])) {
e = i;
break;
}
@@ -205,29 +205,29 @@ int loadEnemy(const int type) {
if (e == -1)
return -1;
- Common::MemoryReadStream inf(_G(tmp_buff) + 5120, 40);
+ Common::MemoryReadStream inf(_G(tmpBuff) + 5120, 40);
_G(enemy[e]).loadFixed(&inf);
make_actor_surface(&_G(enemy[e]));
- _G(enemy_type[e]) = type;
+ _G(enemyType[e]) = type;
_G(enemy[e])._shotType = 0;
if (_G(enemy[e])._numShotsAllowed) {
_G(enemy[e])._shotType = e + 1;
// Set up shot info
- _G(shot[e]).loadFixed(_G(tmp_buff) + 5160);
+ _G(shot[e]).loadFixed(_G(tmpBuff) + 5160);
// Loop to set up graphics
for (int d = 0; d < _G(shot[e])._directions; d++) {
for (int f = 0; f < _G(shot[e])._framesPerDirection; f++) {
if (_G(shot[e])._directions < _G(shot[e])._framesPerDirection) {
Graphics::ManagedSurface &s = _G(shot[e]).pic[d][f];
- const byte *src = &_G(tmp_buff[4096 + (256 * ((d * 4) + f))]);
+ const byte *src = &_G(tmpBuff[4096 + (256 * ((d * 4) + f))]);
createSurface(s, src);
} else {
Graphics::ManagedSurface &s = _G(shot[e]).pic[f][d];
- const byte *src = &_G(tmp_buff[4096 + (256 * ((f * 4) + d))]);
+ const byte *src = &_G(tmpBuff[4096 + (256 * ((f * 4) + d))]);
createSurface(s, src);
}
}
@@ -260,12 +260,12 @@ int actorVisible(const int invisNum) {
void setupMagicItem(const int item) {
for (int i = 0; i < 4; i++) {
- createSurface(_G(magic_item[item]).pic[i / 4][i % 4], &_G(magic_pic[item][256 * i]));
+ createSurface(_G(magicItem[item]).pic[i / 4][i % 4], &_G(magicPic[item][256 * i]));
}
}
void loadNewThor() {
- loadActor(0, 100 + _G(thor_info)._armor); // Load Thor
+ loadActor(0, 100 + _G(thorInfo)._armor); // Load Thor
make_actor_surface(&_G(actor[0]));
}
diff --git a/engines/got/got.cpp b/engines/got/got.cpp
index 4211a3373a9..650dc8c5896 100644
--- a/engines/got/got.cpp
+++ b/engines/got/got.cpp
@@ -125,7 +125,7 @@ Common::Error GotEngine::syncGame(Common::Serializer &s) {
g_vars->setArea(area);
}
- _G(thor_info).sync(s);
+ _G(thorInfo).sync(s);
_G(sdData).sync(s);
if (s.isLoading())
@@ -135,17 +135,17 @@ Common::Error GotEngine::syncGame(Common::Serializer &s) {
}
void GotEngine::savegameLoaded() {
- _G(current_area) = _G(thor_info)._lastScreen;
+ _G(current_area) = _G(thorInfo)._lastScreen;
- _G(thor)->_x = (_G(thor_info)._lastIcon % 20) * 16;
- _G(thor)->_y = ((_G(thor_info)._lastIcon / 20) * 16) - 1;
+ _G(thor)->_x = (_G(thorInfo)._lastIcon % 20) * 16;
+ _G(thor)->_y = ((_G(thorInfo)._lastIcon / 20) * 16) - 1;
if (_G(thor)->_x < 1)
_G(thor)->_x = 1;
if (_G(thor)->_y < 0)
_G(thor)->_y = 0;
- _G(thor)->_dir = _G(thor_info)._lastDir;
- _G(thor)->_lastDir = _G(thor_info)._lastDir;
- _G(thor)->_health = _G(thor_info)._lastHealth;
+ _G(thor)->_dir = _G(thorInfo)._lastDir;
+ _G(thor)->_lastDir = _G(thorInfo)._lastDir;
+ _G(thor)->_health = _G(thorInfo)._lastHealth;
_G(thor)->_numMoves = 1;
_G(thor)->_vulnerableCountdown = 60;
_G(thor)->_show = 60;
diff --git a/engines/got/utils/file.cpp b/engines/got/utils/file.cpp
index e12fcafec69..8b22c8729a4 100644
--- a/engines/got/utils/file.cpp
+++ b/engines/got/utils/file.cpp
@@ -34,7 +34,7 @@ bool File::open(const Common::Path &filename) {
bool loadActor(int /*file*/, int num) {
Common::String fname = Common::String::format("ACTOR%d", num);
- if (resourceRead(fname, _G(tmp_buff), true) < 0)
+ if (resourceRead(fname, _G(tmpBuff), true) < 0)
return false;
return true;
@@ -98,8 +98,8 @@ bool loadSpeech(int index) {
*(p - 1) = 0;
*p = 0;
- Common::copy(pm, pm + cnt, _G(tmp_buff));
- _G(tmp_buff)
+ Common::copy(pm, pm + cnt, _G(tmpBuff));
+ _G(tmpBuff)
[cnt] = 0;
delete[] sp;
diff --git a/engines/got/vars.cpp b/engines/got/vars.cpp
index 145b1b1cc5d..cb2ff68bc37 100644
--- a/engines/got/vars.cpp
+++ b/engines/got/vars.cpp
@@ -67,7 +67,7 @@ void Vars::load() {
_setup._slowMode = _slowMode;
_setup._difficultyLevel = 1;
- _tmp_buff = new byte[TMP_SIZE];
+ _tmpBuff = new byte[TMP_SIZE];
resourceRead("RANDOM", _rnd_array);
@@ -77,7 +77,7 @@ void Vars::load() {
Vars::~Vars() {
g_vars = nullptr;
- delete[] _tmp_buff;
+ delete[] _tmpBuff;
}
void Vars::setArea(int areaNum) {
diff --git a/engines/got/vars.h b/engines/got/vars.h
index 7dd3d0ba9bf..c9313e2fa75 100644
--- a/engines/got/vars.h
+++ b/engines/got/vars.h
@@ -138,39 +138,42 @@ public:
byte _objectMap[TILES_COUNT] = {};
byte _objectIndex[TILES_COUNT] = {};
- int8 _thor_icon1 = 0, _thor_icon2 = 0, _thor_icon3 = 0, _thor_icon4 = 0;
+ int8 _thorIcon1 = 0;
+ int8 _thorIcon2 = 0;
+ int8 _thorIcon3 = 0;
+ int8 _thorIcon4 = 0;
int8 _levelMusic = 0;
- int8 _music_current = -1;
- int8 _boss_loaded = 0;
- int8 _apple_drop = 0;
+ int8 _currentMusic = -1;
+ int8 _currentBossLoaded = 0;
+ int8 _appleDropCounter = 0;
bool _cheat = false;
int8 _area = 1;
Level _scrn;
Setup _setup;
- Setup _last_setup;
- byte *_tmp_buff = nullptr;
+ Setup _lastSetup;
+ byte *_tmpBuff = nullptr;
Actor _actor[MAX_ACTORS] = {}; //current actors
Actor _enemy[MAX_ENEMIES] = {}; //current enemies
Actor _shot[MAX_ENEMIES] = {}; //current shots
- int8 _enemy_type[MAX_ENEMIES] = {};
+ int8 _enemyType[MAX_ENEMIES] = {};
int _etype[MAX_ENEMIES] = {};
- Actor _magic_item[2] = {};
- byte _magic_pic[2][1024] = {};
- bool _warp_scroll = false;
+ Actor _magicItem[2] = {};
+ byte _magicPic[2][1024] = {};
+ bool _warpScroll = false;
Actor *_thor = nullptr;
Actor *_hammer = nullptr;
Actor _explosion;
Actor _sparkle;
- ThorInfo _thor_info;
+ ThorInfo _thorInfo;
bool _boss_dead = false;
byte _endgame = 0;
- bool _warp_flag = false;
+ bool _warpFlag = false;
int8 *_std_sound_start = nullptr;
int8 *_pcstd_sound_start = nullptr;
diff --git a/engines/got/views/dialogs/say.cpp b/engines/got/views/dialogs/say.cpp
index 4ad758adde2..6c368e9045f 100644
--- a/engines/got/views/dialogs/say.cpp
+++ b/engines/got/views/dialogs/say.cpp
@@ -42,7 +42,7 @@ bool Say::msgFocus(const FocusMessage &msg) {
if (!_type)
playSound(WOOP, true);
- _content = (const char *)_G(tmp_buff);
+ _content = (const char *)_G(tmpBuff);
_contentLength = 0;
_waitForResponse = WAIT_NONE;
_woopCtr = 0;
diff --git a/engines/got/views/dialogs/select_item.cpp b/engines/got/views/dialogs/select_item.cpp
index 8bbbc84e4b8..3dd3c856dc6 100644
--- a/engines/got/views/dialogs/select_item.cpp
+++ b/engines/got/views/dialogs/select_item.cpp
@@ -43,18 +43,18 @@ void SelectItem::draw() {
Dialog::draw();
GfxSurface s = getSurface();
- if (_G(thor_info)._inventory == 0) {
+ if (_G(thorInfo)._inventory == 0) {
s.print(Common::Point(44, 52), "No Items Found", 14);
return;
}
uint b = 1;
for (int l = 0; l < 7; l++, b = b << 1) {
- if (_G(thor_info)._inventory & b) {
+ if (_G(thorInfo)._inventory & b) {
if (l < 6)
s.simpleBlitFrom(_G(objects[l + 26]), Common::Point(82 - 56 + (l * _HRZSP), 72 - 48));
else {
- const int objId = _G(thor_info)._object + 10;
+ const int objId = _G(thorInfo)._object + 10;
s.simpleBlitFrom(_G(objects[objId]), Common::Point(82 - 56 + (l * _HRZSP), 72 - 48));
}
}
@@ -64,7 +64,7 @@ void SelectItem::draw() {
if (_selectedItem < 6)
objName = ITEM_NAMES[_selectedItem];
else
- objName = _G(thor_info)._objectName;
+ objName = _G(thorInfo)._objectName;
s.print(Common::Point((s.w - (strlen(objName) * 8)) / 2, 66), objName, 12);
s.frameRect(Common::Rect(26 + (_selectedItem * _HRZSP), 22,
@@ -73,16 +73,16 @@ void SelectItem::draw() {
}
bool SelectItem::msgFocus(const FocusMessage &msg) {
- if (_G(thor_info)._inventory == 0) {
+ if (_G(thorInfo)._inventory == 0) {
_selectedItem = -1;
} else {
- _selectedItem = _G(thor_info)._selectedItem - 1;
+ _selectedItem = _G(thorInfo)._selectedItem - 1;
if (_selectedItem < 1)
_selectedItem = 0;
uint b = 1 << _selectedItem;
for (;;) {
- if (_G(thor_info)._inventory & b)
+ if (_G(thorInfo)._inventory & b)
break;
if (_selectedItem < 7)
_selectedItem++;
@@ -99,7 +99,7 @@ bool SelectItem::msgFocus(const FocusMessage &msg) {
bool SelectItem::msgAction(const ActionMessage &msg) {
uint b;
- if (_G(thor_info)._inventory == 0) {
+ if (_G(thorInfo)._inventory == 0) {
close();
return true;
}
@@ -123,7 +123,7 @@ bool SelectItem::msgAction(const ActionMessage &msg) {
_selectedItem = 8;
b = 1 << _selectedItem;
- if (_G(thor_info)._inventory & b)
+ if (_G(thorInfo)._inventory & b)
break;
}
@@ -139,7 +139,7 @@ bool SelectItem::msgAction(const ActionMessage &msg) {
_selectedItem = 0;
b = 1 << _selectedItem;
- if (_G(thor_info)._inventory & b)
+ if (_G(thorInfo)._inventory & b)
break;
}
@@ -155,7 +155,7 @@ bool SelectItem::msgAction(const ActionMessage &msg) {
}
void SelectItem::selectItem() {
- _G(thor_info)._selectedItem = _selectedItem + 1;
+ _G(thorInfo)._selectedItem = _selectedItem + 1;
close();
}
diff --git a/engines/got/views/dialogs/select_scroll.cpp b/engines/got/views/dialogs/select_scroll.cpp
index 076d5dd173e..bde0a2df8b9 100644
--- a/engines/got/views/dialogs/select_scroll.cpp
+++ b/engines/got/views/dialogs/select_scroll.cpp
@@ -36,7 +36,7 @@ bool SelectScroll::msgFocus(const FocusMessage &msg) {
void SelectScroll::selected() {
_G(setup)._scrollFlag = (_selectedItem == 0);
- _G(last_setup) = _G(setup);
+ _G(lastSetup) = _G(setup);
}
} // namespace Dialogs
diff --git a/engines/got/views/dialogs/skill_level.cpp b/engines/got/views/dialogs/skill_level.cpp
index a14a8326167..7d8480576d0 100644
--- a/engines/got/views/dialogs/skill_level.cpp
+++ b/engines/got/views/dialogs/skill_level.cpp
@@ -40,7 +40,7 @@ bool SkillLevel::msgFocus(const FocusMessage &msg) {
void SkillLevel::selected() {
_G(setup)._difficultyLevel = _selectedItem;
- _G(last_setup) = _G(setup);
+ _G(lastSetup) = _G(setup);
}
} // namespace Dialogs
diff --git a/engines/got/views/game_content.cpp b/engines/got/views/game_content.cpp
index 7d95abd1c39..cad31283a47 100644
--- a/engines/got/views/game_content.cpp
+++ b/engines/got/views/game_content.cpp
@@ -183,14 +183,14 @@ bool GameContent::tick() {
addHealth(-1);
addScore(10);
- } else if (_G(thor_info)._magic > 0) {
- _G(thor_info)._magic--;
+ } else if (_G(thorInfo)._magic > 0) {
+ _G(thorInfo)._magic--;
playSound(WOOP, true);
addMagic(-1);
addScore(10);
- } else if (_G(thor_info)._jewels) {
- _G(thor_info)._jewels--;
+ } else if (_G(thorInfo)._jewels) {
+ _G(thorInfo)._jewels--;
playSound(WOOP, true);
addJewels(-1);
addScore(10);
@@ -215,7 +215,7 @@ bool GameContent::tick() {
Gfx::fadeOut();
// Add name to high scores list if necessary, and then show it
- _G(highScores).add(_G(area), _G(playerName), _G(thor_info)._score);
+ _G(highScores).add(_G(area), _G(playerName), _G(thorInfo)._score);
g_events->send("HighScores", GameMessage("HIGH_SCORES", _G(area)));
}
@@ -508,12 +508,12 @@ void GameContent::spinThor() {
}
void GameContent::thorDead() {
- int li = _G(thor_info)._selectedItem;
- int ln = _G(thor_info)._inventory;
+ int li = _G(thorInfo)._selectedItem;
+ int ln = _G(thorInfo)._inventory;
- _G(new_level) = _G(thor_info)._lastScreen;
- _G(thor)->_x = (_G(thor_info)._lastIcon % 20) * 16;
- _G(thor)->_y = ((_G(thor_info)._lastIcon / 20) * 16) - 1;
+ _G(new_level) = _G(thorInfo)._lastScreen;
+ _G(thor)->_x = (_G(thorInfo)._lastIcon % 20) * 16;
+ _G(thor)->_y = ((_G(thorInfo)._lastIcon / 20) * 16) - 1;
if (_G(thor)->_x < 1)
_G(thor)->_x = 1;
if (_G(thor)->_y < 0)
@@ -522,24 +522,24 @@ void GameContent::thorDead() {
_G(thor)->_lastX[1] = _G(thor)->_x;
_G(thor)->_lastY[0] = _G(thor)->_y;
_G(thor)->_lastY[1] = _G(thor)->_y;
- _G(thor)->_dir = _G(thor_info)._lastDir;
- _G(thor)->_lastDir = _G(thor_info)._lastDir;
- _G(thor)->_health = _G(thor_info)._lastHealth;
- _G(thor_info)._magic = _G(thor_info)._lastMagic;
- _G(thor_info)._jewels = _G(thor_info)._lastJewels;
- _G(thor_info)._keys = _G(thor_info)._lastKeys;
- _G(thor_info)._score = _G(thor_info)._lastScore;
- _G(thor_info)._object = _G(thor_info)._lastObject;
- _G(thor_info)._objectName = _G(thor_info)._lastObjectName;
-
- if (ln == _G(thor_info)._lastInventory) {
- _G(thor_info)._selectedItem = li;
+ _G(thor)->_dir = _G(thorInfo)._lastDir;
+ _G(thor)->_lastDir = _G(thorInfo)._lastDir;
+ _G(thor)->_health = _G(thorInfo)._lastHealth;
+ _G(thorInfo)._magic = _G(thorInfo)._lastMagic;
+ _G(thorInfo)._jewels = _G(thorInfo)._lastJewels;
+ _G(thorInfo)._keys = _G(thorInfo)._lastKeys;
+ _G(thorInfo)._score = _G(thorInfo)._lastScore;
+ _G(thorInfo)._object = _G(thorInfo)._lastObject;
+ _G(thorInfo)._objectName = _G(thorInfo)._lastObjectName;
+
+ if (ln == _G(thorInfo)._lastInventory) {
+ _G(thorInfo)._selectedItem = li;
} else {
- _G(thor_info)._selectedItem = _G(thor_info)._lastItem;
- _G(thor_info)._inventory = _G(thor_info)._lastInventory;
+ _G(thorInfo)._selectedItem = _G(thorInfo)._lastItem;
+ _G(thorInfo)._inventory = _G(thorInfo)._lastInventory;
}
- _G(setup) = _G(last_setup);
+ _G(setup) = _G(lastSetup);
_G(thor)->_numMoves = 1;
_G(thor)->_vulnerableCountdown = 60;
@@ -571,9 +571,9 @@ void GameContent::checkForCheats() {
if (_G(cheats)._freezeHealth)
_G(thor)->_health = 150;
if (_G(cheats)._freezeMagic)
- _G(thor_info)._magic = 150;
+ _G(thorInfo)._magic = 150;
if (_G(cheats)._freezeJewels)
- _G(thor_info)._jewels = 999;
+ _G(thorInfo)._jewels = 999;
}
void GameContent::placePixel(GfxSurface &s, int dir, int num) {
diff --git a/engines/got/views/game_status.cpp b/engines/got/views/game_status.cpp
index 273e77c4040..5a14c25af36 100644
--- a/engines/got/views/game_status.cpp
+++ b/engines/got/views/game_status.cpp
@@ -53,14 +53,14 @@ void GameStatus::displayHealth(GfxSurface &s) {
}
void GameStatus::displayMagic(GfxSurface &s) {
- const int x = 59 + _G(thor_info)._magic;
+ const int x = 59 + _G(thorInfo)._magic;
s.fillRect(Common::Rect(59, 20, x, 24), 96);
s.fillRect(Common::Rect(x, 20, 209, 24), STAT_COLOR);
}
void GameStatus::displayJewels(GfxSurface &s) {
- const Common::String str = Common::String::format("%d", _G(thor_info)._jewels);
+ const Common::String str = Common::String::format("%d", _G(thorInfo)._jewels);
int x;
if (str.size() == 1)
x = 70;
@@ -74,7 +74,7 @@ void GameStatus::displayJewels(GfxSurface &s) {
}
void GameStatus::displayScore(GfxSurface &s) {
- const Common::String str = Common::String::format("%ld", _G(thor_info)._score);
+ const Common::String str = Common::String::format("%ld", _G(thorInfo)._score);
const int x = 276 - (str.size() * 8);
s.fillRect(Common::Rect(223, 32, 279, 42), STAT_COLOR);
@@ -82,7 +82,7 @@ void GameStatus::displayScore(GfxSurface &s) {
}
void GameStatus::displayKeys(GfxSurface &s) {
- const Common::String str = Common::String::format("%d", _G(thor_info)._keys);
+ const Common::String str = Common::String::format("%d", _G(thorInfo)._keys);
int x;
if (str.size() == 1)
@@ -99,7 +99,7 @@ void GameStatus::displayKeys(GfxSurface &s) {
void GameStatus::displayItem(GfxSurface &s) {
s.fillRect(Common::Rect(280, 8, 296, 24), STAT_COLOR);
- ThorInfo thorInfo = _G(thor_info);
+ ThorInfo thorInfo = _G(thorInfo);
if (thorInfo._selectedItem) {
if (thorInfo._selectedItem == 7)
s.simpleBlitFrom(_G(objects[thorInfo._object + 10]), Common::Point(280, 8));
diff --git a/engines/got/views/story.cpp b/engines/got/views/story.cpp
index c73c6ef89c4..866eb55f1aa 100644
--- a/engines/got/views/story.cpp
+++ b/engines/got/views/story.cpp
@@ -31,7 +31,7 @@ namespace Views {
#define MAX_Y 236
bool Story::msgFocus(const FocusMessage &msg) {
- resourceRead(Common::String::format("STORY%d", _G(area)), _G(tmp_buff));
+ resourceRead(Common::String::format("STORY%d", _G(area)), _G(tmpBuff));
resourceRead("STORYPAL", _G(pbuff));
@@ -55,7 +55,7 @@ bool Story::msgFocus(const FocusMessage &msg) {
byte color = 72;
char s[21];
- const char *p = (const char *)_G(tmp_buff);
+ const char *p = (const char *)_G(tmpBuff);
while (i < 46) {
if (*p == '\n') {
More information about the Scummvm-git-logs
mailing list