[Scummvm-git-logs] scummvm master -> ad64bb6843dceb501680592e0e5129e5797312d4

mduggan noreply at scummvm.org
Tue May 23 08:04:44 UTC 2023


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
ad64bb6843 TETRAEDGE: Fix TeImage output on big-endian hosts


Commit: ad64bb6843dceb501680592e0e5129e5797312d4
    https://github.com/scummvm/scummvm/commit/ad64bb6843dceb501680592e0e5129e5797312d4
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2023-05-23T17:04:38+09:00

Commit Message:
TETRAEDGE: Fix TeImage output on big-endian hosts

Changed paths:
    engines/tetraedge/te/te_image.cpp


diff --git a/engines/tetraedge/te/te_image.cpp b/engines/tetraedge/te/te_image.cpp
index ba3781add49..2cce0119cbf 100644
--- a/engines/tetraedge/te/te_image.cpp
+++ b/engines/tetraedge/te/te_image.cpp
@@ -21,6 +21,7 @@
 
 #include "tetraedge/tetraedge.h"
 
+#include "common/endian.h"
 #include "common/rect.h"
 #include "tetraedge/te/te_core.h"
 #include "tetraedge/te/te_image.h"
@@ -53,8 +54,13 @@ void TeImage::create() {
 void TeImage::createImg(uint xsize, uint ysize, Common::SharedPtr<TePalette> &pal,
 			Format teformat, uint bufxsize, uint bufysize) {
 	_teFormat = teformat;
+#ifdef SCUMM_BIG_ENDIAN
+	Graphics::PixelFormat pxformat = ((teformat == TeImage::RGB8) ?
+									  Graphics::PixelFormat(3, 8, 8, 8, 0, 0, 8, 16, 0) : Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0));
+#else
 	Graphics::PixelFormat pxformat = ((teformat == TeImage::RGB8) ?
 									  Graphics::PixelFormat(3, 8, 8, 8, 0, 16, 8, 0, 0) : Graphics::PixelFormat(4, 8, 8, 8, 8, 0, 8, 16, 24));
+#endif
 
 	Graphics::ManagedSurface::create(xsize, ysize, pxformat);
 	if (teformat == TeImage::RGBA8)




More information about the Scummvm-git-logs mailing list