#ifndef DRIVER2_H #define DRIVER2_H #include #include #include #include #include #include #include #include #include #ifdef PSX #include // for Nugget PsyQ which doesn't use DMPSX #else #include #endif #include #include #include #include #include #include "platform.h" #define USE_PC_FILESYSTEM (!defined(PSX)) // PC filesystem is prioritized over CD #define USE_CD_FILESYSTEM 1 // use always #ifdef PSX // TODO: Include PSX STUFF #define trap(code) #define printMsg printf #define printInfo printf #define printWarning printf #define printError printf #define LOAD_OVERLAY(filename, addr) Loadfile(filename, (char*)addr) #else #include #include #define printMsg PsyX_Log #define printInfo PsyX_Log_Info #define printWarning PsyX_Log_Warning #define printError PsyX_Log_Error #ifdef __EMSCRIPTEN__ #define trap(ode) {printError("EXCEPTION code: %x\n", ode);} #elif _MSC_VER >= 1400 #define trap(ode) {printError("EXCEPTION code: %x\n", ode); __debugbreak();} #elif defined(__GNUC__) #define trap(ode) {__asm__("int3");} #else #define trap(ode) {_asm int 0x03} #endif #define LOAD_OVERLAY(filename, addr) 1 #endif // PSX #define D_CHECK_ERROR(expr, message) if(expr){ printError("%s - %s\n", FUNCNAME, message); while (FrameCnt != 0x78654321) trap(0x400); } #include "reversing.h" #include "version.h" #include "dr2math.h" #include "dr2limits.h" #include "dr2types.h" #include "dr2locale.h" #endif // DRIVER2_H