Try to mimic more closely what is done in the executable.
Fixes black squares sometimes blinking around the cursor (just after selecting the character, when hoovering seeds bags in the vegetable garden...), and fix a temporarily disappearing "waiting" cursor in some "change CD" screens.
In some cases, e.g. Adibou walking from his house, the animation is drawn using video object and _mult->animate() calls, but outside any "evaluate hotspots" loop. The loop is done directly from the scripts and has no synchronization with frame rate, so the animation goes too fast.
We add a timing correction in the animate() loop, by not incrementing the video frame number in video object if we are in advance, and continuing the loop, to keep the UI responsive.
The script relies on "var_off_212" (current frame) becoming "-1" when the video ends, but its update was disabled for sound-only videos, by a hack for "Bamboo" game to deal with multiple live videos.
We disable this hack (i.e. re-enable var_off_212 update) when there is only one "live" video.
waitSoundEnd call finishSound(), an then updateLive(), which will load new frames while being in "finished" state.
The !props.noBlock check on call site was not enough, as sometimes the close order on a live video does not have "live" flags.
Besides startFrame == -2, it seems that a video must also go to the background (i.e. be non-blocking) if start_frame == end_frame == 0 *and* if it is not to be drawn into a specific sprite.
But more conditions may apply - they are very difficult to follow in the ASM.
This fixes interrupted sound issues in Adibou2 "Playtoons" minigame help descriptions.
It seems that this bug is harmless in the original game because it requires a certain combination of files to be present in the CD, which is not the case in practice in Adibou2 CDs ; but it exists for us because our fake "CD" search includes all files in game directory and sub-directories.
This workaround solves audio/video sync issues that used to appear frequently in many animations, e.g. when Adibou kicks the ball in the garden.
Those animations easily get out of sync when the timing is done by hotspots::evaluate, which sometimes does not call animate() as often as needed for good sync (mouse events processing, in particular, can delay the call).
The original game seems to use also some kind of frame skipping to address this problem.
CRLF is sometimes found at the end of resource strings, but uselessly (the "printText" opcode has no is no "newline" capacity)
Fixes garbage characters in Adibou2 diploma text.
Some versions of Adibou2 are only able to handle one CD at a time. This workaround enable to add Adibou2 applications by copying them as a subdirectory of the game directory, just like in multi-cd-aware versions.
Characters deletion in Adibou2 work by deleting all files matching with character number as suffix, but this removes also some unrelated save files about installed applications
Fixes the "delete character" button in Adibou2
We cannot strip paths for this opcode, as scripts sometimes delete all files in a directory (e.g. "TEMP\*.*", that would have been simplified as "*.*" with path stripping).
Use also full path match for read/write/copy/move operations, to allow distinguishing savegames with same filename under different directories, with a fallback to simple filename matching.
Ints were converted to uint16 first and then uint32 before being pushed, and popped as uint32, so a pushed (int32) "-1" was popped as (uint32) 65535.
This fixes an infinite loop when making a mistake in Adibou2 "write sentence in order" exercise.
A "resource ID -> name" mapping found in some NE executables, stored as a resource.
Not described by any documentation I could find, but the corresponding #define can be encountered in some old header files.
Mentioned by this blog post https://www.toptensoftware.com/blog/win3mu-5/ (section "The Mysterious Resource Type #15").
They will just land on the save directory, as other saves, with fix filename "adibou2_drawing_on_floppy_disk".
The use case is to facilitate sharing drawings between different Adibou characters, for example to continue a friend's drawing. In this view, we wrap the full picture and its thumbnail in a same file with a fix filename, so that one need only to move the "adibou2_drawing_on_floppy_disk" file between Adibou2 installations to share "floppy disk" drawings.
No fade transitions in the original game, and it leads to glitches (e.g. sometimes a scene is shown to soon, with a wrong palette, due to unexpected retrace in fade() call).