Lines Matching refs:obj

74 static void use_camera(struct obj *);
75 static int in_ice_box(struct obj *);
76 static int ck_ice_box(struct obj *);
77 static int out_ice_box(struct obj *);
78 static void use_ice_box(struct obj *);
80 static void use_whistle(struct obj *);
81 static void use_magic_whistle(struct obj *);
83 static int use_pick_axe(struct obj *);
88 struct obj *obj;
91 obj = getobj("(", "use or apply");
92 if (!obj)
95 switch (obj->otyp) {
97 use_camera(obj);
100 use_ice_box(obj);
103 res = use_pick_axe(obj);
108 use_magic_whistle(obj);
113 use_whistle(obj);
123 if (obj != uwep)
139 use_camera(struct obj *obj __unused)
186 struct obj *current_ice_box;/* a local variable of use_ice_box, to be
189 in_ice_box(struct obj *obj)
191 if (obj == current_ice_box ||
192 (Punished && (obj == uball || obj == uchain))) {
196 if (obj->owornmask & (W_ARMOR | W_RING)) {
200 if (obj->owt + current_ice_box->owt > 70) {
204 if (obj == uwep) {
209 setuwep((struct obj *) 0);
211 current_ice_box->owt += obj->owt;
212 freeinv(obj);
213 obj->o_cnt_id = current_ice_box->o_id;
214 obj->nobj = fcobj;
215 fcobj = obj;
216 obj->age = moves - obj->age; /* actual age */
221 ck_ice_box(struct obj *obj)
223 return (obj->o_cnt_id == current_ice_box->o_id);
227 out_ice_box(struct obj *obj)
229 struct obj *otmp;
230 if (obj == fcobj)
233 for (otmp = fcobj; otmp->nobj != obj; otmp = otmp->nobj)
236 otmp->nobj = obj->nobj;
238 current_ice_box->owt -= obj->owt;
239 obj->age = moves - obj->age; /* simulated point of time */
240 (void) addinv(obj);
245 use_ice_box(struct obj *obj)
248 struct obj *otmp;
249 current_ice_box = obj; /* for use by in/out_ice_box */
251 if (otmp->o_cnt_id == obj->o_id)
298 use_whistle(struct obj *obj __unused)
315 use_magic_whistle(struct obj *obj __unused)
369 struct obj *obj;
372 if ((obj = sobj_at(ENORMOUS_ROCK, dpx, dpy)) != NULL) {
373 fracture_rock(obj);
437 use_pick_axe(struct obj *obj)
445 if (obj != uwep) {
452 pline("You now wield %s.", doname(obj));
453 setuwep(obj);
488 aobjnam(obj, "clang"));
493 aobjnam(obj, NULL));