initialize game after loading config

This commit is contained in:
Enno Rehling 2017-02-11 17:38:39 +01:00
parent 6a612b3b2a
commit 2ee0e599b1
2 changed files with 4 additions and 0 deletions

View File

@ -7,3 +7,4 @@ if config.rules then
assert(0 == read_xml(confdir .. rules .. 'config.xml', confdir .. rules .. 'catalog.xml'), "could not load XML data, did you compile with LIBXML2 ?") assert(0 == read_xml(confdir .. rules .. 'config.xml', confdir .. rules .. 'catalog.xml'), "could not load XML data, did you compile with LIBXML2 ?")
assert(0 == eressea.config.read(rules .. 'config.json', confdir), "could not read JSON data") assert(0 == eressea.config.read(rules .. 'config.json', confdir), "could not read JSON data")
end end
eressea.game.reset()

View File

@ -9,6 +9,8 @@
#include <kernel/config.h> #include <kernel/config.h>
#include <kernel/save.h> #include <kernel/save.h>
#include <util/language.h>
#include <stream.h> #include <stream.h>
#include <filestream.h> #include <filestream.h>
@ -16,6 +18,7 @@
void eressea_free_game(void) { void eressea_free_game(void) {
free_gamedata(); free_gamedata();
init_resources(); init_resources();
init_locales();
} }
int eressea_read_game(const char * filename) { int eressea_read_game(const char * filename) {