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.31 by root, Wed Dec 13 03:28:42 2006 UTC vs.
Revision 1.34 by pippijn, Wed Jan 3 00:10:04 2007 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 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
397archetype::~archetype () 396archetype::~archetype ()
576 object_thawer 575 object_thawer
577 thawer (filename); 576 thawer (filename);
578 577
579 LOG (llevDebug, " loading treasure...\n"); 578 LOG (llevDebug, " loading treasure...\n");
580 load_treasures (); 579 load_treasures ();
580 LOG (llevDebug, " done\n");
581 LOG (llevDebug, " done\n arch-pass 2...\n"); 581 LOG (llevDebug, " arch-pass 2...\n");
582 second_arch_pass (thawer); 582 second_arch_pass (thawer);
583 LOG (llevDebug, " done\n"); 583 LOG (llevDebug, " done\n");
584#ifdef DEBUG 584#ifdef DEBUG
585 check_generators (); 585 check_generators ();
586#endif 586#endif
590 590
591/* 591/*
592 * Creates and returns a new object which is a copy of the given archetype. 592 * Creates and returns a new object which is a copy of the given archetype.
593 * This function returns NULL on failure. 593 * This function returns NULL on failure.
594 */ 594 */
595
596object * 595object *
597arch_to_object (archetype *at) 596arch_to_object (archetype *at)
598{ 597{
599 object *op; 598 object *op;
600 599
616 * Creates an object. This function is called by get_archetype() 615 * Creates an object. This function is called by get_archetype()
617 * if it fails to find the appropriate archetype. 616 * if it fails to find the appropriate archetype.
618 * Thus get_archetype() will be guaranteed to always return 617 * Thus get_archetype() will be guaranteed to always return
619 * an object, and never NULL. 618 * an object, and never NULL.
620 */ 619 */
621
622object * 620object *
623create_singularity (const char *name) 621create_singularity (const char *name)
624{ 622{
625 object *op; 623 object *op;
626 char buf[MAX_BUF]; 624 char buf[MAX_BUF];
634 632
635/* 633/*
636 * Finds which archetype matches the given name, and returns a new 634 * Finds which archetype matches the given name, and returns a new
637 * object containing a copy of the archetype. 635 * object containing a copy of the archetype.
638 */ 636 */
639
640object * 637object *
641get_archetype (const char *name) 638get_archetype (const char *name)
642{ 639{
643 archetype *at = archetype::find (name); 640 archetype *at = archetype::find (name);
644 641

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines