This fixes an assert with the new GUI (bug #12578).
This also required changing the logic to handle the cursor key color
as the new GUI does not use that key color but use the alpha channel.
The logic in the iOS backend was overwriting the alpha channel
by checking the key color, removing all the transparency. Now the
two are combined (hopefully there is no case were it uses the key
color while also using a pixel format with alpha, but not setting
this alpha, because if there is, this will now result in a fully
transparent cursor).
Makes the signature more precise so that it's not accidentally applied
to the wrong place when a script already contains this patch.
Fixes incompatibility with NRS' SQ4 Update 1.3
These changes are currently pointless, since the affected function variants won't be called. The Japanese game versions for which they would be used are not supported in non-USE_RGBCOLOR builds. But the code should be correct nonetheless...
("drawing" in this case means the data conversion and transfer from the gfx layers to the screen buffer)
From my measuring experiments in the MSVC debugger this speeds up the drawing 2 - 3 times. Not sure about release builds, whether these profit even more.
--debuglevel=2 will show the call stack after each function call
--debuglevel=3 will show the current instruction
--debuglevel=5 will show the stack after each instruction
--debuglevel=9 will show the variables after each instruction
(partly revert fb8f1084)
There is no simple solution that would still leave the "butter smooth" scrolling for faster platforms intact. I have measured times between several code points to find any bottlenecks. My finding is that even single script opcodes may well take over 200ms to execute. And exceeding a singe 60 Hz tick happens way more often (which makes the scrolling fall behind and have to catch up, thus becoming a bit sloppy). So, for the "butter smooth" scrolling I'll probably implement a timer for the screen updates (which will then really behave much more like the interrupt handler of the original). But that's for a separate commit. This one is mostly about the bug ticket..