aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute
diff options
context:
space:
mode:
Diffstat (limited to 'engines/wintermute')
-rw-r--r--engines/wintermute/video/video_theora_player.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/wintermute/video/video_theora_player.cpp b/engines/wintermute/video/video_theora_player.cpp
index f75c7ba5b6..31e6b1fcb7 100644
--- a/engines/wintermute/video/video_theora_player.cpp
+++ b/engines/wintermute/video/video_theora_player.cpp
@@ -344,10 +344,18 @@ void VideoTheoraPlayer::writeAlpha() { // TODO: Endian-fix.
assert(_alphaImage->getSurface()->format.bytesPerPixel == 4);
assert(_surface.format.bytesPerPixel == 4);
const byte *alphaData = (byte *)_alphaImage->getSurface()->getBasePtr(0, 0);
+#ifdef SCUMM_LITTLE_ENDIAN
int alphaPlace = (_alphaImage->getSurface()->format.aShift / 8);
+#else
+ int alphaPlace = 3 - (_alphaImage->getSurface()->format.aShift / 8);
+#endif
alphaData += alphaPlace;
byte *imgData = (byte *)_surface.getBasePtr(0, 0);
+#ifdef SCUMM_LITTLE_ENDIAN
imgData += (_surface.format.aShift / 8);
+#else
+ imgData += 3 - (_surface.format.aShift / 8);
+#endif
for (int i = 0; i < _surface.w * _surface.h; i++) {
*imgData = *alphaData;
alphaData += 4;
@@ -381,8 +389,6 @@ bool VideoTheoraPlayer::display(uint32 alpha) {
//////////////////////////////////////////////////////////////////////////
bool VideoTheoraPlayer::setAlphaImage(const Common::String &filename) {
- warning("VideoTheoraPlayer::SetAlphaImage(%s) - Not implemented", filename.c_str());
-
delete _alphaImage;
_alphaImage = new BaseImage();
if (!_alphaImage || DID_FAIL(_alphaImage->loadFile(filename))) {