/
load.h
58 lines (46 loc) · 1.57 KB
/
load.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
* See Licensing and Copyright notice in naev.h
*/
#pragma once
/** @cond */
#include "physfs.h"
#include <stdint.h>
/** @endcond */
#include "ntime.h"
typedef enum SaveCompatibility_ {
SAVE_COMPATIBILITY_OK = 0,
SAVE_COMPATIBILITY_NAEV_VERSION,
SAVE_COMPATIBILITY_PLUGINS,
} SaveCompatibility;
/**
* @brief A naev save.
*/
typedef struct nsave_s {
char *save_name; /** Snapshot name. */
char *player_name; /**< Player name. */
char *path; /**< File path relative to PhysicsFS write directory. */
PHYSFS_sint64 modtime; /**< Last modified time. */
/* Naev info. */
char *version; /**< Naev version. */
char *data; /**< Data name. */
/* Plugins. */
char **plugins; /**< Plugins used in the game. */
SaveCompatibility compatible; /**< Compatibility status. */
/* Player info. */
char *spob; /**< Spob player is at. */
ntime_t date; /**< Date. */
uint64_t credits; /**< Credits player has. */
char *chapter; /**< Player's current chapter. */
char *difficulty; /**< Difficulty setting of the player. */
/* Ship info. */
char *shipname; /**< Name of the ship. */
char *shipmodel; /**< Model of the ship. */
int ret; /**< Used for threaded loading. */
} nsave_t;
void load_loadGameMenu( void );
void load_loadSnapshotMenu( const char *name, int disablesave );
int load_gameDiff( const char *file );
int load_gameFile( const char *file );
int load_refresh( void );
void load_free( void );
const nsave_t *load_getList( const char *name );