… | |
… | |
474 | } |
474 | } |
475 | } |
475 | } |
476 | } |
476 | } |
477 | } |
477 | } |
478 | |
478 | |
479 | #ifdef DEBUG |
|
|
480 | void |
|
|
481 | check_generators (void) |
|
|
482 | { |
|
|
483 | archetype *at; |
|
|
484 | |
|
|
485 | for (at = first_archetype; at != NULL; at = at->next) |
|
|
486 | if (QUERY_FLAG (&at->clone, FLAG_GENERATOR) && at->clone.other_arch == NULL) |
|
|
487 | LOG (llevError, "Warning: %s is generator but lacks other_arch.\n", &at->name); |
|
|
488 | } |
|
|
489 | #endif |
|
|
490 | |
|
|
491 | /* |
479 | /* |
492 | * First initialises the archtype hash-table (init_archetable()). |
480 | * First initialises the archtype hash-table (init_archetable()). |
493 | * Reads and parses the archetype file (with the first and second-pass |
481 | * Reads and parses the archetype file (with the first and second-pass |
494 | * functions). |
482 | * functions). |
495 | * Then initialises treasures by calling load_treasures(). |
483 | * Then initialises treasures by calling load_treasures(). |
496 | */ |
484 | */ |
497 | |
|
|
498 | void |
485 | void |
499 | load_archetypes (void) |
486 | load_archetypes (void) |
500 | { |
487 | { |
501 | char filename[MAX_BUF]; |
488 | char filename[MAX_BUF]; |
502 | |
489 | |
… | |
… | |
524 | load_treasures (); |
511 | load_treasures (); |
525 | LOG (llevDebug, " done\n"); |
512 | LOG (llevDebug, " done\n"); |
526 | LOG (llevDebug, " arch-pass 2...\n"); |
513 | LOG (llevDebug, " arch-pass 2...\n"); |
527 | second_arch_pass (f); |
514 | second_arch_pass (f); |
528 | LOG (llevDebug, " done\n"); |
515 | LOG (llevDebug, " done\n"); |
529 | #ifdef DEBUG |
|
|
530 | check_generators (); |
|
|
531 | #endif |
|
|
532 | } |
516 | } |
533 | LOG (llevDebug, " done\n"); |
517 | LOG (llevDebug, " done\n"); |
534 | } |
518 | } |
535 | |
519 | |
536 | /* |
520 | /* |