Permalink
Browse files

bspc from quake3 1.32b source tarball.

  • Loading branch information...
0 parents commit 6b5cfd96ea29fbd0ba1139a5055f67bd06b0e442 @bnoordhuis bnoordhuis committed Nov 6, 2010
Showing with 39,102 additions and 0 deletions.
  1. +75 −0 Conscript
  2. +114 −0 Makefile
  3. +63 −0 _files.c
  4. +390 −0 aas_areamerging.c
  5. +24 −0 aas_areamerging.h
  6. +252 −0 aas_cfg.c
  7. +73 −0 aas_cfg.h
  8. +1,142 −0 aas_create.c
  9. +136 −0 aas_create.h
  10. +108 −0 aas_edgemelting.c
  11. +24 −0 aas_edgemelting.h
  12. +282 −0 aas_facemerging.c
  13. +24 −0 aas_facemerging.h
  14. +549 −0 aas_file.c
  15. +25 −0 aas_file.h
  16. +656 −0 aas_gsubdiv.c
  17. +25 −0 aas_gsubdiv.h
  18. +849 −0 aas_map.c
  19. +23 −0 aas_map.h
  20. +89 −0 aas_prunenodes.c
  21. +24 −0 aas_prunenodes.h
  22. +1,082 −0 aas_store.c
  23. +107 −0 aas_store.h
  24. +252 −0 aasfile.h
  25. +292 −0 be_aas_bspc.c
  26. +23 −0 be_aas_bspc.h
  27. +1,871 −0 brushbsp.c
  28. +991 −0 bspc.c
  29. +28 −0 bspc.sln
  30. +1,381 −0 bspc.vcproj
  31. +84 −0 cfgq3.c
  32. +1,005 −0 csg.c
  33. +978 −0 faces.c
  34. +232 −0 gldraw.c
  35. +149 −0 glfile.c
  36. +180 −0 l_bsp_ent.c
  37. +58 −0 l_bsp_ent.h
  38. +888 −0 l_bsp_hl.c
  39. +314 −0 l_bsp_hl.h
  40. +620 −0 l_bsp_q1.c
  41. +275 −0 l_bsp_q1.h
  42. +1,134 −0 l_bsp_q2.c
  43. +98 −0 l_bsp_q2.h
  44. +824 −0 l_bsp_q3.c
  45. +81 −0 l_bsp_q3.h
  46. +1,186 −0 l_bsp_sin.c
  47. +106 −0 l_bsp_sin.h
  48. +1,230 −0 l_cmd.c
  49. +157 −0 l_cmd.h
  50. +215 −0 l_log.c
  51. +42 −0 l_log.h
  52. +289 −0 l_math.c
  53. +93 −0 l_math.h
  54. +441 −0 l_mem.c
  55. +51 −0 l_mem.h
  56. +1,411 −0 l_poly.c
  57. +120 −0 l_poly.h
  58. +663 −0 l_qfiles.c
  59. +91 −0 l_qfiles.h
  60. +1,510 −0 l_threads.c
  61. +45 −0 l_threads.h
  62. +259 −0 l_utils.c
  63. +79 −0 l_utils.h
  64. +61 −0 lcc.mak
  65. +101 −0 leakfile.c
  66. +109 −0 linux-i386.mak
  67. +1,267 −0 map.c
  68. +1,114 −0 map_hl.c
  69. +1,174 −0 map_q1.c
  70. +1,162 −0 map_q2.c
  71. +681 −0 map_q3.c
  72. +1,211 −0 map_sin.c
  73. +47 −0 nodraw.c
  74. +1,297 −0 portals.c
  75. +287 −0 prtfile.c
  76. +487 −0 q2files.h
  77. +374 −0 q3files.h
  78. +477 −0 qbsp.h
  79. +487 −0 qfiles.h
  80. +365 −0 sinfiles.h
  81. +1,389 −0 tetrahedron.c
  82. +24 −0 tetrahedron.h
  83. +228 −0 textures.c
  84. +283 −0 tree.c
  85. +595 −0 writebsp.c
@@ -0,0 +1,75 @@
+# bspc compile
+
+Import qw( BSPC_BASE_CFLAGS BUILD_DIR INSTALL_DIR CC CXX LINK );
+
+@BSPC_FILES = qw(
+ aas_areamerging.c
+ aas_cfg.c
+ aas_create.c
+ aas_edgemelting.c
+ aas_facemerging.c
+ aas_file.c
+ aas_gsubdiv.c
+ aas_map.c
+ aas_prunenodes.c
+ aas_store.c
+ be_aas_bspc.c
+ ../botlib/be_aas_bspq3.c
+ ../botlib/be_aas_cluster.c
+ ../botlib/be_aas_move.c
+ ../botlib/be_aas_optimize.c
+ ../botlib/be_aas_reach.c
+ ../botlib/be_aas_sample.c
+ brushbsp.c
+ bspc.c
+ ../qcommon/cm_load.c
+ ../qcommon/cm_patch.c
+ ../qcommon/cm_test.c
+ ../qcommon/cm_trace.c
+ csg.c
+ glfile.c
+ l_bsp_ent.c
+ l_bsp_hl.c
+ l_bsp_q1.c
+ l_bsp_q2.c
+ l_bsp_q3.c
+ l_bsp_sin.c
+ l_cmd.c
+ ../botlib/l_libvar.c
+ l_log.c
+ l_math.c
+ l_mem.c
+ l_poly.c
+ ../botlib/l_precomp.c
+ l_qfiles.c
+ ../botlib/l_script.c
+ ../botlib/l_struct.c
+ l_threads.c
+ l_utils.c
+ leakfile.c
+ map.c
+ map_hl.c
+ map_q1.c
+ map_q2.c
+ map_q3.c
+ map_sin.c
+ ../qcommon/md4.c
+ nodraw.c
+ portals.c
+ textures.c
+ tree.c
+ ../qcommon/unzip.c
+ );
+$BSPC_REF = \@BSPC_FILES;
+
+$env = new cons(
+ CC => $CC,
+ CXX => $CXX,
+ LINK => $LINK,
+ CFLAGS => $BSPC_BASE_CFLAGS,
+ LIBS => '-ldl -lm -lpthread'
+);
+
+Program $env 'bspc', @$BSPC_REF;
+# this should install to Q3 or something?
+Install $env $INSTALL_DIR, 'bspc';
114 Makefile
@@ -0,0 +1,114 @@
+#
+# Makefile for the BSPC tool for the Gladiator Bot
+# Intended for gcc/Linux
+#
+# TTimo 5/15/2001
+# some cleanup .. only used on i386 for GtkRadiant setups AFAIK .. removing the i386 tag
+# TODO: the intermediate object files should go into their own directory
+# specially for ../botlib and ../qcommon, the compilation flags on those might not be what you expect
+
+#ARCH=i386
+CC=gcc
+BASE_CFLAGS=-Dstricmp=strcasecmp
+
+#use these cflags to optimize it
+CFLAGS=$(BASE_CFLAGS) -m486 -O6 -ffast-math -funroll-loops \
+ -fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \
+ -malign-jumps=2 -malign-functions=2 -DLINUX -DBSPC
+#use these when debugging
+#CFLAGS=$(BASE_CFLAGS) -g
+
+LDFLAGS=-ldl -lm -lpthread
+
+DO_CC=$(CC) $(CFLAGS) -o $@ -c $<
+
+#############################################################################
+# SETUP AND BUILD BSPC
+#############################################################################
+
+.c.o:
+ $(DO_CC)
+
+GAME_OBJS = \
+ _files.o\
+ aas_areamerging.o\
+ aas_cfg.o\
+ aas_create.o\
+ aas_edgemelting.o\
+ aas_facemerging.o\
+ aas_file.o\
+ aas_gsubdiv.o\
+ aas_map.o\
+ aas_prunenodes.o\
+ aas_store.o\
+ be_aas_bspc.o\
+ ../botlib/be_aas_bspq3.o\
+ ../botlib/be_aas_cluster.o\
+ ../botlib/be_aas_move.o\
+ ../botlib/be_aas_optimize.o\
+ ../botlib/be_aas_reach.o\
+ ../botlib/be_aas_sample.o\
+ brushbsp.o\
+ bspc.o\
+ ../qcommon/cm_load.o\
+ ../qcommon/cm_patch.o\
+ ../qcommon/cm_test.o\
+ ../qcommon/cm_trace.o\
+ csg.o\
+ glfile.o\
+ l_bsp_ent.o\
+ l_bsp_hl.o\
+ l_bsp_q1.o\
+ l_bsp_q2.o\
+ l_bsp_q3.o\
+ l_bsp_sin.o\
+ l_cmd.o\
+ ../botlib/l_libvar.o\
+ l_log.o\
+ l_math.o\
+ l_mem.o\
+ l_poly.o\
+ ../botlib/l_precomp.o\
+ l_qfiles.o\
+ ../botlib/l_script.o\
+ ../botlib/l_struct.o\
+ l_threads.o\
+ l_utils.o\
+ leakfile.o\
+ map.o\
+ map_hl.o\
+ map_q1.o\
+ map_q2.o\
+ map_q3.o\
+ map_sin.o\
+ ../qcommon/md4.o\
+ nodraw.o\
+ portals.o\
+ textures.o\
+ tree.o\
+ ../qcommon/unzip.o
+
+ #tetrahedron.o
+
+bspc : $(GAME_OBJS)
+ $(CC) $(CFLAGS) -o $@ $(GAME_OBJS) $(LDFLAGS)
+ strip $@
+
+
+#############################################################################
+# MISC
+#############################################################################
+
+clean:
+ -rm -f $(GAME_OBJS)
+
+depend:
+ gcc -MM $(GAME_OBJS:.o=.c)
+
+#install:
+# cp bspci386 ..
+
+#
+# From "make depend"
+#
+
@@ -0,0 +1,63 @@
+//===========================================================================
+//
+// Name: _files.c
+// Function:
+// Programmer: Mr Elusive
+// Last update: 1999-12-02
+// Tab Size: 4
+//===========================================================================
+
+/*
+
+aas_areamerging.c //AAS area merging
+aas_cfg.c //AAS configuration for different games
+aas_create.c //AAS creating
+aas_edgemelting.c //AAS edge melting
+aas_facemerging.c //AAS face merging
+aas_file.c //AAS file writing
+aas_gsubdiv.c //AAS gravitational and ladder subdivision
+aas_map.c //AAS map brush creation
+aas_prunenodes.c //AAS node pruning
+aas_store.c //AAS file storing
+
+map.c //map file loading and writing
+map_hl.c //Half-Life map loading
+map_q1.c //Quake1 map loading
+map_q2.c //Quake2 map loading
+map_q3.c //Quake3 map loading
+map_sin.c //Sin map loading
+tree.c //BSP tree management + node pruning (*)
+brushbsp.c //brush bsp creation (*)
+portals.c //BSP portal creation and leaf filling (*)
+csg.c //Constructive Solid Geometry brush chopping (*)
+leakfile.c //leak file writing (*)
+textures.c //Quake2 BSP textures (*)
+
+l_bsp_ent.c //BSP entity parsing
+l_bsp_hl.c //Half-Life BSP loading and writing
+l_bsp_q1.c //Quake1 BSP loading and writing
+l_bsp_q2.c //Quake2 BSP loading and writing
+l_bsp_q3.c //Quake2 BSP loading and writing
+l_bsp_sin.c //Sin BSP loading and writing
+l_cmd.c //cmd library
+l_log.c //log file library
+l_math.c //math library
+l_mem.c //memory management library
+l_poly.c //polygon (winding) library
+l_script.c //script file parsing library
+l_threads.c //multi-threading library
+l_utils.c //utility library
+l_qfiles.c //loading of quake files
+
+gldraw.c //GL drawing (*)
+glfile.c //GL file writing (*)
+nodraw.c //no draw module (*)
+
+bspc.c //BSPC Win32 console version
+winbspc.c //WinBSPC Win32 GUI version
+win32_terminal.c //Win32 terminal output
+win32_qfiles.c //Win32 game file management (also .pak .sin)
+win32_font.c //Win32 fonts
+win32_folder.c //Win32 folder dialogs
+
+*/
Oops, something went wrong.

0 comments on commit 6b5cfd9

Please sign in to comment.