… | |
… | |
387 | LOG (llevDebug, "Freed %d archetypes, %d faces\n", i, f); |
387 | LOG (llevDebug, "Freed %d archetypes, %d faces\n", i, f); |
388 | } |
388 | } |
389 | |
389 | |
390 | archetype::archetype () |
390 | archetype::archetype () |
391 | { |
391 | { |
392 | clone.clear (); /* to initial state other also */ |
|
|
393 | CLEAR_FLAG (&clone, FLAG_FREED); /* This shouldn't matter, since copy_to */ |
392 | CLEAR_FLAG (&clone, FLAG_FREED); /* This shouldn't matter, since copy_to */ |
394 | SET_FLAG (&clone, FLAG_REMOVED); /* doesn't copy these flags... */ |
393 | SET_FLAG (&clone, FLAG_REMOVED); /* doesn't copy these flags... */ |
395 | } |
394 | } |
396 | |
395 | |
397 | archetype::~archetype () |
396 | archetype::~archetype () |
… | |
… | |
590 | |
589 | |
591 | /* |
590 | /* |
592 | * Creates and returns a new object which is a copy of the given archetype. |
591 | * Creates and returns a new object which is a copy of the given archetype. |
593 | * This function returns NULL on failure. |
592 | * This function returns NULL on failure. |
594 | */ |
593 | */ |
595 | |
|
|
596 | object * |
594 | object * |
597 | arch_to_object (archetype *at) |
595 | arch_to_object (archetype *at) |
598 | { |
596 | { |
599 | object *op; |
597 | object *op; |
600 | |
598 | |
… | |
… | |
616 | * Creates an object. This function is called by get_archetype() |
614 | * Creates an object. This function is called by get_archetype() |
617 | * if it fails to find the appropriate archetype. |
615 | * if it fails to find the appropriate archetype. |
618 | * Thus get_archetype() will be guaranteed to always return |
616 | * Thus get_archetype() will be guaranteed to always return |
619 | * an object, and never NULL. |
617 | * an object, and never NULL. |
620 | */ |
618 | */ |
621 | |
|
|
622 | object * |
619 | object * |
623 | create_singularity (const char *name) |
620 | create_singularity (const char *name) |
624 | { |
621 | { |
625 | object *op; |
622 | object *op; |
626 | char buf[MAX_BUF]; |
623 | char buf[MAX_BUF]; |