MCPcopy Create free account
hub / github.com/NetHack/NetHack / save_room

Function save_room

src/mkroom.c:843–857  ·  view source on GitHub ↗

* save_room : A recursive function that saves a room and its subrooms * (if any). */

Source from the content-addressed store, hash-verified

841 * (if any).
842 */
843staticfn void
844save_room(NHFILE *nhfp, struct mkroom *r)
845{
846 short i;
847
848 /*
849 * Well, I really should write only useful information instead
850 * of writing the whole structure. That is I should not write
851 * the gs.subrooms pointers, but who cares ?
852 */
853 Sfo_mkroom(nhfp, r, "room-mkroom");
854 for (i = 0; i < r->nsubrooms; i++) {
855 save_room(nhfp, r->sbrooms[i]);
856 }
857}
858
859/*
860 * save_rooms : Save all the rooms on disk!

Callers 1

save_roomsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected