Commit Graph

2223 Commits

Author SHA1 Message Date
Tyrann e89f25be80 [PATCH 07/15] qbsp: outside.c statics
Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 22:45:58 +09:30
Tyrann 898f66d460 [PATCH 06/15] qbsp: merge.c statics
Make needlessly global functions/variables static.
Don't compile CheckColinear unless doing parnoid checks.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 22:45:58 +09:30
Tyrann 950b163181 [PATCH 05/15] qbsp: map.c statics
Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 22:45:57 +09:30
Tyrann 525c3ec2fe [PATCH 04/15] qbsp: csg4.c statics
Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 22:45:57 +09:30
Tyrann 5e29db5df0 [PATCH 03/15] qbsp: cmdlib.c statics
Make needlessly global functions/variables static.
Remove unused functions Q_getwd, DefaultPath and StripFilename.
Remove unused CRC functions.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 22:45:56 +09:30
Tyrann ed50a94fd6 [PATCH 02/15] qbsp: bspfile.c statics
Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 22:45:55 +09:30
Tyrann 85b459931a [PATCH 01/15] qbsp: brush.c statics
Make needlessly global functions/variables static.
Remove the unused function PlaneTypeForNormal.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 22:45:55 +09:30
Tyrann dcb6fa7c9b [PATCH] qbsp: Remove unnecessary casts from AllocMem calls
Now that we're compiling as C code, the memory returned by AllocMem no longer
needs to be explicitly cast when assigning to our typed pointers.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 20:29:00 +09:30
Tyrann 50e6c880cc [PATCH 9/9] qbsp: Compile as C code
Now that all the C++isms have been removed, rename the .cpp source files to .c
and remove the special case makefile rules for compiling qbsp object files.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 17:38:34 +09:30
Tyrann 1c082ace11 [PATCH 8/9] qbsp: Remove stricmp/strcasecmp workaround
Patch the source files and remove the preprocessor workaround for
stricmp/strcasecmp substitution.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 17:38:34 +09:30
Tyrann 099e22f733 [PATCH 7/9] qbsp: Replace C++ consts with defines
Replace three "const" declarations in qbsp.h with #defines to prevent multiple
definitions being compiled in when compiling as C code.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 17:38:33 +09:30
Tyrann 8ef5c8bc5d [PATCH 6/9] qbsp: Remove two C++ style casts
Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 17:38:33 +09:30
Tyrann 2dfd647656 [PATCH 5/9] qbsp: Replace new/delete with malloc/free
There's a couple of usages outside of the AllocMem/FreeMem functions. Flag
these as something to look at later.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 17:38:32 +09:30
Tyrann 293efefa26 [PATCH 4/9] qbsp: Remove default arguments from {Alloc,Free}Mem
More C++ removal. Just pass the default arguments explicitly.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 17:38:32 +09:30
Tyrann 45c387c7eb [PATCH 3/9] qbsp: Replace parser class with plain C code
Nothing too exciting here, just replacing more C++ code with plain C. The
parser class is gone - we just use a global token now and call ParseToken to
update it.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 17:38:31 +09:30
Tyrann 0cae98f22f [PATCH 2/9] qbsp: Replace WAD class
Replace the WAD class with plain C code. Class WAD becomes wad_t and the
member functions are just normal functions taking a wad_t as an argument.

The iWad member was a bit strange. It was used in some member functions for
walking the wadlist array. I've elimanted that from the struct and made the
functions track that state themselves.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 17:38:30 +09:30
Tyrann 8bded2dfaf [PATCH 1/9] qbsp: Replace File class with basic stdio functions
Replace the "File" class with basic stdio C functions. The LoadFile is kept
basically intact. All instances of File objects are replaced with FILE*. Calls
to member functions are replaced with inline C code. There is some redundancy
with the error checking, but this can probably be cleaned up a little bit by
using some of the SafeOpen, etc. functions from common/cmdlib.c.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 17:38:30 +09:30
Tyrann 25f6148fc3 [PATCH] Make qbsp build
Make some bare-minimum changes to get qbsp to build with gcc/g++ and
MinGW/Msys.
o Added makefile rules
o Work around windows specific calls to e.g. _getcwd
o Use noecho() / echo() calls around getch() in Linux
o Substitute stricmp -> strcasecmp (in Makefile for now)
o Fix non-portable (incorrect?) of inline
o Fix misuse of delete where delete [] is required...

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 17:35:05 +09:30
Tyrann a2c8785d81 [PATCH 3/3] qbsp: run indent over the source files
More source mangling; run indent over the source files to make it more
consistent with the rest of my utils code. Remove any trailing whitespace
while we're at it.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-05 20:57:33 +09:30
Tyrann 689790cbdb [PATCH 2/3] qbsp: consistently use newline at EOF
Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-05 20:57:21 +09:30
Tyrann 950c8ab0de [PATCH 1/3] qbsp: add copyright notices and license info
Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-05 20:56:57 +09:30
Tyrann d0a0c3c15c [PATCH] Import QBSP sources
Import QBSP sources from Greg Lewis' TreeQBSP version 1.62.
- http://www.yossman.net/~tree/

Thanks to Greg for allowing me to use his modified source code:

On Fri, Aug 25, 2006 at 04:28:24PM -0400, Tree wrote:
> I imagine you've already gone ahead with your plans, but feel free to do
> whatever you wish with the source for TreeQBSP; I have no interest in
> restricting anyone's access to it (and of course I was just modifying id's
> code anyway).  I'm just glad to see that it was of some use to you. :)
>
> Greg

The files are unmodified from the originals, apart from lower-casing the
filenames and removing ASCII CR characters from end of lines.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-08-29 00:03:53 +09:30
Tyrann 2c2f3c8eb6 Import initial sources 2006-08-28 23:58:10 +09:30