Allow reloading individual kyradat resources with a different language. Until now, our multi-language games did not require this, but for more or less random reasons (e. g. it just isn't possible to restart the intro or the main menu after changing the language ingame). However, the Chinese MR versions require this for the font loading.
Animations often run at full speed without any delays. Apparently the target hardware of that time (286/386, Amiga, Mac) would ensure sufficient slowdown. Unfortunately, comparing with DOSBox, ScummVM runs somewhat faster. I have tried to add extra delays depending on the amount of onscreen activity. I have finally gotten a result which is very similiar to DOSBox execution.
Basing this on the screen activity is not optimal. Ideally, it would be based on the orignal cpu activity. But we can hardly do that...
(regression from 6f2df10d)
The dialog text displayer functions really only handle '\n' in the Mac version. But the equivalent function to our Screen::printText() function actually handles both '\r' and '\n'.
Apparently, as I have been told, there are (still) OS'es with non-compositing window managers which may cause glitches when drawing windows over the ScummVM window, unless the engine keeps updating the screen. So, now we do that, even if there isn't any actual on-screen activity. The whole thing is a bit more tricky than it would appear at first glance, since one misplaced/untimely screen update may cause palette glitches. I have implemented a timer which is reset whenever actual on-screen activity happens. That should work around any such glitches.
Maybe the rates for the timer have to be tweaked some more. I have also added an ifdef so this could be disabled or restricted to certain platforms if required.
Mac uses '\n' instead of '\r'. I have verified from disasm that it only uses '\n'. '\r' is not used at all.
Now, I know only 2 cases where it matters and these are hard coded cases: "That snake must\nbe poisonous!" and "The flask is now filled\nwith %s water.". So I could just hard code these differently.
But the scripts might have more of these linebreaks, so it makes sense to have it accurate...
(the Chinese font code is similiar enough between the KYRA games, but with some differences (e. g. LoK has the Ascii glyphs in an extra file, MR has these in the executable; LoK has a lookup table for the two-byte glyphs etc.)
The ingame graphics use up 208 pixels out of 224. The top and bottom 8x8 pixel tile rows are left blank.
This commit emulates that. But actually it looks ugly, especially in windowed mode. On a TV screen of that era it was probably unnoticeable.
TODO: GET RID OF THIS COMMIT AND FIND ANOTHER SOLUTION
The first level will now load up when selecting 'start default party' and it is possible to walk around a bit. The Gui (playfield, compass, inventory) is still completely broken, but at least the level blocks and some of the decoration shapes are drawn correctly. Monsters will be drawn, but their anim frames are mixed up, so they will always face the wrong direction and cannot visibly attack.
- add support for the Sega Font and add text display methods at least for the sequence player
- finish sequence player (add all missing opcodes and other missing code portions)
- some improvement to the resource class
- some renaming and cleanup
This has become too fast for modern systems and needs an extra delay. Otherwise the screen shake won't be actually noticed.
There seem to be other issues with shakeScreen outside the Kyra code that have to be addressed separately (improper scaling of the shake offsets).