extend wizard-mode '#stats' command

Extend #stats beyond just monsters and objects.  Have it display
memory usage for traps, engravings, light sources, timers, pending
shop wall/floor repair, regions, bones tracking, named object types,
and dungeon overview.

No doubt there are other memory consumers that I've overlooked.
This commit is contained in:
PatR
2016-04-16 15:37:35 -07:00
parent 41ade6d37d
commit 953ee96f7e
8 changed files with 333 additions and 62 deletions

View File

@@ -306,6 +306,23 @@ int fd;
}
}
/* to support '#stats' wizard-mode command */
void
light_stats(hdrfmt, hdrbuf, count, size)
const char *hdrfmt;
char *hdrbuf;
long *count, *size;
{
light_source *ls;
Sprintf(hdrbuf, hdrfmt, (long) sizeof (light_source));
*count = *size = 0L;
for (ls = light_base; ls; ls = ls->next) {
++*count;
*size += (long) sizeof *ls;
}
}
/* Relink all lights that are so marked. */
void
relink_light_sources(ghostly)