|
Atrinik Server 2.5
|
Go to the source code of this file.
Defines | |
| #define | TIME_ARCH_LOAD 0 |
Functions | |
| static void | clear_archetable () |
| static void | init_archetable () |
| static archetype * | get_archetype_struct () |
| static void | first_arch_pass (FILE *fp) |
| static void | second_arch_pass (FILE *fp_start) |
| static void | load_archetypes () |
| static unsigned long | hasharch (const char *str, int tablesize) |
| static void | add_arch (archetype *at) |
| archetype * | get_skill_archetype (int skillnr) |
| void | init_archetypes () |
| void | arch_info (object *op) |
| void | dump_all_archetypes () |
| void | free_all_archs () |
| object * | arch_to_object (archetype *at) |
| object * | create_singularity (const char *name) |
| object * | get_archetype (const char *name) |
| archetype * | find_archetype (const char *name) |
Variables | |
| static archetype * | arch_table [ARCHTABLE] |
| int | arch_cmp = 0 |
| int | arch_search = 0 |
| int | arch_init |
Arch related functions.
Definition in file arch.c.
| #define TIME_ARCH_LOAD 0 |
| static void add_arch | ( | archetype * | at | ) | [static] |
| void arch_info | ( | object * | op | ) |
| static void clear_archetable | ( | ) | [static] |
| object* create_singularity | ( | const char * | name | ) |
Creates a dummy 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.
| name | Name to give the dummy object. |
| void dump_all_archetypes | ( | ) |
| archetype* find_archetype | ( | const char * | name | ) |
| static void first_arch_pass | ( | FILE * | fp | ) | [static] |
| void free_all_archs | ( | ) |
Frees all memory allocated to archetypes.
After calling this, it's possible to call again init_archetypes() to reload data.
| object* get_archetype | ( | const char * | name | ) |
| static archetype * get_archetype_struct | ( | ) | [static] |
| archetype* get_skill_archetype | ( | int | skillnr | ) |
| static unsigned long hasharch | ( | const char * | str, |
| int | tablesize | ||
| ) | [static] |
| static void init_archetable | ( | ) | [static] |
| void init_archetypes | ( | ) |
Initializes the internal linked list of archetypes (read from file). Some commonly used archetype pointers like empty_archetype, base_info_archetype are initialized.
Can be called multiple times, will just return.
| static void load_archetypes | ( | ) | [static] |
Loads all archetypes and treasures.
First initializes the archtype hash-table (init_archetable()). Reads and parses the archetype file (with the first and second-pass functions). Then initializes treasures by calling load_treasures().
| static void second_arch_pass | ( | FILE * | fp_start | ) | [static] |
Reads the archetype file once more, and links all pointers between archetypes and treasure lists. Must be called after first_arch_pass().
| fp_start | File from which to read. Won't be rewinded. |
| int arch_search = 0 |
archetype* arch_table[ARCHTABLE] [static] |
1.7.4