Debian Codegraph @

mednafen/state.h

raw symbols SCIP
1 #cxx . . $ `<file>/mednafen/state.h`/ifndef _STATE_H
2 #define _STATE_Hcxx . . $ `mednafen/state.h:2:9`!
3
4 typedef structcxx . . $ $anonymous_type_8d6ca9fa7c8baca5_0#
5 {
6 uint8cxx . . $ uint8# *datacxx . . $ $anonymous_type_8d6ca9fa7c8baca5_0#data.;
7 uint32cxx . . $ uint32# loccxx . . $ $anonymous_type_8d6ca9fa7c8baca5_0#loc.;
8 uint32cxx . . $ uint32# lencxx . . $ $anonymous_type_8d6ca9fa7c8baca5_0#len.;
9 uint32cxx . . $ uint32# mallocedcxx . . $ $anonymous_type_8d6ca9fa7c8baca5_0#malloced.;
10 uint32cxx . . $ uint32# initial_malloccxx . . $ $anonymous_type_8d6ca9fa7c8baca5_0#initial_malloc.; // A setting!
11 } StateMemcxx . . $ StateMem#;
12
13 // Eh, we abuse the smem_* in-memory stream code
14 // in a few other places. :)
15 int32cxx . . $ int32# smem_readcxx . . $ smem_read(f3982eecb66031e).(StateMemcxx . . $ StateMem# *st, void *buffer, uint32cxx . . $ uint32# len);
16 int32cxx . . $ int32# smem_writecxx . . $ smem_write(f3982eecb66031e).(StateMemcxx . . $ StateMem# *st, void *buffer, uint32cxx . . $ uint32# len);
17 int32cxx . . $ int32# smem_putccxx . . $ smem_putc(453c298c0ba01c96).(StateMemcxx . . $ StateMem# *st, int value);
18 int32cxx . . $ int32# smem_tellcxx . . $ smem_tell(11cbcd7e5e652dd0).(StateMemcxx . . $ StateMem# *st);
19 int32cxx . . $ int32# smem_seekcxx . . $ smem_seek(bece8f0ac61bc7de).(StateMemcxx . . $ StateMem# *st, uint32cxx . . $ uint32# offset, int whence);
20 int smem_write32lecxx . . $ smem_write32le(776f7c4058af06c3).(StateMemcxx . . $ StateMem# *st, uint32cxx . . $ uint32# b);
21 int smem_read32lecxx . . $ smem_read32le(24a07498b85603a0).(StateMemcxx . . $ StateMem# *st, uint32cxx . . $ uint32# *b);
22
23 int MDFNSS_SaveSMcxx . . $ MDFNSS_SaveSM(d855d810c36bab0b).(void *st, int, int, const void*, const void*, const void*);
24 int MDFNSS_LoadSMcxx . . $ MDFNSS_LoadSM(4d015e8c0eefb98e).(void *st, int, int);
25
26 // Flag for a single, >= 1 byte native-endian variable
27 #define MDFNSTATE_RLSBcxx . . $ `mednafen/state.h:27:9`! 0x80000000
28
29 // 32-bit native-endian elements
30 #define MDFNSTATE_RLSB32cxx . . $ `mednafen/state.h:30:9`! 0x40000000
31
32 // 16-bit native-endian elements
33 #define MDFNSTATE_RLSB16cxx . . $ `mednafen/state.h:33:9`! 0x20000000
34
35 // 64-bit native-endian elements
36 #define MDFNSTATE_RLSB64cxx . . $ `mednafen/state.h:36:9`! 0x10000000
37
38 #define MDFNSTATE_BOOLcxx . . $ `mednafen/state.h:38:9`! 0x08000000
39
40 typedef structcxx . . $ $anonymous_type_8d6ca9fa7c8baca5_1# {
41 void *vcxx . . $ $anonymous_type_8d6ca9fa7c8baca5_1#v.; // Pointer to the variable/array
42 uint32cxx . . $ uint32# sizecxx . . $ $anonymous_type_8d6ca9fa7c8baca5_1#size.; // Length, in bytes, of the data to be saved EXCEPT:
43 // In the case of MDFNSTATE_BOOL, it is the number of bool elements to save(bool is not always 1-byte).
44 // If 0, the subchunk isn't saved.
45 uint32cxx . . $ uint32# flagscxx . . $ $anonymous_type_8d6ca9fa7c8baca5_1#flags.; // Flags
46 const char *namecxx . . $ $anonymous_type_8d6ca9fa7c8baca5_1#name.; // Name
47 //uint32 struct_size; // Only used for MDFNSTATE_ARRAYOFS, sizeof(struct) that members of the linked SFORMAT struct are in.
48 } SFORMATcxx . . $ SFORMAT#;
49
50 INLINEcxx . . $ `mednafen/mednafen-types.h:21:11`! bool SF_IS_BOOLcxx . . $ SF_IS_BOOL(78ac5d2f3d401626).(bool *) { return(1); }
51 INLINEcxx . . $ `mednafen/mednafen-types.h:21:11`! bool SF_IS_BOOLcxx . . $ SF_IS_BOOL(db00c6a08f501612).(void *) { return(0); }
52
53 INLINEcxx . . $ `mednafen/mednafen-types.h:21:11`! uint32cxx . . $ uint32# SF_FORCE_ABcxx . . $ SF_FORCE_AB(6eba86349545ae0f).(bool *) { return(0); }
54
55 INLINEcxx . . $ `mednafen/mednafen-types.h:21:11`! uint32cxx . . $ uint32# SF_FORCE_A8cxx . . $ SF_FORCE_A8(8e2aba6c81f7523f).(int8cxx . . $ int8# *) { return(0); }
56 INLINEcxx . . $ `mednafen/mednafen-types.h:21:11`! uint32cxx . . $ uint32# SF_FORCE_A8cxx . . $ SF_FORCE_A8(df34ef224e8b6259).(uint8cxx . . $ uint8# *) { return(0); }
57
58 INLINEcxx . . $ `mednafen/mednafen-types.h:21:11`! uint32cxx . . $ uint32# SF_FORCE_A16cxx . . $ SF_FORCE_A16(f7d2637fbc7b9f5a).(int16cxx . . $ int16# *) { return(0); }
59 INLINEcxx . . $ `mednafen/mednafen-types.h:21:11`! uint32cxx . . $ uint32# SF_FORCE_A16cxx . . $ SF_FORCE_A16(d7b7cfba645080ba).(uint16cxx . . $ uint16# *) { return(0); }
60
61 INLINEcxx . . $ `mednafen/mednafen-types.h:21:11`! uint32cxx . . $ uint32# SF_FORCE_A32cxx . . $ SF_FORCE_A32(2cbd27c171ff50a6).(int32cxx . . $ int32# *) { return(0); }
62 INLINEcxx . . $ `mednafen/mednafen-types.h:21:11`! uint32cxx . . $ uint32# SF_FORCE_A32cxx . . $ SF_FORCE_A32(c22c494133c14864).(uint32cxx . . $ uint32# *) { return(0); }
63
64 INLINEcxx . . $ `mednafen/mednafen-types.h:21:11`! uint32cxx . . $ uint32# SF_FORCE_A64cxx . . $ SF_FORCE_A64(8ddaaf15bbcb1).(int64cxx . . $ int64# *) { return(0); }
65 INLINEcxx . . $ `mednafen/mednafen-types.h:21:11`! uint32cxx . . $ uint32# SF_FORCE_A64cxx . . $ SF_FORCE_A64(d2b3013b0b510c55).(uint64cxx . . $ uint64# *) { return(0); }
66
67 INLINEcxx . . $ `mednafen/mednafen-types.h:21:11`! uint32cxx . . $ uint32# SF_FORCE_Dcxx . . $ SF_FORCE_D(a95f4eeda9715752).(double *) { return(0); }
68
69 #define SFVARNcxx . . $ `mednafen/state.h:69:9`!(x, n) { &(x), SF_IS_BOOL(&(x)) ? 1 : (uint32_t)sizeof(x), MDFNSTATE_RLSBcxx . . $ `mednafen/state.h:27:9`! | (SF_IS_BOOL(&(x)) ? MDFNSTATE_BOOLcxx . . $ `mednafen/state.h:38:9`! : 0), n }
70 #define SFVARcxx . . $ `mednafen/state.h:70:9`!(x) SFVARNcxx . . $ `mednafen/state.h:69:9`!((x), #x)
71
72 #define SFARRAYNcxx . . $ `mednafen/state.h:72:9`!(x, l, n) { (x), (uint32)(l), 0 | SF_FORCE_A8(x), n }
73 #define SFARRAYcxx . . $ `mednafen/state.h:73:9`!(x, l) SFARRAYNcxx . . $ `mednafen/state.h:72:9`!((x), (l), #x)
74
75 #define SFARRAYBNcxx . . $ `mednafen/state.h:75:9`!(x, l, n) { (x), (uint32)(l), MDFNSTATE_BOOL | SF_FORCE_AB(x), n }
76 #define SFARRAYBcxx . . $ `mednafen/state.h:76:9`!(x, l) SFARRAYBN((x), (l), #x)
77
78 #define SFARRAY16Ncxx . . $ `mednafen/state.h:78:9`!(x, l, n) { (x), (uint32)((l) * sizeof(uint16)), MDFNSTATE_RLSB16 | SF_FORCE_A16(x), n }
79 #define SFARRAY16cxx . . $ `mednafen/state.h:79:9`!(x, l) SFARRAY16N((x), (l), #x)
80
81 #define SFARRAY32Ncxx . . $ `mednafen/state.h:81:9`!(x, l, n) { (x), (uint32)((l) * sizeof(uint32)), MDFNSTATE_RLSB32 | SF_FORCE_A32(x), n }
82 #define SFARRAY32cxx . . $ `mednafen/state.h:82:9`!(x, l) SFARRAY32N((x), (l), #x)
83
84 #define SFARRAY64Ncxx . . $ `mednafen/state.h:84:9`!(x, l, n) { (x), (uint32)((l) * sizeof(uint64)), MDFNSTATE_RLSB64 | SF_FORCE_A64(x), n }
85 #define SFARRAY64cxx . . $ `mednafen/state.h:85:9`!(x, l) SFARRAY64N((x), (l), #x)
86
87 #if SIZEOF_DOUBLEcxx . . $ `<built-in>:489:9`! != 8
88 #error "sizeof(double) != 8"
89 #endif
90
91 #define SFARRAYDNcxx . . $ `mednafen/state.h:91:9`!(x, l, n) { (x), (uint32)((l) * 8), MDFNSTATE_RLSB64 | SF_FORCE_D(x), n }
92 #define SFARRAYDcxx . . $ `mednafen/state.h:92:9`!(x, l) SFARRAYDN((x), (l), #x)
93
94 #define SFENDcxx . . $ `mednafen/state.h:94:9`! { 0, 0, 0, 0 }
95
96 #include <vector>
97
98 // State-Section Descriptor
99 class SSDescriptorcxx . . $ SSDescriptor#
100 {
101 public:
102 SSDescriptorcxx . . $ SSDescriptor#SSDescriptor(3e11acb8200f8958).(SFORMATcxx . . $ SFORMAT# *n_sf, const char *n_name, bool n_optional = 0)
103 {
104 sfcxx . . $ SSDescriptor#sf. = n_sf;
105 namecxx . . $ SSDescriptor#name. = n_name;
106 optionalcxx . . $ SSDescriptor#optional. = n_optional;
107 }
108 ~cxx . . $ SSDescriptor#`~SSDescriptor`(ced63f7c635d850d).SSDescriptorcxx . . $ SSDescriptor#(void)
109 {
110
111 }
112
113 SFORMATcxx . . $ SFORMAT# *sfcxx . . $ SSDescriptor#sf.;
114 const char *namecxx . . $ SSDescriptor#name.;
115 bool optionalcxx . . $ SSDescriptor#optional.;
116 };
117
118 int MDFNSS_StateActioncxx . . $ MDFNSS_StateAction(eba9425d234c8c23).(void *st, int load, int data_only, stdcxx . . $ std/::vectorcxx . . $ std/vector# <SSDescriptorcxx . . $ SSDescriptor#> &sections);
119 int MDFNSS_StateActioncxx . . $ MDFNSS_StateAction(3f628545d3b0df83).(void *st, int load, int data_only, SFORMATcxx . . $ SFORMAT# *sf, const char *name, bool optional = 0);
120
121 #endif