Commit graph

9 commits

Author SHA1 Message Date
Jeff Teunissen
6bae2b3010 whitespace, small opt in pcx.c 2001-02-05 23:17:48 +00:00
Bill Currie
5d15e27a3e pcx.c:
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.
2001-01-18 19:09:37 +00:00
Bill Currie
fc70d429bb skin.c:
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)
2001-01-18 10:20:36 +00:00
Bill Currie
ccba39666b #include audit 2000-12-30 02:16:36 +00:00
Bill Currie
316b74eddc fix command line parsing when - is embeded in an arg (eg +gamedir artifact-rjs) 2000-12-15 23:24:22 +00:00
Bill Currie
a4f03b4c12 move WritePCXfile to pcx.c, move the screenshot filname creation code to
COM_NextFilename in quakefs.c and fix up some remote screenshot snafus
2000-12-11 03:30:32 +00:00
Jeff Teunissen
54e2a4d9d3 Okay, the big whitespace reformat. There is some silliness (case
statements, variable declarations), but all in all it's not bad.
2000-12-08 06:51:37 +00:00
Jeff Teunissen
7b82e44ca1 Fix PCX loading on big-endian systems 2000-12-01 08:59:44 +00:00
Bill Currie
06e50ba0c9 chop up gl_warp into gl_sky, pcx and tga. also break out pcx stuff from client.h 2000-10-28 19:58:22 +00:00