… | |
… | |
106 | #define WILL_APPLY_HANDLE 0x01 |
106 | #define WILL_APPLY_HANDLE 0x01 |
107 | #define WILL_APPLY_TREASURE 0x02 |
107 | #define WILL_APPLY_TREASURE 0x02 |
108 | #define WILL_APPLY_EARTHWALL 0x04 |
108 | #define WILL_APPLY_EARTHWALL 0x04 |
109 | #define WILL_APPLY_DOOR 0x08 |
109 | #define WILL_APPLY_DOOR 0x08 |
110 | #define WILL_APPLY_FOOD 0x10 |
110 | #define WILL_APPLY_FOOD 0x10 |
111 | |
|
|
112 | /* However, if you're keeping a pointer of some sort, you probably |
|
|
113 | * don't just want it copied, so you'll need to add to common/object.C, |
|
|
114 | * e.g. ->copy_to () |
|
|
115 | */ |
|
|
116 | |
111 | |
117 | struct body_slot |
112 | struct body_slot |
118 | { |
113 | { |
119 | signed char info:4; /* body info as loaded from the file */ |
114 | signed char info:4; /* body info as loaded from the file */ |
120 | signed char used:4; /* Calculated value based on items equipped */ |
115 | signed char used:4; /* Calculated value based on items equipped */ |
… | |
… | |
318 | MTH void close_container () |
313 | MTH void close_container () |
319 | { |
314 | { |
320 | open_container (0); |
315 | open_container (0); |
321 | } |
316 | } |
322 | |
317 | |
323 | // overwrite the attachable invoke function with a version that also checks ev_want_type |
318 | // overwrite the attachable should_invoke function with a version that also checks ev_want_type |
324 | bool invoke (event_type event, ...) |
319 | bool should_invoke (event_type event) |
325 | { |
320 | { |
326 | if (ev_want_event [event] || ev_want_type [type] || cb) |
321 | return ev_want_event [event] || ev_want_type [type] || cb; |
327 | { |
|
|
328 | va_list ap; |
|
|
329 | va_start (ap, event); |
|
|
330 | vinvoke (event, ap); |
|
|
331 | va_end (ap); |
|
|
332 | } |
|
|
333 | } |
322 | } |
334 | |
323 | |
335 | MTH void instantiate (); |
324 | MTH void instantiate (); |
336 | |
325 | |
337 | // recalculate all stats |
326 | // recalculate all stats |