2010-08-08 10:06:34 +02:00
|
|
|
#include <platform.h>
|
|
|
|
#include "eressea.h"
|
|
|
|
|
2018-09-28 20:50:24 +02:00
|
|
|
#include "kernel/building.h"
|
2018-02-14 20:00:48 +01:00
|
|
|
#include "kernel/calendar.h"
|
2018-10-23 22:31:42 +02:00
|
|
|
#include "kernel/database.h"
|
2018-02-14 20:00:48 +01:00
|
|
|
#include "kernel/config.h"
|
|
|
|
#include "kernel/curse.h"
|
|
|
|
#include "kernel/equipment.h"
|
2018-09-28 20:50:24 +02:00
|
|
|
#include "kernel/faction.h"
|
2018-02-14 20:00:48 +01:00
|
|
|
#include "kernel/item.h"
|
2010-08-08 10:06:34 +02:00
|
|
|
|
2018-02-14 20:00:48 +01:00
|
|
|
#include "util/functions.h"
|
|
|
|
#include "util/language.h"
|
|
|
|
#include "util/log.h"
|
|
|
|
#include "util/message.h"
|
2017-02-23 22:08:16 +01:00
|
|
|
|
2018-02-14 20:00:48 +01:00
|
|
|
#include "modules/gmcmd.h"
|
|
|
|
#include "modules/xmas.h"
|
|
|
|
#include "modules/museum.h"
|
|
|
|
#include "triggers/triggers.h"
|
|
|
|
#include "items/xerewards.h"
|
|
|
|
#include "items/weapons.h"
|
|
|
|
#include "attributes/attributes.h"
|
|
|
|
#include "races/races.h"
|
2016-09-07 20:46:41 +02:00
|
|
|
|
2018-01-15 18:11:43 +01:00
|
|
|
#include "items.h"
|
|
|
|
#include "creport.h"
|
|
|
|
#include "report.h"
|
|
|
|
#include "names.h"
|
2018-12-02 05:04:49 +01:00
|
|
|
#include "prefix.h"
|
2018-01-15 18:11:43 +01:00
|
|
|
#include "reports.h"
|
|
|
|
#include "spells.h"
|
|
|
|
#include "vortex.h"
|
|
|
|
#include "wormhole.h"
|
|
|
|
|
2017-12-23 18:28:51 +01:00
|
|
|
#include <errno.h>
|
2017-10-14 08:43:01 +02:00
|
|
|
#include <stdlib.h>
|
|
|
|
|
2018-02-23 21:24:15 +01:00
|
|
|
/* manually free() everything at exit? */
|
2017-12-09 21:06:44 +01:00
|
|
|
#undef CLEANUP_CODE
|
2010-08-08 10:06:34 +02:00
|
|
|
|
2018-02-23 21:24:15 +01:00
|
|
|
void game_done(void)
|
|
|
|
{
|
|
|
|
log_dead_factions();
|
2010-08-08 10:06:34 +02:00
|
|
|
|
2018-02-23 21:24:15 +01:00
|
|
|
#ifdef CLEANUP_CODE
|
|
|
|
free_gamedata();
|
2014-07-23 08:10:14 +02:00
|
|
|
creport_cleanup();
|
|
|
|
report_cleanup();
|
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();
|
2018-05-18 21:44:03 +02:00
|
|
|
#endif
|
2018-12-02 05:04:49 +01:00
|
|
|
free_prefixes();
|
|
|
|
free_special_directions();
|
2014-07-23 08:10:14 +02:00
|
|
|
kernel_done();
|
2018-10-23 22:31:42 +02:00
|
|
|
swapdb_close();
|
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
|
|
|
{
|
2018-10-23 22:31:42 +02:00
|
|
|
swapdb_open();
|
2017-12-23 18:28:51 +01:00
|
|
|
errno = 0;
|
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_itemfunctions();
|
|
|
|
register_museum();
|
2014-12-13 16:43:35 +01:00
|
|
|
wormholes_register();
|
2010-08-08 10:06:34 +02:00
|
|
|
|
2017-02-23 22:08:16 +01:00
|
|
|
register_weapons();
|
|
|
|
register_xerewards();
|
2014-07-23 08:10:14 +02:00
|
|
|
register_attributes();
|
|
|
|
register_gmcmd();
|
2010-08-08 10:06:34 +02:00
|
|
|
|
|
|
|
}
|