-
Notifications
You must be signed in to change notification settings - Fork 0
/
states.h
152 lines (133 loc) · 4.6 KB
/
states.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
/************************************************************************
* states.h
* Emulation states
*
************************************************************************
*
* Phoinix,
* Nintendo Gameboy(TM) emulator for the Palm OS(R) Computing Platform
*
* (c)2000-2007 Bodo Wenzel
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
************************************************************************
* History:
*
* $Log: states.h,v $
* Revision 1.14 2007/02/25 13:15:32 bodowenzel
* Show last state in Load State while emulating
*
* Revision 1.13 2007/02/11 17:14:44 bodowenzel
* Multiple saved state feature implemented
*
* Revision 1.12 2005/05/03 08:40:34 bodowenzel
* Adding states dirty flag for fewer error messages
*
* Revision 1.11 2005/04/03 14:08:34 bodowenzel
* Option to save the state for each game
*
* Revision 1.10 2005/02/17 19:42:35 bodowenzel
* Added pace control
*
* Revision 1.9 2005/01/30 19:35:27 bodowenzel
* Removed support for VFS mount and unmount
*
* Revision 1.8 2004/12/28 13:56:35 bodowenzel
* Split up all C-Code to multi-segmented
*
* Revision 1.7 2004/12/02 20:01:22 bodowenzel
* New configurable screen layout
*
* Revision 1.6 2004/06/06 09:25:01 bodowenzel
* Change game's location to RAM on error saving states
*
* Revision 1.5 2004/01/11 19:10:00 bodowenzel
* Correct names for constants
*
* Revision 1.4 2002/10/19 08:08:11 bodowenzel
* History cleanup, Javadoc-style header
*
* Revision 1.3 2002/05/10 15:17:39 bodowenzel
* Till's VFS contribution
*
* Revision 1.2 2001/12/30 18:47:11 bodowenzel
* CVS keyword Log was faulty
*
* Revision 1.1.1.1 2001/12/16 13:38:11 bodowenzel
* Import
*
************************************************************************
*/
#ifndef STATES_H
#define STATES_H
/* === Includes ======================================================= */
#include "sections.h"
#include "misc.h"
#include "prefs.h"
/* === Constants ====================================================== */
#define statesDbCardNo (0)
#define statesDbNameFormat "Phoinix-%08lX"
#define statesLastState (-2)
/* === Global variables =============================================== */
extern UInt8 *StatesCartridgeRamPtr;
extern Boolean StatesPrefsAndStatesDirty;
/* === Type definitions =============================================== */
extern PrefsEmulationOptionsType *StatesEmulationOptionsP;
extern PrefsButtonMappingType *StatesButtonMappingP;
extern PrefsScreenLayoutType *StatesScreenLayoutP;
/* === Function prototypes ============================================ */
Boolean StatesOpenPrefsAndStates(void)
STATES_SECTION;
Boolean StatesSetupPrefsAndStates(void)
STATES_SECTION;
#define StatesSetPrefsAndStatesDirty() do { \
StatesPrefsAndStatesDirty = true; \
} while (false)
Boolean StatesClosePrefsAndStates(void)
STATES_SECTION;
void StatesClosePrefsAndStatesWithShow(
void (*ErrorFunction)(MiscErrorType mainIndex,
MiscErrorType detailIndex,
const Char *parameter), Boolean keepLocation)
STATES_SECTION;
void StatesDeletePrefsAndStates(void)
STATES_SECTION;
void StatesSetupList(FormType *frmP, ListType *lstP, Int16 index)
STATES_SECTION;
void StatesDrawGoButton(FormType *frmP, ListType *lstP, UInt16 buttonId,
UInt16 labelId)
STATES_SECTION;
Boolean StatesAutostart(void)
STATES_SECTION;
Boolean StatesOpenCurrentState(void)
STATES_SECTION;
Boolean StatesCloseCurrentState(void)
STATES_SECTION;
void StatesResetCurrentState(void)
STATES_SECTION;
void StatesLoadCurrentState(void)
STATES_SECTION;
void StatesSaveCurrentState(void)
STATES_SECTION;
void StatesSaveCurrentStateAsCrashed(void)
STATES_SECTION;
Boolean StatesCreateStateFromCurrentState(void)
STATES_SECTION;
Boolean StatesCopyStateToCurrentState(Int16 index)
STATES_SECTION;
void StatesDeleteState(Int16 index)
STATES_SECTION;
/* === The end ======================================================== */
#endif