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>
|
2015-10-13 21:26:48 +02:00
|
|
|
|
#include <util/functions.h>
|
2010-08-08 10:06:34 +02:00
|
|
|
|
#include <kernel/building.h>
|
2016-09-07 20:46:41 +02:00
|
|
|
|
#include <kernel/curse.h>
|
|
|
|
|
#include <kernel/equipment.h>
|
|
|
|
|
#include <kernel/item.h>
|
|
|
|
|
#include <kernel/xmlreader.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>
|
2016-09-07 20:46:41 +02:00
|
|
|
|
#include <util/message.h>
|
2015-01-12 08:18:41 +01:00
|
|
|
|
#include <races/races.h>
|
2016-09-07 20:46:41 +02:00
|
|
|
|
|
2016-09-09 18:39:38 +02:00
|
|
|
|
#include "calendar.h"
|
2014-12-13 17:31:55 +01:00
|
|
|
|
#include "chaos.h"
|
2016-09-07 20:46:41 +02:00
|
|
|
|
#include "items.h"
|
2016-09-17 22:57:22 +02:00
|
|
|
|
#include "creport.h"
|
2016-09-16 18:03:28 +02:00
|
|
|
|
#include "report.h"
|
2014-08-27 06:40:18 +02:00
|
|
|
|
#include "names.h"
|
2016-09-07 20:46:41 +02:00
|
|
|
|
#include "reports.h"
|
2015-01-12 08:18:41 +01:00
|
|
|
|
#include "spells.h"
|
2016-09-07 20:46:41 +02:00
|
|
|
|
#include "wormhole.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
|
|
|
|
|
#endif
|
2016-09-09 18:39:38 +02:00
|
|
|
|
calendar_cleanup();
|
2015-10-13 21:26:48 +02:00
|
|
|
|
free_functions();
|
2016-08-18 20:07:16 +02:00
|
|
|
|
free_config();
|
|
|
|
|
free_locales();
|
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
|
|
|
|
|
2016-09-16 18:03:28 +02:00
|
|
|
|
register_nr();
|
2016-09-17 22:57:22 +02:00
|
|
|
|
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
|
|
|
|
}
|