INDY3/FOA: bug in patch for series IQ with ScummVM GUI
|Reported by:||SF/tobigun||Owned by:||fingolfin|
|Game:||Indiana Jones 4|
In my patch "INDY3/FOA: series IQ with ScummVM GUI" (ID: 2676453; already committed and closed) there was a bug.
byte saveLoad = (_saveLoadFlag != 0);
byte saveLoad = _saveLoadFlag;
Otherwise "saveLoad == 2" is never true. saveLoad was a boolean var first and changed later to byte without me recognizing that it was broken.
I've added a patch for fixing this. By this, I've also changed the type of puzzleIQ from char to byte as an unsigned type fits better (although the max. puzzle-IQ is 100, so it was not a bug).
Additionally I have documented byte 73 of the IQ-String which is used by the original script for IQ-point calculation but ignored by updateIQPoints(). It does not contain a puzzle's IQ but a flag that indicates if the IQ-file was loaded successfully (0 in this case, otherwise 0xFF but reset to 0 in script 9 before performing the IQ-point calculation). As it is always 0 on the IQ calculation it doesn't hurt but it shouldn't be used as done by the original script.
Ticket imported from: #2710315. Ticket imported from: bugs/4248.