Depending on other game option checkboxes. This is used to
enable/disable the semi-smooth scrolling checkboxes for FM Towns Loom,
since it's only used when smooth scrolling is enabled.
This might help with bug #12182 where the comment suggests there is a problem
with loading the treasure data. To make sure it loads properly, added a lot
more error checking and error messages, and created unit tests for the same.
On death, the original game only destroys the contents for actors who are
marked as FAST_ONLY, so important NPCs should not lose their contents.
This should improve the behavior a bit and might help to fix bug #12504 (where
malchir should drop a book) - but it does not totally fix that problem so there
is still something else that needs fixing.
This code was originally intended to support Big Endian audio using
libSDL. However, since the missing symbols defaulted to 0 in both cases,
this code was active in all cases which is very wrong for Little Endian
platforms. This should be reviewed and fixed for both BE and LE targets
with testing.
This generated GCC undefined macro compiler warnings when -Wundef was
passed.
In cbcebce55d, I changed the meaning of the flag from "force" to
"move_if_blocked" to fix Crusader's spider bombs. However, with bug #13359
and re-reading the disassembly, true meaning of the flag is more like the
opposite, "abort_if_blocked".
* If the flag is set and the move is blocked, it should not do the move at all.
* If the flag is clear, it should move as far as the blocker.
The return value is 1 if the move completed with no blockers - always 0 if
there was a blocker, even if a partial move was done.
This fixes#13359, and spider bombs still work. Probably fixes some other
weird behavior too.
The engine code would move the camera to the remote viewing location, but the
snap process pulled it back to the player. Fix by disabling snap-to-player if
the avatar is in stasis.
This fixes#13360
In No Regret, there are some areas with a certain invalid shape. Avoid spamming
the log with warnings on every frame in this case.
Also correct variable naming - frame is a local not a member.
I spent all day looking at decompilation and I still don't understand why these
items are not destroyed in the original game, but they shouldn't be destroyed.
Previously x/y values were being divided and multiplied to get the right values
in Crusader with no explanation why. Add a small wrapper function to make it
explicit what is happening.
Also replace unused intrinsic variables with ARG_NULL to avoid unused variable
warnings in some newer gcc versions.
The original multiplies the direction value by 2 on load.
This and the previous fix to Pace Process fixes the first NPC guard in No
Remorse difficulty level so he now behaves almost identical to the original
game, yay!
Previously we were not waiting for the correct anim process in the turn, which
caused frequent ANIM_LOCK warnings and the actors did not turn to the correct
final direction.
This fixes pace so they now correctly pace back and forth.
There are some rare cases where modals can stack (eg, credits playing on top of
menu). In this case we want to close the credits first, then the menu.
Add a little hack to ensure the order is right.
This also fixes#12995.
A followup to bug #13176.
One of the problems in the savegame on the bug is trying to pop items to
containers that don't exist. This maybe never happens in the original, but if
it does the item will be popped off the ethereal list and discarded anyway,
which we were previously not doing.
This mistake meant there were objects left over on the ethereal list which
shouldn't be there. They could probably get mixed up with other items by game
scripts, which is possibly the cause of the original bug.
In investigating, I also discovered that if a non-container is passed to the
original games the object will still be popped to the location of the
"container". I'm not sure if this behavior is ever needed, but implemented in
case.