forgot to close the skin file.
skin.c:
seeking within a file inside a pak does NOT work for SEEK_SET and SEEK_END
so load the whole file at once into memory and change processing
accordingly. The Hunk_*Alloc calls work nicely because the file is loaded
into the lower hunk space while the tex is allocated from the temp space
which is in the high hunk space.
Rip out the pcx loading code and use LoadPCX instead.
pcx.h:
remove the data field from pcx_t: it was messing with gcc's idea of the
structure size. also, update LoadPCX's prototype
pcx.c:
change LoadPCX to return tex_t (new type in texture.h) and take a new
param: convert. LoadPCX will now wither load raw 8 bit or convert to
rgba on loading depending on convert. Also, make LoadPCX WORK and use
Hunk_TempAlloc to store the resulting texture.
texture.h:
define tex_t. defines an in-memory texture (either 8 or 32 bit, depending
on the presense of a palette). Data comes immediately after the sturcture.
eg tex_t *tex = Hunk_TempAlloc (sizeof (tex_t) + count)