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

Function readobjnam_init

src/objnam.c:3932–3961  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3930#define TIN_SPINACH 2
3931
3932staticfn void
3933readobjnam_init(char *bp, struct _readobjnam_data *d)
3934{
3935 d->otmp = (struct obj *) 0;
3936 d->cnt = d->spe = d->spesgn = d->typ = 0;
3937 d->very = d->rechrg = d->blessed = d->uncursed = d->iscursed
3938 = d->ispoisoned = d->isgreased = d->eroded = d->eroded2
3939 = d->erodeproof = d->halfeaten = d->islit = d->unlabeled
3940 = d->ishistoric = d->isdiluted /* statues, potions */
3941 /* box/chest and wizard mode door */
3942 = d->trapped = d->locked = d->unlocked = d->broken
3943 = d->open = d->closed = d->doorless /* wizard mode door */
3944 = d->looted /* wizard mode fountain/sink/throne/tree and grave */
3945 = d->real = d->fake = 0; /* Amulet */
3946 d->tvariety = RANDOM_TIN;
3947 d->mgend = -1; /* not specified, aka random */
3948 d->mntmp = NON_PM;
3949 d->contents = TIN_UNDEFINED;
3950 d->oclass = 0;
3951 d->actualn = d->dn = d->un = 0;
3952 d->wetness = 0;
3953 d->gsize = 0;
3954 d->zombify = FALSE;
3955 d->bp = d->origbp = bp;
3956 d->p = (char *) 0;
3957 d->name = (const char *) 0;
3958 d->ftype = svc.context.current_fruit;
3959 (void) memset(d->globbuf, '\0', sizeof d->globbuf);
3960 (void) memset(d->fruitbuf, '\0', sizeof d->fruitbuf);
3961}
3962
3963/* return 1 if d->bp is empty or contains only various qualifiers like
3964 "blessed", "rustproof", and so on, or 0 if anything else is present */

Callers 1

readobjnamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected