Freeciv-3.2
Loading...
Searching...
No Matches
Data Structures | Functions | Variables
savemain.c File Reference
#include "log.h"
#include "mem.h"
#include "registry.h"
#include "ai.h"
#include "capability.h"
#include "game.h"
#include "console.h"
#include "notify.h"
#include "savegame2.h"
#include "savegame3.h"
#include "savemain.h"

Go to the source code of this file.

Data Structures

struct  save_thread_data
 

Functions

void savegame_load (struct section_file *sfile)
 
void savegame_save (struct section_file *sfile, const char *save_reason, bool scenario)
 
static void save_thread_data_free (struct save_thread_data *stdata)
 
static void save_thread_run (void *arg)
 
void save_game (const char *orig_filename, const char *save_reason, bool scenario)
 
void save_system_close (void)
 

Variables

static fc_threadsave_thread = NULL
 

Function Documentation

◆ save_game()

void save_game ( const char orig_filename,
const char save_reason,
bool  scenario 
)

Unconditionally save the game, with specified filename. Always prints a message: either save ok, or failed.

Definition at line 142 of file savemain.c.

Referenced by api_server_save(), handle_save_scenario(), save_command(), save_game_auto(), and scensave_command().

◆ save_system_close()

void save_system_close ( void  )

Close saving system.

Definition at line 328 of file savemain.c.

Referenced by server_quit(), and srv_main().

◆ save_thread_data_free()

static void save_thread_data_free ( struct save_thread_data stdata)
static

Free resources of save_thread_data, including itself

Definition at line 113 of file savemain.c.

Referenced by save_game(), and save_thread_run().

◆ save_thread_run()

static void save_thread_run ( void arg)
static

Run game saving thread.

Definition at line 122 of file savemain.c.

Referenced by save_game().

◆ savegame_load()

void savegame_load ( struct section_file sfile)

Main entry point for loading a game.

Definition at line 43 of file savemain.c.

Referenced by load_command().

◆ savegame_save()

void savegame_save ( struct section_file sfile,
const char save_reason,
bool  scenario 
)

Main entry point for saving a game.

Definition at line 96 of file savemain.c.

Referenced by save_game().

Variable Documentation

◆ save_thread

fc_thread* save_thread = NULL
static

Definition at line 38 of file savemain.c.

Referenced by save_game(), and save_system_close().