1
0
Fork 0
forked from fte/fteqw

Note to self: Do it right the first time next time.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1030 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Mark Olsen 2005-05-18 23:52:55 +00:00
parent d38f681655
commit 0fc98d5021

View file

@ -981,6 +981,19 @@ void *Mod_LoadWall(char *name)
if (!wal)
return NULL;
wal->width = LittleLong(wal->width);
wal->height = LittleLong(wal->height);
{
int i;
for (i = 0; i < MIPLEVELS; i++)
wal->offsets[i] = LittleLong(wal->offsets[i]);
}
wal->flags = LittleLong(wal->flags);
wal->contents = LittleLong(wal->contents);
wal->value = LittleLong(wal->value);
//FIXME: Is this needed?
oin = in = ReadPCXFile((qbyte *)wal, com_filesize, &width, &height);
if (!in)
@ -1100,15 +1113,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 = LittleLong(wal->width);
tex->height = LittleLong(wal->height);
tex->width = wal->width;
tex->height = wal->height;
tex->pixbytes = r_pixbytes;
for (i = 0; i < MIPLEVELS; i++)
tex->offsets[i] = (LittleLong(wal->offsets[i]) - sizeof(*wal))*tex->pixbytes + sizeof(*tex);
tex->offsets[i] = (wal->offsets[i] - sizeof(*wal))*tex->pixbytes + sizeof(*tex);
out = (qbyte *)(tex+1);
in = (qbyte *)wal+LittleLong(wal->offsets[0]);
in = (qbyte *)wal+wal->offsets[0];
if (tex->pixbytes == 4)
{