This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
|
|
Definition at line 208 of file l_bsp_hl.h. |
|
|
Definition at line 206 of file l_bsp_hl.h. |
|
|
Definition at line 207 of file l_bsp_hl.h. |
|
|
Definition at line 205 of file l_bsp_hl.h. |
|
|
Definition at line 234 of file l_bsp_hl.h. |
|
|
Definition at line 233 of file l_bsp_hl.h. |
|
|
Definition at line 56 of file l_bsp_hl.h. Referenced by HL_LoadBSPFile(), and HL_WriteBSPFile(). |
|
|
Definition at line 145 of file l_bsp_hl.h. Referenced by HL_CreateBrushes_r(), and HL_SolidTree_r(). |
|
|
Definition at line 147 of file l_bsp_hl.h. Referenced by HL_CreateBrushes_r(), and HL_SolidTree_r(). |
|
|
Definition at line 149 of file l_bsp_hl.h. Referenced by HL_CreateBrushes_r(), and HL_SolidTree_r(). |
|
|
Definition at line 150 of file l_bsp_hl.h. Referenced by HL_CreateBrushes_r(), and HL_SolidTree_r(). |
|
|
Definition at line 148 of file l_bsp_hl.h. Referenced by HL_CreateBrushes_r(), and HL_SolidTree_r(). |
|
|
Definition at line 152 of file l_bsp_hl.h. Referenced by HL_CreateBrushes_r(), and HL_SolidTree_r(). |
|
|
Definition at line 151 of file l_bsp_hl.h. Referenced by HL_CreateBrushes_r(), and HL_SolidTree_r(). |
|
|
Definition at line 138 of file l_bsp_hl.h. Referenced by HL_CreateBrushes_r(), and HL_SolidTree_r(). |
|
|
Definition at line 142 of file l_bsp_hl.h. Referenced by HL_CreateBrushes_r(), and HL_SolidTree_r(). |
|
|
Definition at line 144 of file l_bsp_hl.h. Referenced by HL_CreateBrushes_r(), and HL_SolidTree_r(). |
|
|
Definition at line 143 of file l_bsp_hl.h. Referenced by HL_CreateBrushes_r(), and HL_SolidTree_r(). |
|
|
Definition at line 141 of file l_bsp_hl.h. Referenced by HL_CreateBrushes_r(), and HL_SolidTree_r(). |
|
|
Definition at line 139 of file l_bsp_hl.h. Referenced by HL_CreateBrushes_r(), and HL_SolidTree_r(). |
|
|
Definition at line 154 of file l_bsp_hl.h. Referenced by HL_CreateBrushes_r(), and HL_SolidTree_r(). |
|
|
Definition at line 140 of file l_bsp_hl.h. Referenced by HL_CreateBrushes_r(), and HL_SolidTree_r(). |
|
|
Definition at line 81 of file l_bsp_hl.h. |
|
|
Definition at line 74 of file l_bsp_hl.h. Referenced by HL_LoadBSPFile(), and HL_WriteBSPFile(). |
|
|
Definition at line 77 of file l_bsp_hl.h. Referenced by HL_LoadBSPFile(), and HL_WriteBSPFile(). |
|
|
Definition at line 65 of file l_bsp_hl.h. Referenced by HL_LoadBSPFile(), and HL_WriteBSPFile(). |
|
|
Definition at line 72 of file l_bsp_hl.h. Referenced by HL_LoadBSPFile(), and HL_WriteBSPFile(). |
|
|
Definition at line 75 of file l_bsp_hl.h. Referenced by HL_LoadBSPFile(), and HL_WriteBSPFile(). |
|
|
Definition at line 73 of file l_bsp_hl.h. Referenced by HL_LoadBSPFile(), and HL_WriteBSPFile(). |
|
|
Definition at line 76 of file l_bsp_hl.h. Referenced by HL_LoadBSPFile(), and HL_WriteBSPFile(). |
|
|
Definition at line 79 of file l_bsp_hl.h. Referenced by HL_LoadBSPFile(), and HL_WriteBSPFile(). |
|
|
Definition at line 70 of file l_bsp_hl.h. Referenced by HL_LoadBSPFile(), and HL_WriteBSPFile(). |
|
|
Definition at line 66 of file l_bsp_hl.h. Referenced by HL_LoadBSPFile(), and HL_WriteBSPFile(). |
|
|
Definition at line 78 of file l_bsp_hl.h. Referenced by HL_LoadBSPFile(), and HL_WriteBSPFile(). |
|
|
Definition at line 71 of file l_bsp_hl.h. Referenced by HL_LoadBSPFile(), and HL_WriteBSPFile(). |
|
|
Definition at line 67 of file l_bsp_hl.h. Referenced by HL_LoadBSPFile(), and HL_WriteBSPFile(). |
|
|
Definition at line 68 of file l_bsp_hl.h. Referenced by HL_LoadBSPFile(), and HL_WriteBSPFile(). |
|
|
Definition at line 69 of file l_bsp_hl.h. Referenced by HL_LoadBSPFile(), and HL_WriteBSPFile(). |
|
|
Definition at line 27 of file l_bsp_hl.h. |
|
|
Definition at line 33 of file l_bsp_hl.h. Referenced by HL_AllocMaxBSP(), and HL_LoadBSPFile(). |
|
|
Definition at line 39 of file l_bsp_hl.h. Referenced by HL_AllocMaxBSP(), and HL_LoadBSPFile(). |
|
|
Definition at line 28 of file l_bsp_hl.h. |
|
|
Definition at line 29 of file l_bsp_hl.h. Referenced by HL_AllocMaxBSP(), and HL_LoadBSPFile(). |
|
|
Definition at line 36 of file l_bsp_hl.h. Referenced by HL_AllocMaxBSP(), and HL_LoadBSPFile(). |
|
|
Definition at line 24 of file l_bsp_hl.h. |
|
|
Definition at line 34 of file l_bsp_hl.h. Referenced by HL_AllocMaxBSP(), and HL_LoadBSPFile(). |
|
|
Definition at line 43 of file l_bsp_hl.h. Referenced by HL_AllocMaxBSP(), and HL_LoadBSPFile(). |
|
|
Definition at line 37 of file l_bsp_hl.h. Referenced by HL_AllocMaxBSP(), and HL_LoadBSPFile(). |
|
|
Definition at line 42 of file l_bsp_hl.h. Referenced by HL_AllocMaxBSP(), and HL_LoadBSPFile(). |
|
|
Definition at line 26 of file l_bsp_hl.h. Referenced by HL_AllocMaxBSP(), and HL_LoadBSPFile(). |
|
|
Definition at line 32 of file l_bsp_hl.h. Referenced by HL_AllocMaxBSP(), and HL_LoadBSPFile(). |
|
|
Definition at line 31 of file l_bsp_hl.h. Referenced by HL_AllocMaxBSP(), and HL_LoadBSPFile(). |
|
|
Definition at line 46 of file l_bsp_hl.h. |
|
|
Definition at line 40 of file l_bsp_hl.h. Referenced by HL_AllocMaxBSP(), and HL_LoadBSPFile(). |
|
|
Definition at line 38 of file l_bsp_hl.h. Referenced by HL_AllocMaxBSP(), and HL_LoadBSPFile(). |
|
|
Definition at line 41 of file l_bsp_hl.h. |
|
|
Definition at line 35 of file l_bsp_hl.h. Referenced by HL_AllocMaxBSP(), and HL_LoadBSPFile(). |
|
|
Definition at line 44 of file l_bsp_hl.h. Referenced by HL_AllocMaxBSP(), and HL_LoadBSPFile(). |
|
|
Definition at line 57 of file l_bsp_hl.h. |
|
|
Definition at line 50 of file l_bsp_hl.h. |
|
|
Definition at line 51 of file l_bsp_hl.h. |
|
|
Definition at line 189 of file l_bsp_hl.h. |
|
|
Definition at line 104 of file l_bsp_hl.h. |
|
|
Definition at line 210 of file l_bsp_hl.h. |
|
|
Definition at line 125 of file l_bsp_hl.h. |
|
|
Definition at line 126 of file l_bsp_hl.h. |
|
|
Definition at line 127 of file l_bsp_hl.h. |
|
|
Definition at line 120 of file l_bsp_hl.h. Referenced by PointInSolid_r(), and TraceLine_r(). |
|
|
Definition at line 121 of file l_bsp_hl.h. Referenced by PointInSolid_r(), and TraceLine_r(). |
|
|
Definition at line 122 of file l_bsp_hl.h. Referenced by PointInSolid_r(), and TraceLine_r(). |
|
|
Definition at line 180 of file l_bsp_hl.h. |
|
|
Referenced by HL_TextureBrushes(). |
|
|
Referenced by HL_AllocMaxBSP(), HL_LoadBSPFile(), and HL_WriteBSPFile(). |
|
||||||||||||
|
Definition at line 245 of file l_bsp_hl.c. Referenced by HL_LoadBSPFile(). 00246 {
00247 int checksum = 0;
00248
00249 while( bytes-- )
00250 checksum = (checksum << 4) ^ *((char *)buffer)++;
00251
00252 return checksum;
00253 }
|
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 260 of file l_bsp_hl.c. References byte, hl_numleafs, and j. 00261 {
00262 int j;
00263 int rep;
00264 int visrow;
00265 byte *dest_p;
00266
00267 dest_p = dest;
00268 visrow = (hl_numleafs + 7)>>3;
00269
00270 for (j=0 ; j<visrow ; j++)
00271 {
00272 *dest_p++ = vis[j];
00273 if (vis[j])
00274 continue;
00275
00276 rep = 1;
00277 for ( j++; j<visrow ; j++)
00278 if (vis[j] || rep == 255)
00279 break;
00280 else
00281 rep++;
00282 *dest_p++ = rep;
00283 j--;
00284 }
00285
00286 return dest_p - dest;
00287 }
|
|
||||||||||||
|
Definition at line 295 of file l_bsp_hl.c. References byte, c, hl_numleafs, and in. 00296 {
00297 int c;
00298 byte *out;
00299 int row;
00300
00301 row = (hl_numleafs+7)>>3;
00302 out = decompressed;
00303
00304 do
00305 {
00306 if (*in)
00307 {
00308 *out++ = *in++;
00309 continue;
00310 }
00311
00312 c = in[1];
00313 in += 2;
00314 while (c)
00315 {
00316 *out++ = 0;
00317 c--;
00318 }
00319 } while (out - decompressed < row);
00320 }
|
|
|
Definition at line 169 of file l_bsp_hl.c. References FreeMemory(), hl_allocatedbspmem, hl_dclipnodes, hl_dedges, hl_dentdata, hl_dfaces, hl_dleafs, hl_dlightdata, hl_dmarksurfaces, hl_dmodels, hl_dnodes, hl_dplanes, hl_dsurfedges, hl_dtexdata, hl_dvertexes, hl_dvisdata, hl_entdatasize, hl_lightdatasize, hl_numclipnodes, hl_numedges, hl_numfaces, hl_numleafs, hl_nummarksurfaces, hl_nummodels, hl_numnodes, hl_numplanes, hl_numsurfedges, hl_numtexinfo, hl_numvertexes, hl_texdatasize, hl_texinfo, hl_visdatasize, Log_Print(), and PrintMemorySize(). Referenced by LoadMapFromBSP(). 00170 {
00171 //models
00172 hl_nummodels = 0;
00173 FreeMemory(hl_dmodels);
00174 hl_dmodels = NULL;
00175 //visibility
00176 hl_visdatasize = 0;
00177 FreeMemory(hl_dvisdata);
00178 hl_dvisdata = NULL;
00179 //light data
00180 hl_lightdatasize = 0;
00181 FreeMemory(hl_dlightdata);
00182 hl_dlightdata = NULL;
00183 //texture data
00184 hl_texdatasize = 0;
00185 FreeMemory(hl_dtexdata);
00186 hl_dtexdata = NULL;
00187 //entities
00188 hl_entdatasize = 0;
00189 FreeMemory(hl_dentdata);
00190 hl_dentdata = NULL;
00191 //leaves
00192 hl_numleafs = 0;
00193 FreeMemory(hl_dleafs);
00194 hl_dleafs = NULL;
00195 //planes
00196 hl_numplanes = 0;
00197 FreeMemory(hl_dplanes);
00198 hl_dplanes = NULL;
00199 //vertexes
00200 hl_numvertexes = 0;
00201 FreeMemory(hl_dvertexes);
00202 hl_dvertexes = NULL;
00203 //nodes
00204 hl_numnodes = 0;
00205 FreeMemory(hl_dnodes);
00206 hl_dnodes = NULL;
00207 //texture info
00208 hl_numtexinfo = 0;
00209 FreeMemory(hl_texinfo);
00210 hl_texinfo = NULL;
00211 //faces
00212 hl_numfaces = 0;
00213 FreeMemory(hl_dfaces);
00214 hl_dfaces = NULL;
00215 //clip nodes
00216 hl_numclipnodes = 0;
00217 FreeMemory(hl_dclipnodes);
00218 hl_dclipnodes = NULL;
00219 //edges
00220 hl_numedges = 0;
00221 FreeMemory(hl_dedges);
00222 hl_dedges = NULL;
00223 //mark surfaces
00224 hl_nummarksurfaces = 0;
00225 FreeMemory(hl_dmarksurfaces);
00226 hl_dmarksurfaces = NULL;
00227 //surface edges
00228 hl_numsurfedges = 0;
00229 FreeMemory(hl_dsurfedges);
00230 hl_dsurfedges = NULL;
00231 //
00232 Log_Print("freed ");
00233 PrintMemorySize(hl_allocatedbspmem);
00234 Log_Print(" of BSP memory\n");
00235 hl_allocatedbspmem = 0;
00236 } //end of the function HL_FreeMaxBSP
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 520 of file l_bsp_hl.c. References Error(), FastChecksum(), FreeMemory(), HL_BSPVERSION, HL_CopyLump(), hl_dclipnodes, hl_dclipnodes_checksum, hl_dedges, hl_dedges_checksum, hl_dentdata, hl_dentdata_checksum, hl_dfaces, hl_dfaces_checksum, hl_dleafs, hl_dleafs_checksum, hl_dlightdata, hl_dlightdata_checksum, hl_dmarksurfaces, hl_dmarksurfaces_checksum, hl_dmodels, hl_dmodels_checksum, hl_dnodes, hl_dnodes_checksum, hl_dplanes, hl_dplanes_checksum, hl_dsurfedges, hl_dsurfedges_checksum, hl_dtexdata, hl_dtexdata_checksum, hl_dvertexes, hl_dvertexes_checksum, hl_dvisdata, hl_dvisdata_checksum, hl_entdatasize, hl_fileLength, hl_header, hl_lightdatasize, HL_LUMP_CLIPNODES, HL_LUMP_EDGES, HL_LUMP_ENTITIES, HL_LUMP_FACES, HL_LUMP_LEAFS, HL_LUMP_LIGHTING, HL_LUMP_MARKSURFACES, HL_LUMP_MODELS, HL_LUMP_NODES, HL_LUMP_PLANES, HL_LUMP_SURFEDGES, HL_LUMP_TEXINFO, HL_LUMP_TEXTURES, HL_LUMP_VERTEXES, HL_LUMP_VISIBILITY, HL_MAX_MAP_CLIPNODES, HL_MAX_MAP_EDGES, HL_MAX_MAP_ENTSTRING, HL_MAX_MAP_FACES, HL_MAX_MAP_LEAFS, HL_MAX_MAP_LIGHTING, HL_MAX_MAP_MARKSURFACES, HL_MAX_MAP_MIPTEX, HL_MAX_MAP_MODELS, HL_MAX_MAP_NODES, HL_MAX_MAP_PLANES, HL_MAX_MAP_SURFEDGES, HL_MAX_MAP_TEXINFO, HL_MAX_MAP_VERTS, HL_MAX_MAP_VISIBILITY, hl_numclipnodes, hl_numedges, hl_numfaces, hl_numleafs, hl_nummarksurfaces, hl_nummodels, hl_numnodes, hl_numplanes, hl_numsurfedges, hl_numtexinfo, hl_numvertexes, HL_SwapBSPFile(), hl_texdatasize, hl_texinfo, hl_texinfo_checksum, hl_texinfo_t, hl_visdatasize, i, length(), LittleLong(), LoadFile(), offset, and hl_dheader_t::version. Referenced by HL_LoadMapFromBSP(). 00521 {
00522 int i;
00523
00524 //
00525 // load the file header
00526 //
00527 hl_fileLength = LoadFile (filename, (void **)&hl_header, offset, length);
00528
00529 // swap the header
00530 for (i=0 ; i< sizeof(hl_dheader_t)/4 ; i++)
00531 ((int *)hl_header)[i] = LittleLong ( ((int *)hl_header)[i]);
00532
00533 if (hl_header->version != HL_BSPVERSION)
00534 Error ("%s is version %i, not %i", filename, hl_header->version, HL_BSPVERSION);
00535
00536 hl_nummodels = HL_CopyLump (HL_LUMP_MODELS, hl_dmodels, sizeof(hl_dmodel_t), HL_MAX_MAP_MODELS );
00537 hl_numvertexes = HL_CopyLump (HL_LUMP_VERTEXES, hl_dvertexes, sizeof(hl_dvertex_t), HL_MAX_MAP_VERTS );
00538 hl_numplanes = HL_CopyLump (HL_LUMP_PLANES, hl_dplanes, sizeof(hl_dplane_t), HL_MAX_MAP_PLANES );
00539 hl_numleafs = HL_CopyLump (HL_LUMP_LEAFS, hl_dleafs, sizeof(hl_dleaf_t), HL_MAX_MAP_LEAFS );
00540 hl_numnodes = HL_CopyLump (HL_LUMP_NODES, hl_dnodes, sizeof(hl_dnode_t), HL_MAX_MAP_NODES );
00541 hl_numtexinfo = HL_CopyLump (HL_LUMP_TEXINFO, hl_texinfo, sizeof(hl_texinfo_t), HL_MAX_MAP_TEXINFO );
00542 hl_numclipnodes = HL_CopyLump (HL_LUMP_CLIPNODES, hl_dclipnodes, sizeof(hl_dclipnode_t), HL_MAX_MAP_CLIPNODES );
00543 hl_numfaces = HL_CopyLump (HL_LUMP_FACES, hl_dfaces, sizeof(hl_dface_t), HL_MAX_MAP_FACES );
00544 hl_nummarksurfaces = HL_CopyLump (HL_LUMP_MARKSURFACES, hl_dmarksurfaces, sizeof(hl_dmarksurfaces[0]), HL_MAX_MAP_MARKSURFACES );
00545 hl_numsurfedges = HL_CopyLump (HL_LUMP_SURFEDGES, hl_dsurfedges, sizeof(hl_dsurfedges[0]), HL_MAX_MAP_SURFEDGES );
00546 hl_numedges = HL_CopyLump (HL_LUMP_EDGES, hl_dedges, sizeof(hl_dedge_t), HL_MAX_MAP_EDGES );
00547
00548 hl_texdatasize = HL_CopyLump (HL_LUMP_TEXTURES, hl_dtexdata, 1, HL_MAX_MAP_MIPTEX );
00549 hl_visdatasize = HL_CopyLump (HL_LUMP_VISIBILITY, hl_dvisdata, 1, HL_MAX_MAP_VISIBILITY );
00550 hl_lightdatasize = HL_CopyLump (HL_LUMP_LIGHTING, hl_dlightdata, 1, HL_MAX_MAP_LIGHTING );
00551 hl_entdatasize = HL_CopyLump (HL_LUMP_ENTITIES, hl_dentdata, 1, HL_MAX_MAP_ENTSTRING );
00552
00553 FreeMemory(hl_header); // everything has been copied out
00554
00555 //
00556 // swap everything
00557 //
00558 HL_SwapBSPFile (false);
00559
00560 hl_dmodels_checksum = FastChecksum( hl_dmodels, hl_nummodels*sizeof(hl_dmodels[0]) );
00561 hl_dvertexes_checksum = FastChecksum( hl_dvertexes, hl_numvertexes*sizeof(hl_dvertexes[0]) );
00562 hl_dplanes_checksum = FastChecksum( hl_dplanes, hl_numplanes*sizeof(hl_dplanes[0]) );
00563 hl_dleafs_checksum = FastChecksum( hl_dleafs, hl_numleafs*sizeof(hl_dleafs[0]) );
00564 hl_dnodes_checksum = FastChecksum( hl_dnodes, hl_numnodes*sizeof(hl_dnodes[0]) );
00565 hl_texinfo_checksum = FastChecksum( hl_texinfo, hl_numtexinfo*sizeof(hl_texinfo[0]) );
00566 hl_dclipnodes_checksum = FastChecksum( hl_dclipnodes, hl_numclipnodes*sizeof(hl_dclipnodes[0]) );
00567 hl_dfaces_checksum = FastChecksum( hl_dfaces, hl_numfaces*sizeof(hl_dfaces[0]) );
00568 hl_dmarksurfaces_checksum = FastChecksum( hl_dmarksurfaces, hl_nummarksurfaces*sizeof(hl_dmarksurfaces[0]) );
00569 hl_dsurfedges_checksum = FastChecksum( hl_dsurfedges, hl_numsurfedges*sizeof(hl_dsurfedges[0]) );
00570 hl_dedges_checksum = FastChecksum( hl_dedges, hl_numedges*sizeof(hl_dedges[0]) );
00571 hl_dtexdata_checksum = FastChecksum( hl_dtexdata, hl_numedges*sizeof(hl_dtexdata[0]) );
00572 hl_dvisdata_checksum = FastChecksum( hl_dvisdata, hl_visdatasize*sizeof(hl_dvisdata[0]) );
00573 hl_dlightdata_checksum = FastChecksum( hl_dlightdata, hl_lightdatasize*sizeof(hl_dlightdata[0]) );
00574 hl_dentdata_checksum = FastChecksum( hl_dentdata, hl_entdatasize*sizeof(hl_dentdata[0]) );
00575
00576 }
|
Here is the call graph for this function:

|
|
Definition at line 779 of file l_bsp_hl.c. References FreeScript(), hl_dentdata, hl_entdatasize, LoadScriptMemory(), num_entities, ParseEntity(), SCFL_NOSTRINGESCAPECHARS, SCFL_NOSTRINGWHITESPACES, script, and SetScriptFlags(). Referenced by HL_LoadMapFromBSP(). 00780 {
00781 script_t *script;
00782
00783 num_entities = 0;
00784 script = LoadScriptMemory(hl_dentdata, hl_entdatasize, "*Half-Life bsp file");
00785 SetScriptFlags(script, SCFL_NOSTRINGWHITESPACES |
00786 SCFL_NOSTRINGESCAPECHARS);
00787
00788 while(ParseEntity(script))
00789 {
00790 } //end while
00791
00792 FreeScript(script);
00793 } //end of the function HL_ParseEntities
|
Here is the call graph for this function:

|
|
Definition at line 681 of file l_bsp_hl.c. References ArrayUsage(), ENTRIES, ENTRYSIZE, GlobUsage(), hl_dclipnodes, hl_dedges, hl_dentdata, hl_dfaces, hl_dleafs, hl_dlightdata, hl_dmarksurfaces, hl_dmodels, hl_dnodes, hl_dplanes, hl_dsurfedges, hl_dtexdata, hl_dvertexes, hl_dvisdata, hl_entdatasize, hl_lightdatasize, hl_numclipnodes, hl_numedges, hl_numfaces, hl_numleafs, hl_nummarksurfaces, hl_nummodels, hl_numnodes, hl_numplanes, hl_numsurfedges, hl_numtexinfo, hl_numvertexes, hl_texdatasize, hl_texinfo, hl_visdatasize, and qprintf(). 00682 {
00683 int numtextures = hl_texdatasize ? ((hl_dmiptexlump_t*)hl_dtexdata)->nummiptex : 0;
00684 int totalmemory = 0;
00685
00686 qprintf("\n");
00687 qprintf("Object names Objects/Maxobjs Memory / Maxmem Fullness\n" );
00688 qprintf("------------ --------------- --------------- --------\n" );
00689
00690 totalmemory += ArrayUsage( "models", hl_nummodels, ENTRIES(hl_dmodels), ENTRYSIZE(hl_dmodels) );
00691 totalmemory += ArrayUsage( "planes", hl_numplanes, ENTRIES(hl_dplanes), ENTRYSIZE(hl_dplanes) );
00692 totalmemory += ArrayUsage( "vertexes", hl_numvertexes, ENTRIES(hl_dvertexes), ENTRYSIZE(hl_dvertexes) );
00693 totalmemory += ArrayUsage( "nodes", hl_numnodes, ENTRIES(hl_dnodes), ENTRYSIZE(hl_dnodes) );
00694 totalmemory += ArrayUsage( "texinfos", hl_numtexinfo, ENTRIES(hl_texinfo), ENTRYSIZE(hl_texinfo) );
00695 totalmemory += ArrayUsage( "faces", hl_numfaces, ENTRIES(hl_dfaces), ENTRYSIZE(hl_dfaces) );
00696 totalmemory += ArrayUsage( "clipnodes", hl_numclipnodes, ENTRIES(hl_dclipnodes), ENTRYSIZE(hl_dclipnodes) );
00697 totalmemory += ArrayUsage( "leaves", hl_numleafs, ENTRIES(hl_dleafs), ENTRYSIZE(hl_dleafs) );
00698 totalmemory += ArrayUsage( "marksurfaces",hl_nummarksurfaces,ENTRIES(hl_dmarksurfaces),ENTRYSIZE(hl_dmarksurfaces) );
00699 totalmemory += ArrayUsage( "surfedges", hl_numsurfedges, ENTRIES(hl_dsurfedges), ENTRYSIZE(hl_dsurfedges) );
00700 totalmemory += ArrayUsage( "edges", hl_numedges, ENTRIES(hl_dedges), ENTRYSIZE(hl_dedges) );
00701
00702 totalmemory += GlobUsage( "texdata", hl_texdatasize, sizeof(hl_dtexdata) );
00703 totalmemory += GlobUsage( "lightdata", hl_lightdatasize, sizeof(hl_dlightdata) );
00704 totalmemory += GlobUsage( "visdata", hl_visdatasize, sizeof(hl_dvisdata) );
00705 totalmemory += GlobUsage( "entdata", hl_entdatasize, sizeof(hl_dentdata) );
00706
00707 qprintf( "=== Total BSP file data space used: %d bytes ===\n\n", totalmemory );
00708 }
|
Here is the call graph for this function:

|
|
Definition at line 803 of file l_bsp_hl.c. References entities, epair_t, entity_t::epairs, Error(), hl_entdatasize, i, epair_s::key, line, epair_s::next, sprintf(), strcat(), strlen(), and epair_s::value. 00804 {
00805 char *buf, *end;
00806 epair_t *ep;
00807 char line[2048];
00808 int i;
00809
00810 buf = hl_dentdata;
00811 end = buf;
00812 *end = 0;
00813
00814 for (i=0 ; i<num_entities ; i++)
00815 {
00816 ep = entities[i].epairs;
00817 if (!ep)
00818 continue; // ent got removed
00819
00820 strcat (end,"{\n");
00821 end += 2;
00822
00823 for (ep = entities[i].epairs ; ep ; ep=ep->next)
00824 {
00825 sprintf (line, "\"%s\" \"%s\"\n", ep->key, ep->value);
00826 strcat (end, line);
00827 end += strlen(line);
00828 }
00829 strcat (end,"}\n");
00830 end += 2;
00831
00832 if (end > buf + HL_MAX_MAP_ENTSTRING)
00833 Error ("Entity text too long");
00834 }
00835 hl_entdatasize = end - buf + 1;
00836 } //end of the function HL_UnparseEntities
|
Here is the call graph for this function:

|
|
Definition at line 601 of file l_bsp_hl.c. References fclose(), fseek(), HL_AddLump(), HL_BSPVERSION, hl_dclipnodes, hl_dedges, hl_dentdata, hl_dfaces, hl_dleafs, hl_dlightdata, hl_dmarksurfaces, hl_dmodels, hl_dnodes, hl_dplanes, hl_dsurfedges, hl_dtexdata, hl_dvertexes, hl_dvisdata, hl_entdatasize, hl_header, hl_lightdatasize, HL_LUMP_CLIPNODES, HL_LUMP_EDGES, HL_LUMP_ENTITIES, HL_LUMP_FACES, HL_LUMP_LEAFS, HL_LUMP_LIGHTING, HL_LUMP_MARKSURFACES, HL_LUMP_MODELS, HL_LUMP_NODES, HL_LUMP_PLANES, HL_LUMP_SURFEDGES, HL_LUMP_TEXINFO, HL_LUMP_TEXTURES, HL_LUMP_VERTEXES, HL_LUMP_VISIBILITY, hl_numclipnodes, hl_numedges, hl_numfaces, hl_numleafs, hl_nummarksurfaces, hl_nummodels, hl_numnodes, hl_numplanes, hl_numsurfedges, hl_numtexinfo, hl_numvertexes, HL_SwapBSPFile(), hl_texdatasize, hl_texinfo, hl_texinfo_t, hl_visdatasize, LittleLong(), memset(), SafeOpenWrite(), SafeWrite(), SEEK_SET, hl_dheader_t::version, and wadfile. 00602 {
00603 hl_header = &outheader;
00604 memset (hl_header, 0, sizeof(hl_dheader_t));
00605
00606 HL_SwapBSPFile (true);
00607
00608 hl_header->version = LittleLong (HL_BSPVERSION);
00609
00610 wadfile = SafeOpenWrite (filename);
00611 SafeWrite (wadfile, hl_header, sizeof(hl_dheader_t)); // overwritten later
00612
00613 HL_AddLump (HL_LUMP_PLANES, hl_dplanes, hl_numplanes*sizeof(hl_dplane_t));
00614 HL_AddLump (HL_LUMP_LEAFS, hl_dleafs, hl_numleafs*sizeof(hl_dleaf_t));
00615 HL_AddLump (HL_LUMP_VERTEXES, hl_dvertexes, hl_numvertexes*sizeof(hl_dvertex_t));
00616 HL_AddLump (HL_LUMP_NODES, hl_dnodes, hl_numnodes*sizeof(hl_dnode_t));
00617 HL_AddLump (HL_LUMP_TEXINFO, hl_texinfo, hl_numtexinfo*sizeof(hl_texinfo_t));
00618 HL_AddLump (HL_LUMP_FACES, hl_dfaces, hl_numfaces*sizeof(hl_dface_t));
00619 HL_AddLump (HL_LUMP_CLIPNODES, hl_dclipnodes, hl_numclipnodes*sizeof(hl_dclipnode_t));
00620 HL_AddLump (HL_LUMP_MARKSURFACES, hl_dmarksurfaces, hl_nummarksurfaces*sizeof(hl_dmarksurfaces[0]));
00621 HL_AddLump (HL_LUMP_SURFEDGES, hl_dsurfedges, hl_numsurfedges*sizeof(hl_dsurfedges[0]));
00622 HL_AddLump (HL_LUMP_EDGES, hl_dedges, hl_numedges*sizeof(hl_dedge_t));
00623 HL_AddLump (HL_LUMP_MODELS, hl_dmodels, hl_nummodels*sizeof(hl_dmodel_t));
00624
00625 HL_AddLump (HL_LUMP_LIGHTING, hl_dlightdata, hl_lightdatasize);
00626 HL_AddLump (HL_LUMP_VISIBILITY, hl_dvisdata, hl_visdatasize);
00627 HL_AddLump (HL_LUMP_ENTITIES, hl_dentdata, hl_entdatasize);
00628 HL_AddLump (HL_LUMP_TEXTURES, hl_dtexdata, hl_texdatasize);
00629
00630 fseek (wadfile, 0, SEEK_SET);
00631 SafeWrite (wadfile, hl_header, sizeof(hl_dheader_t));
00632 fclose (wadfile);
00633 }
|
Here is the call graph for this function:

|
|
Definition at line 77 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_PrintBSPFileSizes(), HL_SwapBSPFile(), and HL_WriteBSPFile(). |
|
|
Definition at line 78 of file l_bsp_hl.c. Referenced by HL_LoadBSPFile(). |
|
|
Definition at line 81 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_FaceOnWinding(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_PrintBSPFileSizes(), HL_SplitBrushWithFace(), HL_SwapBSPFile(), and HL_WriteBSPFile(). |
|
|
Definition at line 82 of file l_bsp_hl.c. Referenced by HL_LoadBSPFile(). |
|
|
Definition at line 49 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_ParseEntities(), HL_PrintBSPFileSizes(), and HL_WriteBSPFile(). |
|
|
Definition at line 50 of file l_bsp_hl.c. Referenced by HL_LoadBSPFile(). |
|
|
Definition at line 73 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_PrintBSPFileSizes(), HL_SwapBSPFile(), HL_TextureBrushes(), and HL_WriteBSPFile(). |
|
|
Definition at line 74 of file l_bsp_hl.c. Referenced by HL_LoadBSPFile(). |
|
|
Definition at line 53 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_CreateBrushes_r(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_PrintBSPFileSizes(), HL_SolidTree_r(), HL_SwapBSPFile(), and HL_WriteBSPFile(). |
|
|
Definition at line 54 of file l_bsp_hl.c. Referenced by HL_LoadBSPFile(). |
|
|
Definition at line 41 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_PrintBSPFileSizes(), and HL_WriteBSPFile(). |
|
|
Definition at line 42 of file l_bsp_hl.c. Referenced by HL_LoadBSPFile(). |
|
|
Definition at line 85 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_PrintBSPFileSizes(), HL_SwapBSPFile(), and HL_WriteBSPFile(). |
|
|
Definition at line 86 of file l_bsp_hl.c. Referenced by HL_LoadBSPFile(). |
|
|
Definition at line 33 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_CreateBrushesFromBSP(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_PrintBSPFileSizes(), HL_SwapBSPFile(), and HL_WriteBSPFile(). |
|
|
Definition at line 34 of file l_bsp_hl.c. Referenced by HL_LoadBSPFile(). |
|
|
Definition at line 65 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_CreateBrushes_r(), HL_CreateBrushesFromBSP(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_PrintBSPFileSizes(), HL_SolidTree_r(), HL_SwapBSPFile(), HL_TextureBrushes(), and HL_WriteBSPFile(). |
|
|
Definition at line 66 of file l_bsp_hl.c. Referenced by HL_LoadBSPFile(). |
|
|
Definition at line 57 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_CreateBrushes_r(), HL_FaceOnWinding(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_PrintBSPFileSizes(), HL_SplitBrushWithFace(), HL_SwapBSPFile(), and HL_WriteBSPFile(). |
|
|
Definition at line 58 of file l_bsp_hl.c. Referenced by HL_LoadBSPFile(). |
|
|
Definition at line 89 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_FaceOnWinding(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_PrintBSPFileSizes(), HL_SplitBrushWithFace(), HL_SwapBSPFile(), and HL_WriteBSPFile(). |
|
|
Definition at line 90 of file l_bsp_hl.c. Referenced by HL_LoadBSPFile(). |
|
|
Definition at line 45 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_PrintBSPFileSizes(), and HL_WriteBSPFile(). |
|
|
Definition at line 46 of file l_bsp_hl.c. Referenced by HL_LoadBSPFile(). |
|
|
Definition at line 61 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_FaceOnWinding(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_PrintBSPFileSizes(), HL_SplitBrushWithFace(), HL_SwapBSPFile(), and HL_WriteBSPFile(). |
|
|
Definition at line 62 of file l_bsp_hl.c. Referenced by HL_LoadBSPFile(). |
|
|
Definition at line 37 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_PrintBSPFileSizes(), and HL_WriteBSPFile(). |
|
|
Definition at line 38 of file l_bsp_hl.c. Referenced by HL_LoadBSPFile(). |
|
|
Definition at line 48 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_ParseEntities(), HL_PrintBSPFileSizes(), HL_UnparseEntities(), and HL_WriteBSPFile(). |
|
|
Definition at line 40 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_PrintBSPFileSizes(), and HL_WriteBSPFile(). |
|
|
Definition at line 76 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_PrintBSPFileSizes(), and HL_WriteBSPFile(). |
|
|
Definition at line 80 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_PrintBSPFileSizes(), and HL_WriteBSPFile(). |
|
|
Definition at line 72 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_PrintBSPFileSizes(), and HL_WriteBSPFile(). |
|
|
Definition at line 52 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_CompressVis(), HL_DecompressVis(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_PrintBSPFileSizes(), and HL_WriteBSPFile(). |
|
|
Definition at line 84 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_PrintBSPFileSizes(), and HL_WriteBSPFile(). |
|
|
Definition at line 32 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_PrintBSPFileSizes(), and HL_WriteBSPFile(). |
|
|
Definition at line 64 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_PrintBSPFileSizes(), and HL_WriteBSPFile(). |
|
|
Definition at line 56 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_PrintBSPFileSizes(), and HL_WriteBSPFile(). |
|
|
Definition at line 88 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_PrintBSPFileSizes(), and HL_WriteBSPFile(). |
|
|
Definition at line 68 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_PrintBSPFileSizes(), and HL_WriteBSPFile(). |
|
|
Definition at line 60 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_PrintBSPFileSizes(), and HL_WriteBSPFile(). |
|
|
Definition at line 44 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_PrintBSPFileSizes(), and HL_WriteBSPFile(). |
|
|
Definition at line 69 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_PrintBSPFileSizes(), HL_SwapBSPFile(), HL_TextureBrushes(), and HL_WriteBSPFile(). |
|
|
Definition at line 70 of file l_bsp_hl.c. Referenced by HL_LoadBSPFile(). |
|
|
Definition at line 36 of file l_bsp_hl.c. Referenced by HL_AllocMaxBSP(), HL_FreeMaxBSP(), HL_LoadBSPFile(), HL_PrintBSPFileSizes(), and HL_WriteBSPFile(). |
1.3.9.1