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:
17
src/light.c
17
src/light.c
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user