… | |
… | |
136 | { |
136 | { |
137 | signed char info:4; /* body info as loaded from the file */ |
137 | signed char info:4; /* body info as loaded from the file */ |
138 | signed char used:4; /* Calculated value based on items equipped */ |
138 | signed char used:4; /* Calculated value based on items equipped */ |
139 | }; |
139 | }; |
140 | |
140 | |
|
|
141 | typedef struct oblnk |
|
|
142 | { /* Used to link together several objects */ |
|
|
143 | object_ptr ob; |
|
|
144 | struct oblnk *next; |
|
|
145 | } objectlink; |
|
|
146 | |
|
|
147 | typedef struct oblinkpt |
|
|
148 | { /* Used to link together several object links */ |
|
|
149 | struct oblnk *link; |
|
|
150 | struct oblinkpt *next; |
|
|
151 | shstr id; /* Used as connected value in buttons/gates */ |
|
|
152 | } oblinkpt; |
|
|
153 | |
141 | INTERFACE_CLASS (object) |
154 | INTERFACE_CLASS (object) |
142 | // these are being copied |
155 | // these are being copied |
143 | struct object_copy : attachable |
156 | struct object_copy : attachable |
144 | { |
157 | { |
145 | sint16 ACC (RW, x), ACC (RW, y); /* Position in the map for this object */ |
158 | sint16 ACC (RW, x), ACC (RW, y); /* Position in the map for this object */ |
… | |
… | |
414 | open_container (0); |
427 | open_container (0); |
415 | } |
428 | } |
416 | |
429 | |
417 | MTH object *force_find (shstr_tmp name); |
430 | MTH object *force_find (shstr_tmp name); |
418 | MTH object *force_add (shstr_tmp name, int duration = 0); |
431 | MTH object *force_add (shstr_tmp name, int duration = 0); |
|
|
432 | |
|
|
433 | oblinkpt *find_link () const; |
|
|
434 | MTH void add_link (maptile *map, shstr_tmp id); |
|
|
435 | MTH void remove_link (); |
419 | |
436 | |
420 | // overwrite the attachable should_invoke function with a version that also checks ev_want_type |
437 | // overwrite the attachable should_invoke function with a version that also checks ev_want_type |
421 | bool should_invoke (event_type event) |
438 | bool should_invoke (event_type event) |
422 | { |
439 | { |
423 | return ev_want_event [event] || ev_want_type [type] || cb; |
440 | return ev_want_event [event] || ev_want_type [type] || cb; |
… | |
… | |
696 | ob->env->inv = ob; |
713 | ob->env->inv = ob; |
697 | } |
714 | } |
698 | |
715 | |
699 | return ob; |
716 | return ob; |
700 | } |
717 | } |
701 | |
|
|
702 | typedef struct oblnk |
|
|
703 | { /* Used to link together several objects */ |
|
|
704 | object_ptr ob; |
|
|
705 | struct oblnk *next; |
|
|
706 | } objectlink; |
|
|
707 | |
|
|
708 | typedef struct oblinkpt |
|
|
709 | { /* Used to link together several object links */ |
|
|
710 | struct oblnk *link; |
|
|
711 | sint32 value; /* Used as connected value in buttons/gates */ |
|
|
712 | struct oblinkpt *next; |
|
|
713 | } oblinkpt; |
|
|
714 | |
718 | |
715 | object *find_skill_by_name_fuzzy (object *who, const char *name); |
719 | object *find_skill_by_name_fuzzy (object *who, const char *name); |
716 | object *find_skill_by_name (object *who, shstr_cmp sh); |
720 | object *find_skill_by_name (object *who, shstr_cmp sh); |
717 | object *find_skill_by_number (object *who, int skillno); |
721 | object *find_skill_by_number (object *who, int skillno); |
718 | |
722 | |