I don't know how often the original shook the screen (perhaps as
often as it could?), but at least we now have the opportunity to
shake the screen more than once per movie frame.
All this does is to offset the image when copying it to the screen,
and offset the position when checking for clickable items at specific
coordinates. It looks and works right to me. I guess that just leaves
the buildColorTransTable2() function, but I'm useless for that so
someone else will have to look into it.
At least on my computer, the sound would stall frequently after a
while because the delay between frame was calculated from frame to
frame. Now it's calculated from the start of the sound instead.
I'm guessing that the unused _top variable is what causes the main
menu to be drawn at the wrong position at the very start of the
game. At that point, it's 30 which seems to be by how much the Y
coordinate is off.
The shadeRect() function is called just once (at the time of writing)
and immediately afterwards the "front screen" is copied to the
"background". Therefore, drawing to the background doesn't seem to
make any sense.
The colors are wrong, but I assume that's for the same reason that the
text colors are wrong as well.
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g'
This seems to have caught some params as well which is not undesirable IMO.
It also caught some strings containing this which is undesirable so I
excluded them manually. (engines/sci/engine/kernel_tables.h)
Updating the screen when getMillis() % 10 is 0 seems sub-optimal
to me. It could be true several iterations in a row (shouldn't be
harmful, since updateScreen is assumed to be cheap if the screen
hasn't changed) or we could miss it every single time. Let's
measure the time between updates instead, just to be safer.
- Updated locations where the animation hack is necessary
- Fixed crashes on scene changes (with a TODO)
- MIDI Music is always XMIDI
- sfClearScreen() doesn't seem to be necessary