[Scummvm-git-logs] scummvm master -> b978c7c2b690b71546147f8f66c56fa358978a83
dwatteau
noreply at scummvm.org
Mon Apr 14 09:39:55 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
b978c7c2b6 GOT: Prefix `_Z` and `_B` defines to avoid OS clash
Commit: b978c7c2b690b71546147f8f66c56fa358978a83
https://github.com/scummvm/scummvm/commit/b978c7c2b690b71546147f8f66c56fa358978a83
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2025-04-14T11:38:13+02:00
Commit Message:
GOT: Prefix `_Z` and `_B` defines to avoid OS clash
`_B` may already be defined in OpenBSD ctype.h, for example.
Changed paths:
engines/got/data/defines.h
engines/got/game/boss1.cpp
engines/got/game/boss3.cpp
engines/got/game/script.cpp
diff --git a/engines/got/data/defines.h b/engines/got/data/defines.h
index ce0ed56960c..c84b46b83db 100644
--- a/engines/got/data/defines.h
+++ b/engines/got/data/defines.h
@@ -45,8 +45,8 @@ struct Header {
#define MAX_ENEMIES 16
#define STAMINA 20
-#define _Z 44
-#define _B 48
+#define GOT_Z 44
+#define GOT_B 48
#define TMP_SIZE 5800
#define GAME1 (_G(area) == 1)
diff --git a/engines/got/game/boss1.cpp b/engines/got/game/boss1.cpp
index c0206ca5f40..4990685b18f 100644
--- a/engines/got/game/boss1.cpp
+++ b/engines/got/game/boss1.cpp
@@ -179,7 +179,7 @@ void boss1CheckHit(const Actor *actor, const int x1, const int y1, const int x2,
if ((!_G(actor[3])._vulnerableCountdown) && (_G(actor[3])._nextFrame != 3) &&
overlap(x1, y1, x2, y2, actor->_x + 6, actor->_y + 4, actor->_x + 14, actor->_y + 20)) {
actorDamaged(&_G(actor[3]), _G(hammer)->_hitStrength);
- if (_G(cheat) && _G(keyFlag[_Z]))
+ if (_G(cheat) && _G(keyFlag[GOT_Z]))
_G(actor[3])._health = 0;
else
_G(actor[3])._health -= 10;
diff --git a/engines/got/game/boss3.cpp b/engines/got/game/boss3.cpp
index 75a55e78022..cb22c68eebc 100644
--- a/engines/got/game/boss3.cpp
+++ b/engines/got/game/boss3.cpp
@@ -418,7 +418,7 @@ static void boss3CheckHit() {
if (!_G(actor[3])._temp2) {
actorDamaged(&_G(actor[3]), 10);
- if (_G(cheat) && _G(keyFlag[_Z]))
+ if (_G(cheat) && _G(keyFlag[GOT_Z]))
_G(actor[3])._health -= 50;
else
_G(actor[3])._health -= 10;
diff --git a/engines/got/game/script.cpp b/engines/got/game/script.cpp
index dbcac6e5b3d..8cba94faca6 100644
--- a/engines/got/game/script.cpp
+++ b/engines/got/game/script.cpp
@@ -141,7 +141,7 @@ void Scripts::runScript(bool firstTime) {
void Scripts::scriptLoop() {
while (_paused == SCRIPT_READY) {
- if (_G(cheat) && _G(keyFlag[_B]))
+ if (_G(cheat) && _G(keyFlag[GOT_B]))
break;
int ret = getCommand();
More information about the Scummvm-git-logs
mailing list