forked from AZO234/NP2kai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
statsave.h
executable file
·64 lines (54 loc) · 1.26 KB
/
statsave.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
59
60
61
62
63
64
/**
* @file statsave.h
* @brief Interface of state save
*/
#pragma once
/**
* Result code
*/
enum
{
STATFLAG_SUCCESS = 0,
STATFLAG_DISKCHG = 0x0001,
STATFLAG_VERCHG = 0x0002,
STATFLAG_WARNING = 0x0080,
STATFLAG_VERSION = 0x0100,
STATFLAG_FAILURE = -1
};
struct TagStatFlagHandle;
typedef struct TagStatFlagHandle *STFLAGH;
/**
* @brief The entry of state flag
*/
struct TagStatFlagEntry
{
char index[12];
UINT16 ver;
UINT16 type;
void *arg1;
UINT arg2;
};
typedef struct TagStatFlagEntry SFENTRY;
#ifdef __cplusplus
extern "C"
{
#endif
extern uint8_t g_u8ControlState;
int statflag_read(STFLAGH sfh, void *ptr, UINT size);
int statflag_write(STFLAGH sfh, const void *ptr, UINT size);
void statflag_seterr(STFLAGH sfh, const OEMCHAR *str);
int statsave_save(const OEMCHAR *filename);
int statsave_check(const OEMCHAR *filename, OEMCHAR *buf, int size);
int statsave_load(const OEMCHAR *filename);
int statsave_save_hdd(const OEMCHAR *ext);
int statsave_load_hdd(const OEMCHAR *ext);
#if defined(__LIBRETRO__)
int statsave_save_d(const OEMCHAR *filename);
int statsave_load_d(const OEMCHAR *filename);
#else
int statsave_save_d(void);
int statsave_load_d(void);
#endif
#ifdef __cplusplus
}
#endif