Debian Codegraph @

mednafen/file.h

raw symbols SCIP
1 #cxx . . $ `<file>/mednafen/file.h`/ifndef MDFN_FILE_H
2 #define MDFN_FILE_Hcxx . . $ `mednafen/file.h:2:9`!
3
4 #include <string>
5
6 #include <boolean.h>cxx . . $ `<file>/boolean.h`/
7
8 #define MDFNFILE_EC_NOTFOUNDcxx . . $ `mednafen/file.h:8:9`! 1
9 #define MDFNFILE_EC_OTHERcxx . . $ `mednafen/file.h:9:9`! 2
10
11 class MDFNFILEcxx . . $ MDFNFILE#
12 {
13 public:
14
15 MDFNFILEcxx . . $ MDFNFILE#MDFNFILE(49f6e7a06ebc5aa8).();
16 // WIP constructors:
17 MDFNFILEcxx . . $ MDFNFILE#MDFNFILE(9c85eaa12893977b).(const char *path, const void *known_ext, const char *purpose = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
18
19 ~cxx . . $ MDFNFILE#`~MDFNFILE`(49f6e7a06ebc5aa8).MDFNFILEcxx . . $ MDFNFILE#();
20
21 bool Opencxx . . $ MDFNFILE#Open(eb4f300025480a43).(const char *path, const void *known_ext, const char *purpose = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, const bool suppress_notfound_pe = false);
22 INLINEcxx . . $ `mednafen/mednafen-types.h:21:11`! bool Opencxx . . $ MDFNFILE#Open(5acc14a28fc1f16c).(const stdcxx . . $ std/::stringcxx . . $ std/string# &path, const void *known_ext, const char *purpose = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, const bool suppress_notfound_pe = false)
23 {
24 return(Opencxx . . $ MDFNFILE#Open(eb4f300025480a43).(path.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).(), known_ext, purpose, suppress_notfound_pe));
25 }
26
27 bool Closecxx . . $ MDFNFILE#Close(c9857a73d68e59ba).(void);
28
29 uint64cxx . . $ uint64# freadcxx . . $ MDFNFILE#fread(e2eaf0fd878a292f).(void *ptr, size_t size, size_t nmemb);
30 int fseekcxx . . $ MDFNFILE#fseek(4a3ed3c01b538bac).(int64cxx . . $ int64# offset, int whence);
31
32 inline uint64cxx . . $ uint64# ftellcxx . . $ MDFNFILE#ftell(f708dce9a8856c70).(void)
33 {
34 return(locationcxx . . $ MDFNFILE#location.);
35 }
36
37 inline void rewindcxx . . $ MDFNFILE#rewind(49f6e7a06ebc5aa8).(void)
38 {
39 locationcxx . . $ MDFNFILE#location. = 0;
40 }
41
42 int read32lecxx . . $ MDFNFILE#read32le(4ebf403dd87dd80).(uint32cxx . . $ uint32# *Bufo);
43 int read16lecxx . . $ MDFNFILE#read16le(910e03eb156beb90).(uint16cxx . . $ uint16# *Bufo);
44
45 inline int _fgetccxx . . $ MDFNFILE#_fgetc(b126dc7c1de90089).(void)
46 {
47 if(locationcxx . . $ MDFNFILE#location. < f_sizecxx . . $ MDFNFILE#f_size.)
48 return f_datacxx . . $ MDFNFILE#f_data.[locationcxx . . $ MDFNFILE#location.++];
49
50 return EOFcxx . . $ `<external>/232824719582829767/stdio.h:105:9`!;
51 }
52
53 inline int fisarchivecxx . . $ MDFNFILE#fisarchive(b126dc7c1de90089).(void)
54 {
55 return(0);
56 }
57
58 uint8cxx . . $ uint8# *f_datacxx . . $ MDFNFILE#f_data.;
59 int64cxx . . $ int64# f_sizecxx . . $ MDFNFILE#f_size.;
60 char *f_extcxx . . $ MDFNFILE#f_ext.;
61
62 private:
63
64 int64cxx . . $ int64# locationcxx . . $ MDFNFILE#location.;
65
66 bool MakeMemWrapAndClosecxx . . $ MDFNFILE#MakeMemWrapAndClose(db00c6a08f501612).(void *tz);
67 };
68
69 class PtrLengthPaircxx . . $ PtrLengthPair#
70 {
71 public:
72
73 inline PtrLengthPaircxx . . $ PtrLengthPair#PtrLengthPair(8c7266571c1d65cc).(const void *new_data, const uint64cxx . . $ uint64# new_length)
74 {
75 datacxx . . $ PtrLengthPair#data. = new_data;
76 lengthcxx . . $ PtrLengthPair#length. = new_length;
77 }
78
79 ~cxx . . $ PtrLengthPair#`~PtrLengthPair`(ced63f7c635d850d).PtrLengthPaircxx . . $ PtrLengthPair#()
80 {
81
82 }
83
84 INLINEcxx . . $ `mednafen/mednafen-types.h:21:11`! const void *GetDatacxx . . $ PtrLengthPair#GetData(3a8ef3fdc6e817ef).(void) const
85 {
86 return(datacxx . . $ PtrLengthPair#data.);
87 }
88
89 INLINEcxx . . $ `mednafen/mednafen-types.h:21:11`! uint64cxx . . $ uint64# GetLengthcxx . . $ PtrLengthPair#GetLength(fe4d2d262d4164a8).(void) const
90 {
91 return(lengthcxx . . $ PtrLengthPair#length.);
92 }
93
94 private:
95 const void *datacxx . . $ PtrLengthPair#data.;
96 uint64cxx . . $ uint64# lengthcxx . . $ PtrLengthPair#length.;
97 };
98
99 #include <vector>
100
101 // These functions should be used for data like save states and non-volatile backup memory.
102 // Until(if, even) we add LoadFromFile functions, for reading the files these functions generate, just use gzopen(), gzread(), etc.
103 // "compress" is set to the zlib compression level. 0 disables compression entirely, and dumps the file without a gzip header or footer.
104 // (Note: There is a setting that will force compress to 0 in the internal DumpToFile logic, for hackers who don't want to ungzip save files.)
105
106 bool MDFN_DumpToFilecxx . . $ MDFN_DumpToFile(aa08695a99e98aac).(const char *filename, int compress, const void *data, const uint64cxx . . $ uint64# length);
107
108 #endif