It may be because of an underlying bug, but there is at least one
case where a script is unloaded and replaced by another script while
that script slot still has an active subtitle. This causes it to
print random garbage for me, and may be causing crashes for others.
I've discussed this patch with johndoe, and he was ok with it, so
let's see how it works out.
Both the "wobble" and the positions were slightly off. I didn't
want to change _verbLineY because for one thing it doesn't seem to
affect the drawing of the verbs, and for another it seems to be
stored in savegames because... squirrel!
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.
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)
- Save scene parameters before playing a movie and restore them afterwards (fixes crash)
- Fix text disappearing too fast
- Implement script function sfGetCameraChanged
- Replace nop script functions with stubs which print debug info when called
- Some cleanup, remove obsolete TODOs
- ...and load the system strings from the resource on startup
- Only redraw menu screen when required
- Change parameters for some text functions from byte* to const byte*
- Rename some mouse vars
- Hooked up the movie player; movies can be aborted with Escape (not with mouse clicks at the moment because I was too lazy to implement it; funny, writing this explanation probably took longer :))
- Optimized drawing code; now only items (sprites, text, screen masks) which have changed from the previous frame are redrawn, this speeds up things a lot
- Implemented dirty rectangles using a microtile array
- The previously committed Microtile Array implementation from SEL seemed buggy so I wrote my own version which works nicely so far (and is less code and GPL), only MicroTileArray::getRectangles uses parts from the old version, this will be changed later
- One known bug related to dirty rectangles remains: Sometimes the background isn't restored correctly and gfx artifacts are visible