There was another occasion where the episode iq point would
be written into the series iq file. Also, the loading routine wasn't
always working correctly.
This fixes#15064. The CTRL-B combination was used in COMI to
regulate the buffer count for iMUSE, so I originally decided to extend
it to SCUMM v7 games. Unfortunately DIG uses this combination for
an easter egg, so the iMUSE buffer function is now available through
SHIFT-B for this game.
Currently, buffers get allocated that do not get freed. Apparently,
the reason is that it is not well known when it is actually safe to
do that. This here should hopefully fix the situation. Or at least
give some inspiration on how to fix it...
According to the manual, "You will be given a chance to change your
mind" when clicking on the "Reset Series IQ button". I've never seen the
original do that, but I like the idea so let's add it as an enhancement.
(NB: Resetting the IQ score currently does not work properly.)
This slightly changes the velocity of hits when the player is using a power swing.
The previous iteration of this mod reduced the velocity of hits with power swings, making them less effective relative to line drive and grounder swings. After 6+ months of competitive play, the consensus among the community is that this has made power swings not viable - using a line drive swing is almost always optimal, which makes gameplay less interesting.
This change is intended to make the decisions on what swing type to use more interesting.
When clearing the series IQ points (only in the Mac version of Indiana
Jones and the Last Crusade?), make sure to close the file immediately
after zeroing it. Otherwise, it may not have been created when
updateIQPoints() tries to read it.
Note that clearing the series IQ point seems to be broken at the time,
and this does not fix that. But one thing at a time.
When generating a Katton map with no water, the code tries to modulo
a number by 0, which causes a crash. This fixes this.
Crash also occurs in original Moonbase Console.
The random number generation will generate the same numbers from
a given seed in a particular order. However, when passing
function calls as parameters to another function, the order
in which those parameter calls are made is undefined. If the code is compiled
on different platforms using different compilers (e.g. macOS/clang
vs linux/G++), this order can be different, which results in
different random numbers being assigned to different variables.
The fix is to pull out the parameter function calls as variables
so that the order in which the generated random numbers are assigned
is the same, regardless of compiler/platform.
The MD5 comparison code was checking the locally generated MD5 of the
Mapfile with the MD5 in the first session (_sessions[0]) instead of
the one passed into the parameter.
There was a formatting error in the errorCorrection() method
ran after generating the map. One of the iterating for loops was meant to be nested in the other,
but instead it ran afterwards, causing some error conditions to get missed
and causing a crash later in the program.