[Scummvm-git-logs] scummvm master -> 687091e219b41528313aae0f8868651cd5da7f5e
Strangerke
noreply at scummvm.org
Tue Jan 21 07:45:36 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:
687091e219 GOT: Finish renaming in the game sub-folder
Commit: 687091e219b41528313aae0f8868651cd5da7f5e
https://github.com/scummvm/scummvm/commit/687091e219b41528313aae0f8868651cd5da7f5e
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2025-01-21T08:45:29+01:00
Commit Message:
GOT: Finish renaming in the game sub-folder
Changed paths:
engines/got/game/boss1.cpp
engines/got/game/boss2.cpp
engines/got/game/boss3.cpp
engines/got/game/move.cpp
engines/got/game/object.cpp
engines/got/game/script.cpp
engines/got/game/shot_pattern.h
engines/got/game/special_tile.cpp
engines/got/game/status.cpp
engines/got/game/status.h
engines/got/views/game_content.cpp
engines/got/views/game_status.cpp
diff --git a/engines/got/game/boss1.cpp b/engines/got/game/boss1.cpp
index 41f1582ef4a..427a63905af 100644
--- a/engines/got/game/boss1.cpp
+++ b/engines/got/game/boss1.cpp
@@ -264,12 +264,12 @@ void boss1ClosingSequence2() {
load_new_thor();
_G(thor)->_dir = 1;
_G(thor)->_nextFrame = 0;
- fill_score(20, "CLOSING");
+ fillScore(20, "CLOSING");
}
void boss1ClosingSequence3() {
- fill_health();
- fill_magic();
+ fillHealth();
+ fillMagic();
odinSpeaks(1002, 0, "CLOSING");
}
diff --git a/engines/got/game/boss2.cpp b/engines/got/game/boss2.cpp
index 14e0e1c6d68..11e12f19c73 100644
--- a/engines/got/game/boss2.cpp
+++ b/engines/got/game/boss2.cpp
@@ -394,12 +394,12 @@ void boss2ClosingSequence2() {
_G(thor)->_dir = 1;
_G(thor)->_nextFrame = 0;
- fill_score(20, "CLOSING");
+ fillScore(20, "CLOSING");
}
void boss2ClosingSequence3() {
- fill_health();
- fill_magic();
+ fillHealth();
+ fillMagic();
odinSpeaks(1002, 0, "CLOSING");
}
diff --git a/engines/got/game/boss3.cpp b/engines/got/game/boss3.cpp
index 6914218c0af..7f9042ab598 100644
--- a/engines/got/game/boss3.cpp
+++ b/engines/got/game/boss3.cpp
@@ -534,12 +534,12 @@ void boss3ClosingSequence1() {
}
void boss3ClosingSequence2() {
- fill_score(20, "CLOSING");
+ fillScore(20, "CLOSING");
}
void boss3ClosingSequence3() {
- fill_health();
- fill_magic();
+ fillHealth();
+ fillMagic();
for (int rep = 0; rep < 16; rep++)
_G(scrn)._actorType[rep] = 0;
diff --git a/engines/got/game/move.cpp b/engines/got/game/move.cpp
index 12ec33728a0..b1b3e291681 100644
--- a/engines/got/game/move.cpp
+++ b/engines/got/game/move.cpp
@@ -102,7 +102,7 @@ int killGoodGuy() {
_G(killgg_inform) = true;
}
- add_score(-1000);
+ addScore(-1000);
return 0;
}
@@ -116,7 +116,7 @@ void actorDamaged(Actor *actor, int damage) {
actor->_vulnerableCountdown = STAMINA;
if (damage >= actor->_health) {
if (actor->_type != 4) {
- add_score(actor->_initHealth * 10);
+ addScore(actor->_initHealth * 10);
} else {
killGoodGuy();
diff --git a/engines/got/game/object.cpp b/engines/got/game/object.cpp
index b024fbed795..c1adc9983a0 100644
--- a/engines/got/game/object.cpp
+++ b/engines/got/game/object.cpp
@@ -53,28 +53,28 @@ void pickUpObject(int p) {
cannotCarryMore();
return;
}
- add_jewels(10);
+ addJewels(10);
break;
case 2: // Blue jewel
if (_G(thor_info)._jewels >= 999) {
cannotCarryMore();
return;
}
- add_jewels(1);
+ addJewels(1);
break;
case 3: // Red potion
if (_G(thor_info)._magic >= 150) {
cannotCarryMore();
return;
}
- add_magic(10);
+ addMagic(10);
break;
case 4: // Blue potion
if (_G(thor_info)._magic >= 150) {
cannotCarryMore();
return;
}
- add_magic(3);
+ addMagic(3);
break;
case 5: // Good apple
if (_G(thor)->_health >= 150) {
@@ -82,27 +82,27 @@ void pickUpObject(int p) {
return;
}
play_sound(GULP, false);
- add_health(5);
+ addHealth(5);
break;
case 6: // Bad apple
play_sound(OW, false);
- add_health(-10);
+ addHealth(-10);
break;
case 7: // Key (reset on exit)
- add_keys(1);
+ addKeys(1);
break;
case 8: // Treasure
if (_G(thor_info)._jewels >= 999) {
cannotCarryMore();
return;
}
- add_jewels(50);
+ addJewels(50);
break;
case 9: // Trophy
- add_score(100);
+ addScore(100);
break;
case 10: // Crown
- add_score(1000);
+ addScore(1000);
break;
case 12:
case 13:
@@ -150,8 +150,8 @@ void pickUpObject(int p) {
_G(thor_info)._inventory |= s;
odinSpeaks((_G(object_map[p]) - 27) + 516, _G(object_map[p]) - 1);
_G(thor_info)._selectedItem = _G(object_map[p]) - 26;
- add_magic(150);
- fill_score(5);
+ addMagic(150);
+ fillScore(5);
}
break;
@@ -219,13 +219,13 @@ bool useApple(int flag) {
if (flag && _G(thor_info)._magic > 0) {
if (!_G(apple_flag)) {
_G(magic_cnt) = 0;
- add_magic(-2);
- add_health(1);
+ addMagic(-2);
+ addHealth(1);
play_sound(ANGEL, false);
} else if (_G(magic_cnt) > 8) {
_G(magic_cnt) = 0;
- add_magic(-2);
- add_health(1);
+ addMagic(-2);
+ addHealth(1);
if (!sound_playing())
play_sound(ANGEL, false);
}
@@ -243,7 +243,7 @@ bool useApple(int flag) {
bool useThunder(int flag) {
if (flag && _G(thor_info)._magic > 29) {
if (!_G(thunder_flag)) {
- add_magic(-30);
+ addMagic(-30);
play_sound(THUNDER, false);
_G(thunder_flag) = 60;
}
@@ -264,10 +264,10 @@ bool useBoots(int flag) {
if (_G(thor_info)._magic > 0) {
if (_G(thor)->_numMoves == 1) {
_G(magic_cnt) = 0;
- add_magic(-1);
+ addMagic(-1);
} else if (_G(magic_cnt) > 8) {
_G(magic_cnt) = 0;
- add_magic(-1);
+ addMagic(-1);
}
_G(thor)->_numMoves = 2;
_G(hammer)->_numMoves = 3;
@@ -290,7 +290,7 @@ bool useShield(int flag) {
if (_G(thor_info)._magic) {
if (!_G(shield_on)) {
_G(magic_cnt) = 0;
- add_magic(-1);
+ addMagic(-1);
setup_magic_item(1);
_G(actor[2]) = _G(magic_item[1]);
@@ -300,7 +300,7 @@ bool useShield(int flag) {
_G(shield_on) = true;
} else if (_G(magic_cnt) > 8) {
_G(magic_cnt) = 0;
- add_magic(-1);
+ addMagic(-1);
}
return true;
@@ -321,7 +321,7 @@ bool useShield(int flag) {
bool useLightning(int flag) {
if (flag) {
if (_G(thor_info)._magic > 14) {
- add_magic(-15);
+ addMagic(-15);
g_events->send("Game", GameMessage("THROW_LIGHTNING"));
} else {
notEnoughMagic();
@@ -336,7 +336,7 @@ bool useTornado(int flag) {
if (_G(thor_info)._magic > 10) {
if (!_G(tornado_used) && !_G(actor[2])._dead && _G(magic_cnt) > 20) {
_G(magic_cnt) = 0;
- add_magic(-10);
+ addMagic(-10);
setup_magic_item(0);
_G(actor[2]) = _G(magic_item[0]);
@@ -353,7 +353,7 @@ bool useTornado(int flag) {
if (_G(magic_cnt) > 8) {
if (_G(tornado_used)) {
_G(magic_cnt) = 0;
- add_magic(-1);
+ addMagic(-1);
}
}
if (_G(thor_info)._magic < 1) {
diff --git a/engines/got/game/script.cpp b/engines/got/game/script.cpp
index 9eef5562cbc..31fc89f90a0 100644
--- a/engines/got/game/script.cpp
+++ b/engines/got/game/script.cpp
@@ -720,7 +720,7 @@ int Scripts::cmd_addJewels() {
_buffPtr++;
- add_jewels(_lValue);
+ addJewels(_lValue);
return 0;
}
@@ -729,7 +729,7 @@ int Scripts::cmd_addHealth() {
return 5;
_buffPtr++;
- add_health((int)_lValue);
+ addHealth((int)_lValue);
return 0;
}
@@ -738,7 +738,7 @@ int Scripts::cmd_addMagic() {
return 5;
_buffPtr++;
- add_magic((int)_lValue);
+ addMagic((int)_lValue);
return 0;
}
@@ -747,7 +747,7 @@ int Scripts::cmd_addKeys() {
return 5;
_buffPtr++;
- add_keys((int)_lValue);
+ addKeys((int)_lValue);
return 0;
}
@@ -756,7 +756,7 @@ int Scripts::cmd_addScore() {
return 5;
_buffPtr++;
- add_score((int)_lValue);
+ addScore((int)_lValue);
return 0;
}
diff --git a/engines/got/game/shot_pattern.h b/engines/got/game/shot_pattern.h
index 46a1153f763..37b57312ab4 100644
--- a/engines/got/game/shot_pattern.h
+++ b/engines/got/game/shot_pattern.h
@@ -26,7 +26,7 @@
namespace Got {
-extern int (*const shotPatternFunc[])(Actor *actr);
+extern int (*const shotPatternFunc[])(Actor *actor);
} // namespace Got
diff --git a/engines/got/game/special_tile.cpp b/engines/got/game/special_tile.cpp
index b19190a70c2..631c1e92a69 100644
--- a/engines/got/game/special_tile.cpp
+++ b/engines/got/game/special_tile.cpp
@@ -60,10 +60,10 @@ int specialTileThor(const int x, const int y, const int icon) {
if ((_G(thor_info)._inventory & 64) && _G(thor_info)._object == 5) {
odinSpeaks(2012, 0);
deleteObject();
- _G(setup).f10 = 1;
+ _G(setup).f10 = true;
} else if (!_G(setup).f10) {
odinSpeaks(2011, 0);
- _G(setup).f10 = 1;
+ _G(setup).f10 = true;
}
return 1;
}
@@ -246,12 +246,12 @@ int specialTile(Actor *actor, int x, int y, const int icon) {
return 0;
}
-void eraseDoor(int x, int y) {
+void eraseDoor(const int x, const int y) {
play_sound(DOOR, false);
_G(scrn)._iconGrid[y][x] = _G(scrn)._backgroundColor;
}
-int openDoor1(int y, int x) {
+int openDoor1(const int y, const int x) {
if (_G(thor_info)._keys > 0) {
eraseDoor(x, y);
_G(thor_info)._keys--;
@@ -267,7 +267,7 @@ int openDoor1(int y, int x) {
return 0;
}
-int cashDoor1(int y, int x, int amount) {
+int cashDoor1(const int y, const int x, const int amount) {
if (_G(thor_info)._jewels >= amount) {
eraseDoor(x, y);
_G(thor_info)._jewels -= amount;
diff --git a/engines/got/game/status.cpp b/engines/got/game/status.cpp
index b84308361fd..3e486fc207f 100644
--- a/engines/got/game/status.cpp
+++ b/engines/got/game/status.cpp
@@ -25,38 +25,38 @@
namespace Got {
-void add_jewels(int num) {
+void addJewels(int num) {
_G(thor_info)._jewels = CLIP(_G(thor_info)._jewels + num, 0, 999);
}
-void add_score(int num) {
+void addScore(int num) {
_G(thor_info)._score = CLIP(_G(thor_info)._score + num, 0l, 999999l);
}
-void add_magic(int num) {
+void addMagic(int num) {
_G(thor_info)._magic = CLIP(_G(thor_info)._magic + num, 0, 150);
}
-void add_health(int num) {
+void addHealth(int num) {
_G(thor)->_health = CLIP(_G(thor)->_health + num, 0, 150);
if (_G(thor)->_health < 1)
g_events->send(GameMessage("THOR_DIES"));
}
-void add_keys(int num) {
+void addKeys(int num) {
_G(thor_info)._keys = CLIP(_G(thor_info)._keys + num, 0, 99);
}
-void fill_health() {
- add_health(150);
+void fillHealth() {
+ addHealth(150);
}
-void fill_magic() {
- add_magic(150);
+void fillMagic() {
+ addMagic(150);
}
-void fill_score(int num, const char *endMessage) {
+void fillScore(int num, const char *endMessage) {
GameMessage msg("FILL_SCORE");
if (endMessage)
msg._stringValue = endMessage;
diff --git a/engines/got/game/status.h b/engines/got/game/status.h
index 58b1df4de09..53bc8e8cd6f 100644
--- a/engines/got/game/status.h
+++ b/engines/got/game/status.h
@@ -24,14 +24,14 @@
namespace Got {
-extern void add_jewels(int num);
-extern void add_score(int num);
-extern void add_magic(int num);
-extern void add_health(int num);
-extern void add_keys(int num);
-extern void fill_health();
-extern void fill_magic();
-extern void fill_score(int num, const char *endMessage = nullptr);
+extern void addJewels(int num);
+extern void addScore(int num);
+extern void addMagic(int num);
+extern void addHealth(int num);
+extern void addKeys(int num);
+extern void fillHealth();
+extern void fillMagic();
+extern void fillScore(int num, const char *endMessage = nullptr);
} // namespace Got
diff --git a/engines/got/views/game_content.cpp b/engines/got/views/game_content.cpp
index 9a3d2d47967..e3afdeb943b 100644
--- a/engines/got/views/game_content.cpp
+++ b/engines/got/views/game_content.cpp
@@ -180,20 +180,20 @@ bool GameContent::tick() {
if (_G(thor)->_health > 0) {
_G(thor)->_health--;
play_sound(WOOP, 1);
- add_health(-1);
- add_score(10);
+ addHealth(-1);
+ addScore(10);
} else if (_G(thor_info)._magic > 0) {
_G(thor_info)._magic--;
play_sound(WOOP, 1);
- add_magic(-1);
- add_score(10);
+ addMagic(-1);
+ addScore(10);
} else if (_G(thor_info)._jewels) {
_G(thor_info)._jewels--;
play_sound(WOOP, 1);
- add_jewels(-1);
- add_score(10);
+ addJewels(-1);
+ addScore(10);
} else {
_G(gameMode) = MODE_NORMAL;
diff --git a/engines/got/views/game_status.cpp b/engines/got/views/game_status.cpp
index 0d06737f236..4923e9f44ed 100644
--- a/engines/got/views/game_status.cpp
+++ b/engines/got/views/game_status.cpp
@@ -123,7 +123,7 @@ bool GameStatus::tick() {
if (_scoreCountdown > 0) {
if ((_scoreCountdown % SCORE_INTERVAL) == 0) {
_G(sound).play_sound(WOOP, 1);
- add_score(1000);
+ addScore(1000);
}
if (--_scoreCountdown == 0) {
More information about the Scummvm-git-logs
mailing list