| 1 | #cxx . . $ `<file>/mednafen/mednafen-driver.h`/ifndef __MDFN_MEDNAFEN_DRIVER_H |
| 2 | #define __MDFN_MEDNAFEN_DRIVER_Hcxx . . $ `mednafen/mednafen-driver.h:2:9`! |
| 3 | |
| 4 | #include <stdio.h> |
| 5 | #include <vector> |
| 6 | #include <string> |
| 7 | |
| 8 | #include "settings-common.h"cxx . . $ `<file>/mednafen/settings-common.h`/ |
| 9 | |
| 10 | extern stdcxx . . $ std/::vectorcxx . . $ std/vector#<MDFNGIcxx . . $ MDFNGI# *>MDFNSystemscxx . . $ MDFNSystems.; |
| 11 | |
| 12 | /* Indent stdout newlines +- "indent" amount */ |
| 13 | void MDFN_indentcxx . . $ MDFN_indent(d4f767463ce0a6b3).(int indent); |
| 14 | void MDFN_printfcxx . . $ MDFN_printf(326aeb464d16410c).(const char *format, ...); |
| 15 | |
| 16 | #define MDFNI_printfcxx . . $ `mednafen/mednafen-driver.h:16:9`! MDFN_printf |
| 17 | |
| 18 | /* Displays an error. Can block or not. */ |
| 19 | void MDFND_PrintErrorcxx . . $ MDFND_PrintError(85c52e162fed56f9).(const char *s); |
| 20 | void MDFND_Messagecxx . . $ MDFND_Message(85c52e162fed56f9).(const char *s); |
| 21 | |
| 22 | uint32cxx . . $ uint32# MDFND_GetTimecxx . . $ MDFND_GetTime(db52760e79bf9054).(void); |
| 23 | void MDFND_Sleepcxx . . $ MDFND_Sleep(cb2f890c2fdad230).(uint32cxx . . $ 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 | |
| 33 | MDFN_Thread *MDFND_CreateThread(int (*fn)(void *), void *data); |
| 34 | void MDFND_WaitThread(MDFN_Thread *thread, int *status); |
| 35 | void MDFND_KillThread(MDFN_Thread *thread); |
| 36 | |
| 37 | MDFN_Mutex *MDFND_CreateMutex(void); |
| 38 | void MDFND_DestroyMutex(MDFN_Mutex *mutex); |
| 39 | int MDFND_LockMutex(MDFN_Mutex *mutex); |
| 40 | int MDFND_UnlockMutex(MDFN_Mutex *mutex); |
| 41 | |
| 42 | /* End threading support. */ |
| 43 | #endif |
| 44 | |
| 45 | /* path = path of game/file to load. returns NULL on failure. */ |
| 46 | MDFNGIcxx . . $ MDFNGI# *MDFNI_LoadGamecxx . . $ MDFNI_LoadGame(acefc047a690e6dc).(const char *force_module, const char *path); |
| 47 | |
| 48 | MDFNGIcxx . . $ MDFNGI# *MDFNI_LoadCDcxx . . $ MDFNI_LoadCD(acefc047a690e6dc).(const char *sysname, const char *devicename); |
| 49 | |
| 50 | // Call this function as early as possible, even before MDFNI_Initialize() |
| 51 | bool MDFNI_InitializeModulecxx . . $ MDFNI_InitializeModule(c9857a73d68e59ba).(void); |
| 52 | |
| 53 | /* allocates memory. 0 on failure, 1 on success. */ |
| 54 | /* Also pass it the base directory to load the configuration file. */ |
| 55 | int MDFNI_Initializecxx . . $ MDFNI_Initialize(5c4306d8553b3696).(const char *basedir); |
| 56 | |
| 57 | /* Sets the base directory(save states, snapshots, etc. are saved in directories |
| 58 | below this directory. */ |
| 59 | void MDFNI_SetBaseDirectorycxx . . $ MDFNI_SetBaseDirectory(85c52e162fed56f9).(const char *dir); |
| 60 | |
| 61 | /* Closes currently loaded game */ |
| 62 | void MDFNI_CloseGamecxx . . $ MDFNI_CloseGame(49f6e7a06ebc5aa8).(void); |
| 63 | |
| 64 | void MDFN_DispMessagecxx . . $ MDFN_DispMessage(326aeb464d16410c).(const char *format, ...); |
| 65 | #define MDFNI_DispMessagecxx . . $ `mednafen/mednafen-driver.h:65:9`! MDFN_DispMessage |
| 66 | |
| 67 | uint32cxx . . $ uint32# MDFNI_CRC32cxx . . $ MDFNI_CRC32(ade514a5a6baa708).(uint32cxx . . $ uint32# crc, uint8cxx . . $ uint8# *buf, uint32cxx . . $ uint32# len); |
| 68 | |
| 69 | // NES hackish function. Should abstract in the future. |
| 70 | int MDFNI_DatachSetcxx . . $ MDFNI_DatachSet(b84ccf4e0bb14b06).(const uint8cxx . . $ uint8# *rcode); |
| 71 | |
| 72 | void MDFNI_DumpModulesDefcxx . . $ MDFNI_DumpModulesDef(85c52e162fed56f9).(const char *fn); |
| 73 | |
| 74 | |
| 75 | #endif |