Indeed, we were missing some code from the original
which handled overlapping actors in which some moved
and some did not, which caused the latter to be erased.
Thanks eriktorbjorn for the great pointers on this.
This is a follow to my previous commit. We get rid of
the remaining LOOM FIXME. I have checked the different
SCUMM versions to see when the _ignoreBoxes check got
introduced.
(missing room check)
This was (again) a very old bug that got unmasked
by recent changes. There was even a comment
from 2003 about how original DIG checked for the
current room, but we - allegedly - wouldn't have to
do that.
There is still a FIXME about Loom. I'll have a look at
that, too, since it is not difficult to do...
The turning interpolation was completely disabled for v7/8, since it
interfered with DIG walk scripts. The result was that DIG was the only
v7/8 game that still had (script controlled) turning animations. COMI
and FT don't use walk scripts. So the actors would just flip directly from
the current facing direction to the target facing.
I have now changed parts of the walking code (and some other parts)
to better match the original v7/8 code.
Albeit not 100% necessary for rewriting the HE sound engine,
I decided to make this change in order to:
- Give proper meaning to magic numbers and variables
which were given temporary names 20 years ago;
- Avoid going insane when making comparison with HE code
and ours, when rewriting the sound code.
This enhancement could probably be improved if the original issue is
real, since the game really doesn't expect you to go back to the
front of the castle, but as I don't own the German release and can't
reproduce this bug from a normal gameplay on my other releases, I'd
rather only adjust the _enableEnhancements flag for now.
When Low finds the meaning of the crypt inside the tomb, subtitles are
not printed because of a missing waitForActor() call. This also happens
in the original interpreters.
In Trac#4410 and commit 3b05a52588, this
was implemented as an actor.cpp workaround, but doing it this way make
Low glide on the floor instead of having his usual walking animation.
Having him wait finishing his sentence before he moves to the crypt may
feel a bit odd too, but Low already does that in some other parts of the
game, and he just reacts at a very slow pace in general.
Moving this to o6_talkActor() also means that it's next to the other
waitForActor() workarounds, where we try to only target the impacted
lines when we can.
Also make this workaround use `_enableEnhancements` while there.
_walkbox may be equal to kOldInvalidBox, which is 255, but then
_extraBoxFlags[_walkbox] would be dereferenced while _extraBoxFlags only
has 65 elements.
Found with UBSan in Loom Talkie, when the leaf falls from the tree.
This commit:
- Continues my AKOS relabeling task and adds some documentation and missing information;
- Renames the codec functions from codec1, codec5 and codec16 to something more expressive;
- Add '_' in front of private class members, when missing;
- Changes "v1" names (unnamed variables supposedly coming from Ghidra or similar tools...) to something more expressive;
- Renames related variables from foo_bar (or foobar) to fooBar (on costume.cpp, base-costume.cpp and akos.cpp).
This is part of an on-going effort on my end to document the AKOS code, and fix strange stuff
such as integers being used as booleans, and variable_names instead of variableNames
Guybrush can read the clock of Puerto Pollo, but this was only enabled
in the English, Italian and (fan-made) Russian releases, probably
because the result was poor for the other languages.
The German, French, Spanish, Brazilian Portuguese and CJK releases
disabled this feature, but the check was done in the interpreter, not in
the scripts. This replicates this original behavior.
Findings and ScummEngine_v7::actorTalk() change by AndywinXp.