[Scummvm-tracker] [ScummVM :: Bugs] #14427: XEEN: negative toHit underflow
ScummVM :: Bugs
trac at scummvm.org
Sat Apr 22 11:51:56 UTC 2023
#14427: XEEN: negative toHit underflow
--------------------+------------------------
Reporter: yarolig | Owner: (none)
Type: defect | Status: new
Priority: low | Component: --Unset--
Version: | Resolution:
Keywords: | Game:
--------------------+------------------------
Comment (by yarolig):
My hack to fix it:
{{{
diff --git a/engines/xeen/resources.cpp b/engines/xeen/resources.cpp
index e830d11491d..6fa09c5b48b 100644
--- a/engines/xeen/resources.cpp
+++ b/engines/xeen/resources.cpp
@@ -146,6 +146,13 @@ void Resources::loadData() {
file.syncNumbers(METAL_DAMAGE, 22);
file.syncNumbers(METAL_DAMAGE_PERCENT, 22);
file.syncNumbers(METAL_LAC, 22);
+
+ for (int a = 0; a < 22; ++a) {
+ if (METAL_DAMAGE_PERCENT[a] > 127) {
+ METAL_DAMAGE_PERCENT[a] -= 255;
+ }
+ }
+
file.syncNumbers(ARMOR_STRENGTHS, 14);
file.syncNumbers(MAKE_ITEM_ARR1, 6);
file.syncNumbers3D((int *)MAKE_ITEM_ARR2, 6, 7, 2);
}}}
--
Ticket URL: <https://bugs.scummvm.org/ticket/14427#comment:1>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list