summaryrefslogtreecommitdiff
path: root/lib/gltexture.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gltexture.cc')
-rw-r--r--lib/gltexture.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/gltexture.cc b/lib/gltexture.cc
index b0bc7c4..c0a940f 100644
--- a/lib/gltexture.cc
+++ b/lib/gltexture.cc
@@ -279,10 +279,17 @@ SDL_Surface * mogltk::texture::LoadNTEX(Handle * h) throw (GeneralException) {
width = h->readU16();
if (!(r = SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, 32,
+#if SDL_BYTEORDER == SDL_BIG_ENDIAN
+ 0xff000000,
+ 0x00ff0000,
+ 0x0000ff00,
+ 0x000000ff
+#else
0x000000ff,
0x0000ff00,
0x00ff0000,
0xff000000
+#endif
))) {
throw GeneralException(_("Can't create RGB Surface for LoadNTEX"));
}