[Scummvm-git-logs] scummvm master -> a9e94fad331f3f96fdd6598280ab9a6aa1246e86
digitall
noreply at scummvm.org
Wed Jan 25 01:01:46 UTC 2023
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:
a9e94fad33 MM: MM1: Further Fix For Unused Variable GCC Compiler Warnings
Commit: a9e94fad331f3f96fdd6598280ab9a6aa1246e86
https://github.com/scummvm/scummvm/commit/a9e94fad331f3f96fdd6598280ab9a6aa1246e86
Author: D G Turner (digitall at scummvm.org)
Date: 2023-01-25T01:01:30Z
Commit Message:
MM: MM1: Further Fix For Unused Variable GCC Compiler Warnings
Changed paths:
engines/mm/mm1/game/combat.cpp
diff --git a/engines/mm/mm1/game/combat.cpp b/engines/mm/mm1/game/combat.cpp
index f31b78635bc..9848b2c3dae 100644
--- a/engines/mm/mm1/game/combat.cpp
+++ b/engines/mm/mm1/game/combat.cpp
@@ -404,16 +404,17 @@ void Combat::selectTreasure() {
}
void Combat::selectTreasure2(int count) {
- static const byte TREASURES_ARR1[6] = { 1, 61, 86, 121, 156, 171 };
- static const byte TREASURES_ARR2[6] = { 12, 5, 7, 7, 3, 12 };
- int idx;
-
_treasureFlags[count - 1] = true;
- idx = getRandomNumber(0, 5);
+ int idx = getRandomNumber(0, 5);
+
// FIXME: Should these be used instead of _val1 class variable?
- //byte val1 = TREASURES_ARR1[idx];
- //byte val2 = TREASURES_ARR2[idx];
+#if 0
+ static const byte TREASURES_ARR1[6] = { 1, 61, 86, 121, 156, 171 };
+ static const byte TREASURES_ARR2[6] = { 12, 5, 7, 7, 3, 12 };
+ byte val1 = TREASURES_ARR1[idx];
+ byte val2 = TREASURES_ARR2[idx];
+#endif
for (idx = 0; idx < count; ++idx)
_val1 += _allowFight;
More information about the Scummvm-git-logs
mailing list