ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/arch.C
(Generate patch)

Comparing deliantra/server/common/arch.C (file contents):
Revision 1.30 by root, Wed Dec 13 00:42:03 2006 UTC vs.
Revision 1.33 by root, Sun Dec 31 17:17:22 2006 UTC

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
390archetype::archetype () 390archetype::archetype ()
391{ 391{
392 clear_object (&clone); /* 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
397archetype::~archetype () 396archetype::~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
596object * 594object *
597arch_to_object (archetype *at) 595arch_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
622object * 619object *
623create_singularity (const char *name) 620create_singularity (const char *name)
624{ 621{
625 object *op; 622 object *op;
626 char buf[MAX_BUF]; 623 char buf[MAX_BUF];
634 631
635/* 632/*
636 * Finds which archetype matches the given name, and returns a new 633 * Finds which archetype matches the given name, and returns a new
637 * object containing a copy of the archetype. 634 * object containing a copy of the archetype.
638 */ 635 */
639
640object * 636object *
641get_archetype (const char *name) 637get_archetype (const char *name)
642{ 638{
643 archetype *at = archetype::find (name); 639 archetype *at = archetype::find (name);
644 640

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines