EMI: Use uint32 to store actor alpha mode

Storing the actor's alpha mode in a byte does not work when the value is
negative (AlphaOff == -1).
EMI: Save/restore state of costumes

EMICostume overrides the parent class's saveState/restoreState methods with
NOP functions, causing a great number of graphical glitches after restoring
a savegame. EMI costumes do not seem to have any additional dynamic state,
so the parent save and restore methods work just fine.
EMI: Fix display of "dock" video

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.
EMI: Fix turn_rate of voodoo chair

The turn rate for the chair of the voodoo lady is set to 1 in the lua
code which makes the turn animation very slow (> 30s).

Since the rate value of 1 is not used otherwise in EMI, adjust the
turnrate in this case.
Merge pull request #763 from inguin/emi-fixes

EMI: Savegame fixes
Merge pull request #764 from chkr-private/emi-fixes

EMI: various small bug fixes
GRAPHICS: Fix off-by-one error in software renderer
EMI: Fix color of menu entries

The highlighted menu entry is sometimes not correctly colored.
There are multiple textObjects per string (one for each color) and
residualvm draws them in an unspecified order.

To ensure that the correct textObject is drawn on top, each
object gets a layer attribute assigned by the lua code.

The patch adds the layer attribute to the runtime engine and orders the
textObjects by layer before drawing them.
Merge pull request #765 from chkr-private/menu-text-fixes

EMI: Fix color of menu entries
EMI: Fix actor orientation

EMI uses a different coordinate system than Grim, so we have to switch
dimensions in various places to share common code for walking and turning
actors. This patch fixes several yaw angle sign errors causing actors to
look into wrong directions.
Merge pull request #767 from inguin/emi-actor-yaw

EMI: Fix actor orientation
GRIM: Add a const_cast as making ts const is not worth the effort
EMI: Fix the intro at cs_dock getting stuck in the PS2-version.

IsActorChoring takes different parameters in EMI than it does in Grim,
the original code was prudent enough about checking it’s parameters that
it actually ran fine, however the problem was that the argument that
said whether we should ignore looping chores was moved. This lets the
intro play the cut scene on the docks.
EMI: Allow movie skipping in the PS2-version.

Catch the ESC-key event manually for the PS2 version,
to allow skipping movies. (This also eats up the ESC-key event,
to avoid passing it on to lua afterwards).
EMI: Avoid updating lua while playing movies in the PS2-version.

Otherwise the scripts that start after a movie start prematurely, in the
case of the dock intro, this means that the dialogue on the docks starts
playing at the same time as the arrival video starts playing. With this
fix we avoid that issue, resuming operation as normal only when the movie
is finished.
EMI: Make attached objects use their parents sort order
Merge pull request #769 from klusark/sort

EMI: Make attached objects use their parents sort order
EMI: Select the correct turn chore

In EMI's coordinate system, other than in Grim, actors turn right when
the yaw angle is increasing. Select the correct turn chore for the turn
direction.
Merge pull request #770 from somaen/fixPS2intro

EMI: Fix the intro at cs_dock getting stuck in the PS2-version.
Merge pull request #771 from somaen/fixPS2movies

RFC: EMI: Fix ps2movies