diff --git a/Quake/gl_model.c b/Quake/gl_model.c index 6db6324f..d0553025 100644 --- a/Quake/gl_model.c +++ b/Quake/gl_model.c @@ -489,18 +489,16 @@ void Mod_LoadTextures (lump_t *l) if ( (mt->width & 15) || (mt->height & 15) ) { if (loadmodel->bspversion != BSPVERSION_QUAKE64) - Sys_Error ("Texture %s is not 16 aligned", mt->name); + Con_Warning ("Texture %s (%d x %d) is not 16 aligned\n", mt->name, mt->width, mt->height); } - pixels = mt->width*mt->height/64*85; + pixels = mt->width*mt->height; // only copy the first mip, the rest are auto-generated tx = (texture_t *) Hunk_AllocName (sizeof(texture_t) +pixels, loadname ); loadmodel->textures[i] = tx; memcpy (tx->name, mt->name, sizeof(tx->name)); tx->width = mt->width; tx->height = mt->height; - for (j=0 ; joffsets[j] = mt->offsets[j] + sizeof(texture_t) - sizeof(miptex_t); // the pixels immediately follow the structures // ericw -- check for pixels extending past the end of the lump. diff --git a/Quake/gl_model.h b/Quake/gl_model.h index 4b0fefd9..4aebd1d0 100644 --- a/Quake/gl_model.h +++ b/Quake/gl_model.h @@ -96,7 +96,6 @@ typedef struct texture_s int anim_min, anim_max; // time for this frame min <=time< max struct texture_s *anim_next; // in the animation sequence struct texture_s *alternate_anims; // bmodels in frmae 1 use these - unsigned offsets[MIPLEVELS]; // four mip maps stored } texture_t; diff --git a/Quake/gl_sky.c b/Quake/gl_sky.c index 3ba5c9c6..543fbef3 100644 --- a/Quake/gl_sky.c +++ b/Quake/gl_sky.c @@ -101,7 +101,7 @@ void Sky_LoadTexture (texture_t *mt) static byte back_data[128*128]; //FIXME: Hunk_Alloc unsigned *rgba; - src = (byte *)mt + mt->offsets[0]; + src = (byte *)(mt + 1); // extract back layer and upload for (i=0 ; i<128 ; i++)