… | |
… | |
50 | |
50 | |
51 | // the vector of other_arch references to be resolved |
51 | // the vector of other_arch references to be resolved |
52 | static std::vector< std::pair<arch_ptr *, shstr> > postponed_arch_ref; |
52 | static std::vector< std::pair<arch_ptr *, shstr> > postponed_arch_ref; |
53 | // the vector of loaded but not yet committed archetypes |
53 | // the vector of loaded but not yet committed archetypes |
54 | static std::vector<archetype *> postponed_arch; |
54 | static std::vector<archetype *> postponed_arch; |
|
|
55 | |
|
|
56 | //+GPL |
55 | |
57 | |
56 | /** |
58 | /** |
57 | * GROS - This function retrieves an archetype given the name that appears |
59 | * GROS - This function retrieves an archetype given the name that appears |
58 | * during the game (for example, "writing pen" instead of "stylus"). |
60 | * during the game (for example, "writing pen" instead of "stylus"). |
59 | * It does not use the hashtable system, but browse the whole archlist each time. |
61 | * It does not use the hashtable system, but browse the whole archlist each time. |
… | |
… | |
276 | } |
278 | } |
277 | |
279 | |
278 | return 0; |
280 | return 0; |
279 | } |
281 | } |
280 | |
282 | |
|
|
283 | //-GPL |
|
|
284 | |
281 | archetype::archetype (const char *name) |
285 | archetype::archetype (const char *name) |
282 | { |
286 | { |
283 | arch = this; |
287 | arch = this; |
284 | this->archname = this->name = this->name_pl = name; |
288 | this->archname = this->name = this->name_pl = name; |
285 | } |
289 | } |
… | |
… | |
541 | object *op = clone (); |
545 | object *op = clone (); |
542 | op->instantiate (); |
546 | op->instantiate (); |
543 | return op; |
547 | return op; |
544 | } |
548 | } |
545 | |
549 | |
|
|
550 | //+GPL |
|
|
551 | |
546 | /* |
552 | /* |
547 | * Creates an object. This function is called by get_archetype() |
553 | * Creates an object. This function is called by get_archetype() |
548 | * if it fails to find the appropriate archetype. |
554 | * if it fails to find the appropriate archetype. |
549 | * Thus get_archetype() will be guaranteed to always return |
555 | * Thus get_archetype() will be guaranteed to always return |
550 | * an object, and never NULL. |
556 | * an object, and never NULL. |
… | |
… | |
643 | } |
649 | } |
644 | |
650 | |
645 | return head; |
651 | return head; |
646 | } |
652 | } |
647 | |
653 | |
|
|
654 | //-GPL |
|
|
655 | |