From e294a337fa3ba7c5ff8e00f5a8fbeda4c8ad3533 Mon Sep 17 00:00:00 2001 From: Mark Olsen Date: Wed, 18 May 2005 23:01:51 +0000 Subject: [PATCH] Endian fixes to Mod_LoadWall() git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1027 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/common/gl_q2bsp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/engine/common/gl_q2bsp.c b/engine/common/gl_q2bsp.c index d642d3b5d..45e85ee45 100644 --- a/engine/common/gl_q2bsp.c +++ b/engine/common/gl_q2bsp.c @@ -1100,15 +1100,15 @@ void *Mod_LoadWall(char *name) qbyte *out; tex = Hunk_AllocName(sizeof(texture_t) + wal->width*r_pixbytes*wal->height/64*85, ln); - tex->width = wal->width; - tex->height = wal->height; + tex->width = LittleLong(wal->width); + tex->height = LittleLong(wal->height); tex->pixbytes = r_pixbytes; for (i = 0; i < MIPLEVELS; i++) - tex->offsets[i] = (wal->offsets[i] - sizeof(*wal))*tex->pixbytes + sizeof(*tex); + tex->offsets[i] = (LittleLong(wal->offsets[i]) - sizeof(*wal))*tex->pixbytes + sizeof(*tex); out = (qbyte *)(tex+1); - in = (qbyte *)wal+wal->offsets[0]; + in = (qbyte *)wal+LittleLong(wal->offsets[0]); if (tex->pixbytes == 4) {