jsonconf reads game rules outside of kernel, so move it out.

This commit is contained in:
Enno Rehling 2018-01-14 17:50:54 +01:00
parent 010ff35c4a
commit 0435c9ee8b
7 changed files with 29 additions and 31 deletions

View file

@ -100,6 +100,7 @@ set (ERESSEA_SRC
reports.c reports.c
teleport.c teleport.c
guard.c guard.c
jsonconf.c
prefix.c prefix.c
donations.c donations.c
eressea.c eressea.c
@ -212,6 +213,7 @@ set(TESTS_SRC
give.test.c give.test.c
guard.test.c guard.test.c
json.test.c json.test.c
jsonconf.test.c
keyword.test.c keyword.test.c
laws.test.c laws.test.c
lighthouse.test.c lighthouse.test.c

View file

@ -4,8 +4,15 @@
#include "bind_config.h" #include "bind_config.h"
#include "jsonconf.h"
#include <kernel/config.h> #include <kernel/config.h>
#include <kernel/jsonconf.h> #include <kernel/building.h>
#include <kernel/race.h>
#include <kernel/ship.h>
#include <kernel/spell.h>
#include <kernel/spellbook.h>
#include <kernel/terrain.h>
#include <util/log.h> #include <util/log.h>
#include <util/language.h> #include <util/language.h>
@ -20,13 +27,6 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include "kernel/building.h"
#include "kernel/race.h"
#include "kernel/ship.h"
#include "kernel/spell.h"
#include "kernel/spellbook.h"
#include "kernel/terrain.h"
void config_reset(void) { void config_reset(void) {
free_config(); free_config();
free_nrmesssages(); free_nrmesssages();

View file

@ -15,26 +15,17 @@ without prior permission by the authors of Eressea.
#include "jsonconf.h" #include "jsonconf.h"
/* kernel includes */ /* kernel includes */
#include "building.h" #include <kernel/building.h>
#include "direction.h" #include <kernel/equipment.h>
#include "keyword.h" #include <kernel/item.h>
#include "equipment.h" #include <kernel/messages.h>
#include "item.h" #include <kernel/race.h>
#include "messages.h" #include <kernel/region.h>
#include "race.h" #include <kernel/resources.h>
#include "region.h" #include <kernel/ship.h>
#include "resources.h" #include <kernel/terrain.h>
#include "ship.h" #include <kernel/spell.h>
#include "terrain.h" #include <kernel/spellbook.h>
#include "skill.h"
#include "spell.h"
#include "spellbook.h"
#include "calendar.h"
/* game modules */
#include "prefix.h"
#include "move.h"
#include "calendar.h"
/* util includes */ /* util includes */
#include <util/attrib.h> #include <util/attrib.h>
@ -48,6 +39,14 @@ without prior permission by the authors of Eressea.
#include <util/strings.h> #include <util/strings.h>
#include <util/xml.h> #include <util/xml.h>
/* game modules */
#include "calendar.h"
#include "direction.h"
#include "keyword.h"
#include "move.h"
#include "prefix.h"
#include "skill.h"
/* external libraries */ /* external libraries */
#include <cJSON.h> #include <cJSON.h>

View file

@ -32,7 +32,6 @@ spellbook.test.c
spell.test.c spell.test.c
# terrain.test.c # terrain.test.c
unit.test.c unit.test.c
jsonconf.test.c
# xmlreader.test.c # xmlreader.test.c
) )
@ -80,7 +79,6 @@ spell.c
terrain.c terrain.c
unit.c unit.c
xmlreader.c xmlreader.c
jsonconf.c
) )
SET(VERSION_SRC ${PROJECT_NAME}/version.c PARENT_SCOPE) SET(VERSION_SRC ${PROJECT_NAME}/version.c PARENT_SCOPE)

View file

@ -34,7 +34,6 @@ without prior permission by the authors of Eressea.
/* TODO: core code should not include these files: */ /* TODO: core code should not include these files: */
#include "alchemy.h" #include "alchemy.h"
#include "vortex.h"
#include <modules/score.h> #include <modules/score.h>
#include <attributes/attributes.h> #include <attributes/attributes.h>