EMI: Compare the camera-space Z coordinates of actors instead of their Euclidean distance to the camera.
EMI: Get the sort order from the closest sector even if the current position is not contained within any sector.

This fixes Guybrush occasionally being visible through the buildings and foliage on Lucre island when walking at the edge of the walkable sectors. This happened because for positions at the edge of the walkable sector the method Sector::isPointInSector may not always return true.
EMI: Do not reset sort order when the set changes.

The original game doesn't reset the sort order. This fixes, for example, the voodoo anklet being visible through walls after leaving the jail set.
EMI: Only return a sector sort order if the nearest point on a sector is closer than 0.01 units.
EMI: Set sector sort order to 0 if the current sector does not specify a sort order.
EMI: Remove clamping from prepareTextures.
Merge pull request #1035 from JoseJX/FixClamping

EMI: Remove clamping from prepareTextures.
ALL: synced with ScummVM
GRIM: Enable alpha test when drawing sprites.
MYST3: Don't add terminating '\0' to subtitle string. Fixes #1040.

It's not needed when using Common::String, since they keep track
of the length in a separate field, and it caused glitches when
ResidualVM was compiled without TTF support. See issue #1040,
"MYST3: Subtitles show box at end of every line", for an example.
Merge pull request #1043 from eriktorbjorn/myst3-subtitles

MYST3: Fix for issue #1040, "MYST3: Subtitles show box at end of every line".
GRIM: Fix the color key value in TinyGL.
Merge pull request #1049 from Akz-/grim-colorkey-fix

GRIM: Fix the color key value in TinyGL.
Merge pull request #1041 from Akz-/grim-sprite-fix

GRIM: Enable alpha test when drawing sprites.
Merge pull request #1026 from Akz-/emi-sortorder-fix

EMI: Sort order fixes
EMI: Free costumes once all chores have finished.
EMI: Return the first costume that has a model component in Actor::getCurrentCostume.
EMI: Do not reset the costume when a new wear chore is started. Fixes #878
EMI: Remove special treatment of wear chores which is no longer necessary.
EMI: Make Lua_V2::findCostume only return true if a costume is found.