]>
git.cameronkatri.com Git - bsdgames-darwin.git/blob - hack/hack.worn.c
1 /* $NetBSD: hack.worn.c,v 1.4 1997/10/19 16:59:32 christos Exp $ */
4 * Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985.
9 __RCSID("$NetBSD: hack.worn.c,v 1.4 1997/10/19 16:59:32 christos Exp $");
62 for (wp
= worn
; wp
->w_mask
; wp
++)
63 if (wp
->w_mask
& mask
) {
65 if (oobj
&& !(oobj
->owornmask
& wp
->w_mask
))
66 impossible("Setworn: mask = %ld.", wp
->w_mask
);
68 oobj
->owornmask
&= ~wp
->w_mask
;
69 if (obj
&& oobj
&& wp
->w_mask
== W_ARM
) {
71 impossible("Setworn: uarm2 set?");
73 setworn(uarm
, W_ARM2
);
77 obj
->owornmask
|= wp
->w_mask
;
82 uarm
->owornmask
^= (W_ARM
| W_ARM2
);
86 /* called e.g. when obj is destroyed */
93 for (wp
= worn
; wp
->w_mask
; wp
++)
94 if (obj
== *(wp
->w_obj
)) {
96 obj
->owornmask
&= ~wp
->w_mask
;
101 uarm
->owornmask
^= (W_ARM
| W_ARM2
);