server/src/eressea.c

79 lines
1.5 KiB
C
Raw Normal View History

2010-08-08 10:06:34 +02:00
#include <platform.h>
#include "settings.h"
#include "eressea.h"
#include <kernel/config.h>
#include <util/log.h>
#if MUSEUM_MODULE
#include <modules/museum.h>
#endif
#if ARENA_MODULE
#include <modules/arena.h>
#endif
#include <triggers/triggers.h>
#include <util/language.h>
#include <kernel/xmlreader.h>
#include <kernel/item.h>
#include <kernel/building.h>
#include <modules/gmcmd.h>
2010-08-08 10:06:34 +02:00
#include <modules/xmas.h>
#include <items/itemtypes.h>
#include <attributes/attributes.h>
#include "chaos.h"
#include "report.h"
#include "items.h"
#include "creport.h"
#include "names.h"
#include "wormhole.h"
2010-08-08 10:06:34 +02:00
void game_done(void)
2010-08-08 10:06:34 +02:00
{
#ifdef CLEANUP_CODE
/* Diese Routine enfernt allen allokierten Speicher wieder. Das ist nur
* zum Debugging interessant, wenn man Leak Detection hat, und nach
* nicht freigegebenem Speicher sucht, der nicht bis zum Ende ben<EFBFBD>tigt
* wird (tempor<EFBFBD>re Hilsstrukturen) */
2010-08-08 10:06:34 +02:00
free_game();
2010-08-08 10:06:34 +02:00
creport_cleanup();
2010-08-08 10:06:34 +02:00
#ifdef REPORT_FORMAT_NR
report_cleanup();
2010-08-08 10:06:34 +02:00
#endif
calendar_cleanup();
2010-08-08 10:06:34 +02:00
#endif
kernel_done();
2010-08-08 10:06:34 +02:00
}
void game_init(void)
2010-08-08 10:06:34 +02:00
{
kernel_init();
register_triggers();
register_xmas();
2010-08-08 10:06:34 +02:00
register_nr();
register_cr();
2010-08-08 10:06:34 +02:00
register_names();
register_resources();
register_buildings();
register_itemfunctions();
2010-08-08 10:06:34 +02:00
#if MUSEUM_MODULE
register_museum();
2010-08-08 10:06:34 +02:00
#endif
#if ARENA_MODULE
register_arena();
2010-08-08 10:06:34 +02:00
#endif
wormholes_register();
2010-08-08 10:06:34 +02:00
register_itemtypes();
#ifdef USE_LIBXML2
register_xmlreader();
#endif
register_attributes();
register_gmcmd();
2010-08-08 10:06:34 +02:00
chaos_register();
2010-08-08 10:06:34 +02:00
}