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

Function size_monst

src/wizcmds.c:1227–1254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1225}
1226
1227staticfn int
1228size_monst(struct monst *mtmp, boolean incl_wsegs)
1229{
1230 int sz = (int) sizeof (struct monst);
1231
1232 if (mtmp->wormno && incl_wsegs)
1233 sz += size_wseg(mtmp);
1234
1235 if (mtmp->mextra) {
1236 sz += (int) sizeof (struct mextra);
1237 if (MGIVENNAME(mtmp))
1238 sz += (int) strlen(MGIVENNAME(mtmp)) + 1;
1239 if (EGD(mtmp))
1240 sz += (int) sizeof (struct egd);
1241 if (EPRI(mtmp))
1242 sz += (int) sizeof (struct epri);
1243 if (ESHK(mtmp))
1244 sz += (int) sizeof (struct eshk);
1245 if (EMIN(mtmp))
1246 sz += (int) sizeof (struct emin);
1247 if (EDOG(mtmp))
1248 sz += (int) sizeof (struct edog);
1249 if (EBONES(mtmp))
1250 sz += (int) sizeof (struct ebones);
1251 /* mextra->mcorpsenm doesn't point to more memory */
1252 }
1253 return sz;
1254}
1255
1256staticfn void
1257mon_chain(

Callers 2

size_objFunction · 0.85
mon_chainFunction · 0.85

Calls 1

size_wsegFunction · 0.85

Tested by

no test coverage detected