mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
[qfbsp] Show correct object counts for bsp29 files
Yes, this was the goal of that size_t change, but it made sense anyway.
This commit is contained in:
parent
674ffa0941
commit
f514345d77
1 changed files with 19 additions and 18 deletions
|
@ -19,23 +19,23 @@ typedef struct lumpinfo_s {
|
|||
int size;
|
||||
} lumpinfo_t;
|
||||
|
||||
#define S(f) sizeof (*((bsp_t *)0)->f)
|
||||
#define O(f) field_offset (bsp_t, f)
|
||||
static lumpinfo_t lump_info[] = {
|
||||
{ "entities", S(entdata) },
|
||||
{ "planes", S(planes) },
|
||||
{ "textures", S(texdata) },
|
||||
{ "vertices", S(vertexes) },
|
||||
{ "visibility", S(visdata) },
|
||||
{ "nodes", S(nodes) },
|
||||
{ "texinfo", S(texinfo) },
|
||||
{ "faces", S(faces) },
|
||||
{ "lighting", S(lightdata) },
|
||||
{ "clipnodes", S(clipnodes) },
|
||||
{ "leafs", S(leafs) },
|
||||
{ "marksurfaces", S(marksurfaces) },
|
||||
{ "edges", S(edges) },
|
||||
{ "surfedges", S(surfedges) },
|
||||
{ "models", S(models) },
|
||||
{ "entities", O(entdatasize) },
|
||||
{ "planes", O(numplanes) },
|
||||
{ "textures", O(texdatasize) },
|
||||
{ "vertices", O(numvertexes) },
|
||||
{ "visibility", O(visdatasize) },
|
||||
{ "nodes", O(numnodes) },
|
||||
{ "texinfo", O(numtexinfo) },
|
||||
{ "faces", O(numfaces) },
|
||||
{ "lighting", O(lightdatasize) },
|
||||
{ "clipnodes", O(numclipnodes) },
|
||||
{ "leafs", O(numleafs) },
|
||||
{ "marksurfaces", O(nummarksurfaces) },
|
||||
{ "edges", O(numedges) },
|
||||
{ "surfedges", O(numsurfedges) },
|
||||
{ "models", O(nummodels) },
|
||||
};
|
||||
|
||||
void
|
||||
|
@ -45,9 +45,10 @@ bspinfo ()
|
|||
for (int i = 0; i < HEADER_LUMPS; i++) {
|
||||
lump_t *lump = &bsp->header->lumps[i];
|
||||
lumpinfo_t *info = &lump_info[i];
|
||||
size_t *size = (size_t *)((byte *) bsp + info->size);
|
||||
|
||||
printf (" %-12s: %7d %7d %7d\n", info->name,
|
||||
lump->fileofs, lump->filelen, lump->filelen / info->size);
|
||||
printf (" %-12s: %7d %7d %7zd\n", info->name,
|
||||
lump->fileofs, lump->filelen, *size);
|
||||
|
||||
}
|
||||
for (unsigned i = 0; i < bsp->nummodels; i++) {
|
||||
|
|
Loading…
Reference in a new issue