2012-06-07 04:29:36 +02:00
|
|
|
#include "bind_eressea.h"
|
|
|
|
|
|
|
|
#include <platform.h>
|
|
|
|
#include <kernel/types.h>
|
|
|
|
#include <kernel/config.h>
|
|
|
|
#include <kernel/save.h>
|
|
|
|
#include <util/storage.h>
|
|
|
|
|
|
|
|
void eressea_free_game(void) {
|
|
|
|
free_gamedata();
|
|
|
|
}
|
|
|
|
|
|
|
|
int eressea_read_game(const char * filename) {
|
|
|
|
return readgame(filename, IO_BINARY, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
int eressea_write_game(const char * filename) {
|
2012-06-07 18:47:02 +02:00
|
|
|
remove_empty_factions();
|
2012-06-07 04:29:36 +02:00
|
|
|
return writegame(filename, IO_BINARY);
|
|
|
|
}
|
2012-06-07 18:47:02 +02:00
|
|
|
|
|
|
|
int eressea_read_orders(const char * filename) {
|
|
|
|
return readorders(filename);
|
|
|
|
}
|