Check that sky texture size is 256x128

(taken from quakespasm-gl4 fork.)
This commit is contained in:
Andrei Drexler 2021-12-04 11:11:10 +03:00 committed by Ozkan Sezer
parent eeda766f12
commit e3d2fb9fd9

View file

@ -101,6 +101,9 @@ void Sky_LoadTexture (texture_t *mt)
static byte back_data[128*128]; //FIXME: Hunk_Alloc
unsigned *rgba;
if (mt->width != 256 || mt->height != 128)
Sys_Error ("Sky texture %s has wrong size (%d x %d)", mt->name, mt->width, mt->height);
src = (byte *)(mt + 1);
// extract back layer and upload