When an actor which is drawn using sprites moved due to water float
effects and if that actor uses multiple sprites, then these sprites are
not aligned (e.g. in the very first scene, the ship in the background is
not shown as one piece).
That is because the sprites are first rotated and then moved to
the correct position. It is necessary to first move them to their
correct position on the actor and then rotate the whole actor.
Additionally, non-overworld sprites needs to be rotated by the Yaw axis.
Otherwise the ship did not rock but only moved vertically.
This changes fixes:
- the ship in the background in the first scene
- the clock hands in the swamp
When mapping a sprite to a GL polygon its dimensions are scaled by the ratio
between the current screen resolution and the native game resolution. When
the polygon is rendered it is scaled again, causing sprites to be displayed
unproportionally big when using larger screen resolutions.
The MakeScreenTextures() opcode is used to create texture tiles from the
current screen content for use with an overworld actor, e.g. when fading over
the slides in the intro. With OpenGL the created textures were mirrorered in
y direction because OpenGL uses a different coordinate system where (0, 0)
is the bottom left corner.
During the run of the "dock" video (first arrival at melee island) only
a black screen was displayed although the sound did work.
The lua code dims (_dimLevel = 1) the scene before showing a video so
that only the video is visible. GfxOpenGL::drawBitmap sets the current
color according to the dim level before it starts drawing the bitmap:
glColor3f(1.0f - _dimLevel, 1.0f - _dimLevel, 1.0f - _dimLevel);
If there is no other glColor* call before drawing the video, the current
color stays (0, 0, 0) and the video won't be visible.
The bug fix resets the color to (1.0, 1.0, 1.0) after the drawing of the
bitmap at the end of GfxOpenGL::drawBitmap.
Sprite actors, e.g. ships of the balloon in the Scumm bar, should
always face the camera, so the rotation part of their matrix has
to be reset before rendering. The code already exists for Grim, but
appears to work for EMI as well.
Previously, we split the background layers into everything
before SO 15 and after, and drew like that. However, this caused
the pink ship in shi.setb to not be drawn.
This patch draws the layers of the background at intervals of ten.
So if a set has six layers, layer 5 is the background and 4,3,2,1,0
are rendered at sortorder 40,30,20,10,0.