Same issue as in the last commit: glTexSubImage2D is slow, so cache
all copyRect*() calls in a buffer, and update the dirty rect once
when drawing. Reduces CPU usage on 16bit games significantly.
Also, lockScreen() returns now pixel data for non-CLUT8 games instead
of asserting.
Some GLES drivers suck so much that uploading data to the GPU takes
ages. CLUT8 games now use a faked paletted texture, which internally
uses a RGB565 hardware texture (Android's native pixel format).
This seems to be the only way to efficiently implement constant
changing textures with GLES1 - at the cost of extra buffers.
Then again, we can now use glTexSubImage2D to only update the dirty
rects, which wasn't possible before because glCompressedTexSubImage2D
is only usable on GLES2. This commit does exactly that.
Overall, the CPU usage is massively reduced for CLUT8 games.
This was caused by a buggy script, most probably the result of an
incorrect copy/paste while processing the original script. Fixed with a
script patch.
Fixed a bug (the "bwt" and "bc" options were inversed) and added the
ability to skip a defined number of ret calls, useful when a function
continues after a ret call
The cause for this bug turns out to be a corrupt object that as
a side effect accidentally bypasses its own corruption. See the
added comments for details.
Also add a warning that points out similarly corrupted objects.
This is a heap patch for an odd object used in that scene, which will
suffice for now (until we find why this works in SSCI). Thanks to wjp
for his help and work on this
Trying to delete a script marked as deleted should do nothing. Hoyle 3
tried to uninstantiate scripts more than once, and we incorrectly
decreased the reference count of associated scripts more than once,
thereby killing them. This properly fixes bug #3038837 (removed the
hack for it). Many many thanks to wjp for his help on this :)
Thanks to waltervn (and wjp) for their investigation on this and Walter's SCI
specific workaround which I more or less just copied here so it will apply for
all engines.