… | |
… | |
81 | * don't just want it copied, so you'll need to add to common/object.C, |
81 | * don't just want it copied, so you'll need to add to common/object.C, |
82 | * e.g. copy_object. |
82 | * e.g. copy_object. |
83 | */ |
83 | */ |
84 | |
84 | |
85 | typedef refptr<object> object_ptr; |
85 | typedef refptr<object> object_ptr; |
|
|
86 | typedef refptr<archetype> arch_ptr; |
86 | |
87 | |
87 | // these are not being copied |
88 | // these are not being copied |
88 | ACC_CLASS (object) |
89 | ACC_CLASS (object) |
89 | struct object_keep : refcounted |
90 | struct object_keep : refcounted |
90 | { |
91 | { |
… | |
… | |
209 | uint8 ACC (RW, range_modifier); /* How going up in level effects range */ |
210 | uint8 ACC (RW, range_modifier); /* How going up in level effects range */ |
210 | char *ACC (RW, spellarg); |
211 | char *ACC (RW, spellarg); |
211 | |
212 | |
212 | /* Following are values used by any object */ |
213 | /* Following are values used by any object */ |
213 | treasurelist *ACC (RW, randomitems); /* Items to be generated */ |
214 | treasurelist *ACC (RW, randomitems); /* Items to be generated */ |
214 | archetype *ACC (RW, arch); /* Pointer to archetype */ |
215 | arch_ptr ACC (RW, arch); /* Pointer to archetype */ |
215 | archetype *ACC (RW, other_arch); /* Pointer used for various things - mostly used for what */ |
216 | arch_ptr ACC (RW, other_arch); /* Pointer used for various things - mostly used for what */ |
216 | key_value *key_values; /* Fields not explictly known by the loader. */ |
217 | key_value *key_values; /* Fields not explictly known by the loader. */ |
217 | /* this objects turns into or what this object creates */ |
218 | /* this objects turns into or what this object creates */ |
218 | uint32 flags[4]; /* various flags */ |
219 | uint32 flags[4]; /* various flags */ |
219 | uint16 ACC (RW, animation_id); /* An index into the animation array */ |
220 | uint16 ACC (RW, animation_id); /* An index into the animation array */ |
220 | uint8 ACC (RW, anim_speed); /* ticks between animation-frames */ |
221 | uint8 ACC (RW, anim_speed); /* ticks between animation-frames */ |
… | |
… | |
347 | * be much left in the archetype - all it really is is a holder for the |
348 | * be much left in the archetype - all it really is is a holder for the |
348 | * object and pointers. This structure should get removed, and just replaced |
349 | * object and pointers. This structure should get removed, and just replaced |
349 | * by the object structure |
350 | * by the object structure |
350 | */ |
351 | */ |
351 | |
352 | |
352 | ACC_CLASS(archetype) |
353 | ACC_CLASS (archetype) |
353 | struct archetype : zero_initialised |
354 | struct archetype : zero_initialised, refcounted |
354 | { |
355 | { |
355 | archetype (); |
356 | archetype (); |
356 | ~archetype (); |
357 | ~archetype (); |
357 | |
358 | |
358 | static archetype *find (const char *arch); |
359 | static archetype *find (const char *arch); |
|
|
360 | |
|
|
361 | void hash_add (); // add to hastable |
|
|
362 | void hash_del (); // remove from hashtable |
359 | |
363 | |
360 | shstr ACC (RW, name); /* More definite name, like "generate_kobold" */ |
364 | shstr ACC (RW, name); /* More definite name, like "generate_kobold" */ |
361 | struct archetype *ACC (RW, next); /* Next archetype in a linked list */ |
365 | struct archetype *ACC (RW, next); /* Next archetype in a linked list */ |
362 | struct archetype *ACC (RW, head); /* The main part of a linked object */ |
366 | struct archetype *ACC (RW, head); /* The main part of a linked object */ |
363 | struct archetype *ACC (RW, more); /* Next part of a linked object */ |
367 | struct archetype *ACC (RW, more); /* Next part of a linked object */ |
… | |
… | |
425 | #define ARCH_DETECT_MAGIC "detect_magic" |
429 | #define ARCH_DETECT_MAGIC "detect_magic" |
426 | #define ARCH_DEPLETION "depletion" |
430 | #define ARCH_DEPLETION "depletion" |
427 | #define ARCH_SYMPTOM "symptom" |
431 | #define ARCH_SYMPTOM "symptom" |
428 | |
432 | |
429 | #endif |
433 | #endif |
|
|
434 | |