Commit Graph

19 Commits

Author SHA1 Message Date
Bill Currie db898655d1 make LoadBSPFile own the memory for the bsp data 2010-10-13 20:52:05 +09:00
Bill Currie 719ca15516 make LoadBSPMem work in-place
LoadBSPMem now modifies the passed in buffer rathern than allocating new
memory. One step closer to cleaning up brush model loading.
2010-10-13 20:52:05 +09:00
Bill Currie 56fb4d9a22 allow safe bsp freeing
any memory the bsp thinks it does not own will not be freed
2010-10-13 20:52:05 +09:00
Bill Currie 1d86e71404 make WriteBSPFile take a const bsp_t *
This means that the supplied bsp can now be reused, as it should be.
2010-10-13 20:52:05 +09:00
Bill Currie f4042c5b91 Make the bsp disk data structures type size independent.
However, this assumes float is always 32 bits.

Also use size_t for the *size fields in bsp_t and clean up the mess.
2010-10-13 20:52:05 +09:00
Bill Currie 99c0954b47 the big dso visibility patch :). Sure, we have to have unique names for static builds, but with controlled visibitly we should get faster program loads (although this isn't C++, so it's not as bad) and complex plugins are cleaner. 2007-03-10 12:00:59 +00:00
Bill Currie 3fb03fc2be hah, should have been using __attribute__((used)) all that time (rather
than __attribute__((unused))). fixes the missing console in -x11
2005-08-04 15:27:09 +00:00
Bill Currie 0a0f8d0cfa make a LoadBSPMem function so bsp files can be read from already loaded
images
2003-08-11 22:40:46 +00:00
Bill Currie 761a7546dd re-arrange things so __attribute__ and __builtin_expect are properly
autoconfiscated so rcsid will continue to work with gcc 3.3
2003-01-15 15:31:36 +00:00
Bill Currie a5ead00f8e small bit of cleanup 2002-11-08 17:13:23 +00:00
Bill Currie ca4b3acd6c big protototype cleanup. Now, except for a few cases, all non-static
prototypes are in headers files.
2002-11-05 19:12:51 +00:00
Bill Currie dd5cac488c fix a few memory access bugs 2002-09-20 22:44:29 +00:00
Bill Currie 0cd34d155f qfbsp now mostly works. only known issue is multiple texture wads don't
load properly and possibly a "reached occupant" issue (dunno if it's the
map or qfbsp)
2002-09-19 20:39:33 +00:00
Bill Currie e8d74f3a26 round off the offsets/sizes again 2002-09-19 15:28:16 +00:00
Bill Currie 24a9b48127 rewrite bspfile.[ch] so they work off an object rather than global data.
The direct filesystem access is also removed. Fix up qfvis and qflight to
compile with the new bspfile. qfvis seems to work, qflight probably doesn't
2002-09-19 05:35:17 +00:00
Bill Currie 599fea0edb redo bspfile to use dynamic allocation for the arrays to avoid buffer
overflows. also fix up the verbosity levels in qfvis.c
2002-09-18 06:07:38 +00:00
Bill Currie b8829faac4 bspfile.c:
start rewriting for saner code starting with making the private
	functions static
cmdlib.[ch]:
	win32 compile fixes (remove redundant function)
2002-09-13 15:07:48 +00:00
Bill Currie ec47e08e1c go back to using QFile, quakeio.h and quakefs.h 2002-08-27 07:16:28 +00:00
Ragnvald Maartmann-Moe IV cfedb80d1d Rest of support for qflight/qfvis. bspfile.c and quakefs.c will need cleaning up, compare to previous cvs versions... 2002-08-25 23:10:57 +00:00