1 // Header for SDL 1.2 & SDL2 2 #include <SDL.h> 3 4 #ifdef BUILD_SDL2 5 #include "sdl2_gui.h" 6 #include "sdl2_inprint.h" 7 #endif 8 9 // defines to override various #ifndef _WIN32 10 #ifndef _WIN32 11 typedef struct tagRECT 12 { 13 int left; 14 int top; 15 int right; 16 int bottom; 17 } RECT, * PRECT, * LPRECT; 18 typedef const RECT* LPCRECT; 19 #else 20 #include <windows.h> 21 #endif 22 23 typedef unsigned long DWORD; 24 typedef unsigned char BYTE; 25 26 #ifndef MAX_PATH 27 #define MAX_PATH 511 28 #endif 29 30 #ifndef __cdecl 31 #define __cdecl 32 #endif 33 34 //main.cpp 35 int SetBurnHighCol(int nDepth); 36 37 extern int nAppVirtualFps; 38 extern bool bRunPause; 39 extern bool bAppDoFast; // TODO: bad 40 extern char fpsstring[20]; // TODO: also bad 41 extern bool bAppShowFPS; // TODO: Also also bad 42 extern bool bAlwaysProcessKeyboardInput; 43 extern TCHAR szAppBurnVer[16]; 44 extern bool bAppFullscreen; 45 extern bool bIntegerScale; 46 extern bool bAlwaysMenu; 47 extern int nGameSelect; 48 extern int nFilterSelect; 49 extern bool bShowAvailableOnly; 50 extern bool bShowClones; 51 extern int gameSelectedFromFilter; 52 53 #ifdef BUILD_SDL2 54 extern SDL_Window* sdlWindow; 55 #endif 56 extern TCHAR* GetIsoPath(); 57 58 TCHAR* ANSIToTCHAR(const char* pszInString, TCHAR* pszOutString, int nOutSize); 59 char* TCHARToANSI(const TCHAR* pszInString, char* pszOutString, int nOutSize); 60 61 #define _TtoA(a) TCHARToANSI(a, NULL, 0) 62 #define _AtoT(a) ANSIToTCHAR(a, NULL, 0) 63 64 65 bool AppProcessKeyboardInput(); 66 67 //config.cpp 68 int ConfigAppLoad(); 69 int ConfigAppSave(); 70 71 // drv.cpp 72 extern int bDrvOkay; // 1 if the Driver has been initted okay, and it's okay to use the BurnDrv functions 73 extern char szAppRomPaths[DIRS_MAX][MAX_PATH]; 74 int DrvInit(int nDrvNum, bool bRestore); 75 int DrvInitCallback(); // Used when Burn library needs to load a game. DrvInit(nBurnSelect, false) 76 int DrvExit(); 77 int ProgressUpdateBurner(double dProgress, const TCHAR* pszText, bool bAbs); 78 int AppError(TCHAR* szText, int bWarning); 79 80 //run.cpp 81 extern int RunMessageLoop(); 82 extern int RunReset(); 83 84 #define MESSAGE_MAX_FRAMES 180 // assuming 60fps this would be 3 seconds... 85 #define MESSAGE_MAX_LENGTH 255 86 87 extern UINT32 messageFrames; 88 extern char lastMessage[MESSAGE_MAX_LENGTH]; 89 90 void UpdateMessage(char* message); 91 int StatedAuto(int bSave); 92 93 // media.cpp 94 int MediaInit(); 95 int MediaExit(); 96 97 //inpdipsw.cpp 98 void InpDIPSWResetDIPs(); 99 100 //interface/inp_interface.cpp 101 int InputInit(); 102 int InputExit(); 103 int InputMake(bool bCopy); 104 105 // stated.cpp 106 int QuickState(int bSave); 107 extern int bDrvSaveAll; 108 109 //stringset.cpp 110 class StringSet { 111 public: 112 TCHAR* szText; 113 int nLen; 114 // printf function to add text to the Bzip string 115 int __cdecl Add(TCHAR* szFormat, ...); 116 int Reset(); 117 118 StringSet(); 119 ~StringSet(); 120 }; 121 122 // support_paths.cpp 123 extern TCHAR szAppPreviewsPath[MAX_PATH]; 124 extern TCHAR szAppTitlesPath[MAX_PATH]; 125 extern TCHAR szAppSelectPath[MAX_PATH]; 126 extern TCHAR szAppVersusPath[MAX_PATH]; 127 extern TCHAR szAppHowtoPath[MAX_PATH]; 128 extern TCHAR szAppScoresPath[MAX_PATH]; 129 extern TCHAR szAppBossesPath[MAX_PATH]; 130 extern TCHAR szAppGameoverPath[MAX_PATH]; 131 extern TCHAR szAppFlyersPath[MAX_PATH]; 132 extern TCHAR szAppMarqueesPath[MAX_PATH]; 133 extern TCHAR szAppControlsPath[MAX_PATH]; 134 extern TCHAR szAppCabinetsPath[MAX_PATH]; 135 extern TCHAR szAppPCBsPath[MAX_PATH]; 136 extern TCHAR szAppCheatsPath[MAX_PATH]; 137 extern TCHAR szAppHistoryPath[MAX_PATH]; 138 extern TCHAR szAppListsPath[MAX_PATH]; 139 extern TCHAR szAppDatListsPath[MAX_PATH]; 140 extern TCHAR szAppIpsPath[MAX_PATH]; 141 extern TCHAR szAppIconsPath[MAX_PATH]; 142 extern TCHAR szAppArchivesPath[MAX_PATH]; 143