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>
|
2014-03-22 21:49:18 +01:00
|
|
|
|
#include <modules/gmcmd.h>
|
2010-08-08 10:06:34 +02:00
|
|
|
|
#include <modules/xmas.h>
|
|
|
|
|
#include <items/itemtypes.h>
|
|
|
|
|
#include <attributes/attributes.h>
|
2015-01-12 08:18:41 +01:00
|
|
|
|
#include <races/races.h>
|
2014-12-13 17:31:55 +01:00
|
|
|
|
#include "chaos.h"
|
2014-02-18 05:45:00 +01:00
|
|
|
|
#include "report.h"
|
|
|
|
|
#include "items.h"
|
|
|
|
|
#include "creport.h"
|
2014-08-27 06:40:18 +02:00
|
|
|
|
#include "names.h"
|
2014-09-29 23:19:59 +02:00
|
|
|
|
#include "wormhole.h"
|
2015-01-12 08:18:41 +01:00
|
|
|
|
#include "spells.h"
|
2010-08-08 10:06:34 +02:00
|
|
|
|
|
2012-06-07 04:29:36 +02:00
|
|
|
|
void game_done(void)
|
2010-08-08 10:06:34 +02:00
|
|
|
|
{
|
|
|
|
|
#ifdef CLEANUP_CODE
|
2014-07-23 08:10:14 +02:00
|
|
|
|
/* 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
|
|
|
|
|
2014-07-23 08:10:14 +02:00
|
|
|
|
free_game();
|
2010-08-08 10:06:34 +02:00
|
|
|
|
|
2014-07-23 08:10:14 +02:00
|
|
|
|
creport_cleanup();
|
2010-08-08 10:06:34 +02:00
|
|
|
|
#ifdef REPORT_FORMAT_NR
|
2014-07-23 08:10:14 +02:00
|
|
|
|
report_cleanup();
|
2010-08-08 10:06:34 +02:00
|
|
|
|
#endif
|
2014-07-23 08:10:14 +02:00
|
|
|
|
calendar_cleanup();
|
2010-08-08 10:06:34 +02:00
|
|
|
|
#endif
|
2014-07-23 08:10:14 +02:00
|
|
|
|
kernel_done();
|
2010-08-08 10:06:34 +02:00
|
|
|
|
}
|
|
|
|
|
|
2012-06-07 04:29:36 +02:00
|
|
|
|
void game_init(void)
|
2010-08-08 10:06:34 +02:00
|
|
|
|
{
|
2014-07-06 05:14:11 +02:00
|
|
|
|
kernel_init();
|
2014-07-23 08:10:14 +02:00
|
|
|
|
register_triggers();
|
|
|
|
|
register_xmas();
|
2010-08-08 10:06:34 +02:00
|
|
|
|
|
2014-07-23 08:10:14 +02:00
|
|
|
|
register_nr();
|
|
|
|
|
register_cr();
|
2010-08-08 10:06:34 +02:00
|
|
|
|
|
2015-01-12 08:18:41 +01:00
|
|
|
|
register_races();
|
|
|
|
|
register_spells();
|
2014-07-23 08:10:14 +02:00
|
|
|
|
register_names();
|
|
|
|
|
register_resources();
|
|
|
|
|
register_buildings();
|
|
|
|
|
register_itemfunctions();
|
2010-08-08 10:06:34 +02:00
|
|
|
|
#if MUSEUM_MODULE
|
2014-07-23 08:10:14 +02:00
|
|
|
|
register_museum();
|
2010-08-08 10:06:34 +02:00
|
|
|
|
#endif
|
|
|
|
|
#if ARENA_MODULE
|
2014-07-23 08:10:14 +02:00
|
|
|
|
register_arena();
|
2010-08-08 10:06:34 +02:00
|
|
|
|
#endif
|
2014-12-13 16:43:35 +01:00
|
|
|
|
wormholes_register();
|
2010-08-08 10:06:34 +02:00
|
|
|
|
|
2014-07-23 08:10:14 +02:00
|
|
|
|
register_itemtypes();
|
2014-06-10 04:04:11 +02:00
|
|
|
|
#ifdef USE_LIBXML2
|
2014-07-23 08:10:14 +02:00
|
|
|
|
register_xmlreader();
|
2014-06-10 04:04:11 +02:00
|
|
|
|
#endif
|
2014-07-23 08:10:14 +02:00
|
|
|
|
register_attributes();
|
|
|
|
|
register_gmcmd();
|
2010-08-08 10:06:34 +02:00
|
|
|
|
|
2014-12-13 17:31:55 +01:00
|
|
|
|
chaos_register();
|
2010-08-08 10:06:34 +02:00
|
|
|
|
}
|