--- deliantra/server/common/arch.C 2009/11/05 15:43:21 1.92 +++ deliantra/server/common/arch.C 2009/11/07 18:30:05 1.96 @@ -55,6 +55,26 @@ //+GPL +/* + * Creates an object. This function is called by get_archetype () + * if it fails to find the appropriate archetype. + * Thus get_archetype() will be guaranteed to always return + * an object, and never NULL. + */ +static object * +create_singularity (const char *name) +{ + LOG (llevError | logBacktrace, "FATAL: creating singularity for '%s'.\n", name); + + if (!strcmp (name, "bug")) + abort (); + + object *op = archetype::get (shstr_bug); + op->name = op->name_pl = format ("bug, please report (missing archetype %s)", name); + + return op; +} + /** * GROS - This function retrieves an archetype given the name that appears * during the game (for example, "writing pen" instead of "stylus"). @@ -550,26 +570,6 @@ //+GPL /* - * Creates an object. This function is called by get_archetype() - * if it fails to find the appropriate archetype. - * Thus get_archetype() will be guaranteed to always return - * an object, and never NULL. - */ -object * -create_singularity (const char *name) -{ - LOG (llevError | logBacktrace, "FATAL: creating singularity for '%s'.\n", name); - - if (!strcmp (name, "bug")) - abort (); - - object *op = archetype::get (shstr_bug); - op->name = op->name_pl = format ("bug, please report (missing archetype %s)", name); - - return op; -} - -/* * Finds which archetype matches the given name, and returns a new * object containing a copy of the archetype. */ @@ -594,7 +594,7 @@ * Returns the first archetype using the given type. * Used in treasure-generation. */ -archetype * +static archetype * type_to_archetype (int type) { for_all_archetypes (at)