server/src/eressea.c

87 lines
1.6 KiB
C
Raw Permalink Normal View History

2010-08-08 10:06:34 +02:00
#include <platform.h>
#include "eressea.h"
#include "kernel/building.h"
#include "kernel/calendar.h"
#include "kernel/database.h"
#include "kernel/config.h"
#include "kernel/curse.h"
#include "kernel/equipment.h"
#include "kernel/faction.h"
#include "kernel/item.h"
2010-08-08 10:06:34 +02: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
#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"
2018-01-15 18:11:43 +01:00
#include "items.h"
#include "creport.h"
#include "report.h"
#include "names.h"
#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>
#include <stdlib.h>
2018-02-23 21:24:15 +01:00
/* manually free() everything at exit? */
#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();
creport_cleanup();
report_cleanup();
calendar_cleanup();
free_functions();
free_config();
free_locales();
2018-05-18 21:44:03 +02:00
#endif
free_prefixes();
free_special_directions();
kernel_done();
swapdb_close();
2010-08-08 10:06:34 +02:00
}
void game_init(void)
2010-08-08 10:06:34 +02:00
{
swapdb_open();
2017-12-23 18:28:51 +01:00
errno = 0;
kernel_init();
register_triggers();
register_xmas();
2010-08-08 10:06:34 +02:00
register_nr();
2016-09-17 22:57:22 +02:00
register_cr();
2010-08-08 10:06:34 +02:00
register_races();
register_spells();
register_names();
register_resources();
register_itemfunctions();
register_museum();
wormholes_register();
2010-08-08 10:06:34 +02:00
2017-02-23 22:08:16 +01:00
register_weapons();
register_xerewards();
register_attributes();
register_gmcmd();
2010-08-08 10:06:34 +02:00
}