Debian Codegraph @

mednafen/mednafen-driver.h

raw symbols SCIP
1 #ifndef __MDFN_MEDNAFEN_DRIVER_H
2 #define __MDFN_MEDNAFEN_DRIVER_H
3
4 #include <stdio.h>
5 #include <vector>
6 #include <string>
7
8 #include "settings-common.h"
9
10 extern std::vector<MDFNGI *>MDFNSystems;
11
12 /* Indent stdout newlines +- "indent" amount */
13 void MDFN_indent(int indent);
14 void MDFN_printf(const char *format, ...);
15
16 #define MDFNI_printf MDFN_printf
17
18 /* Displays an error. Can block or not. */
19 void MDFND_PrintError(const char *s);
20 void MDFND_Message(const char *s);
21
22 uint32 MDFND_GetTime(void);
23 void MDFND_Sleep(uint32 ms);
24
25 #ifdef WANT_THREADING
26 /* Being threading support. */
27 // Mostly based off SDL's prototypes and semantics.
28 // Driver code should actually define MDFN_Thread and MDFN_Mutex.
29
30 struct MDFN_Thread;
31 struct MDFN_Mutex;
32 struct MDFN_Cond;
33
34 MDFN_Thread *MDFND_CreateThread(int (*fn)(void *), void *data);
35 void MDFND_WaitThread(MDFN_Thread *thread, int *status);
36 void MDFND_KillThread(MDFN_Thread *thread);
37
38 MDFN_Mutex *MDFND_CreateMutex(void);
39 MDFN_Cond *MDFND_CreateCond(void);
40 void MDFND_DestroyCond(MDFN_Cond *cond);
41 void MDFND_DestroyMutex(MDFN_Mutex *mutex);
42 int MDFND_WaitCond(MDFN_Cond *cond, MDFN_Mutex *mutex);
43 int MDFND_SignalCond(MDFN_Cond *cond);
44 int MDFND_LockMutex(MDFN_Mutex *mutex);
45 int MDFND_UnlockMutex(MDFN_Mutex *mutex);
46
47 /* End threading support. */
48 #endif
49
50 /* path = path of game/file to load. returns NULL on failure. */
51 MDFNGI *MDFNI_LoadGame(const char *force_module, const char *path);
52
53 MDFNGI *MDFNI_LoadCD(const char *sysname, const char *devicename);
54
55 /* Sets the base directory(save states, snapshots, etc. are saved in directories
56 below this directory. */
57 void MDFNI_SetBaseDirectory(const char *dir);
58
59 void MDFN_DispMessage(const char *format, ...);
60 #define MDFNI_DispMessage MDFN_DispMessage
61
62 uint32 MDFNI_CRC32(uint32 crc, uint8 *buf, uint32 len);
63
64 // NES hackish function. Should abstract in the future.
65 int MDFNI_DatachSet(const uint8 *rcode);
66
67 void MDFNI_DumpModulesDef(const char *fn);
68
69
70 #endif