Initial compile on linux

This commit is contained in:
Mr-Wiseguy
2023-10-23 15:03:05 -04:00
parent 5b594048db
commit 2865ef758e
11 changed files with 129 additions and 27 deletions
+2
View File
@@ -304,6 +304,8 @@ extern int32_t section_addresses[];
// ctx->r2 = setjmp(buf->storage->buffer); \
//}
void pause_self(uint8_t *rdram);
#ifdef __cplusplus
}
#endif
+5
View File
@@ -58,6 +58,11 @@ template<u32 bits> inline auto sclamp(s64 x) -> s64 {
return (x > m) ? m : (x < -b) ? -b : x;
}
template<u32 bits> inline auto sclip(s64 x) -> s64 {
enum : u64 { b = 1ull << (bits - 1), m = b * 2 - 1 };
return ((x & m) ^ b) - b;
}
struct RSP {
using r32 = uint32_t;
using cr32 = const r32;
+5
View File
@@ -45,9 +45,14 @@ typedef struct {
// const unsigned int* RDRAM_SIZE;
} GFX_INFO;
#ifdef _WIN32
#define DLLEXPORT extern "C" __declspec(dllexport)
#define DLLIMPORT extern "C" __declspec(dllimport)
#define CALL __cdecl
#else
#define DLLEXPORT extern "C" __attribute__((visibility("default")))
#define DLLIMPORT extern "C"
#endif
// Dynamic loading
//DLLEXPORT int (CALL *InitiateGFX)(GFX_INFO Gfx_Info) = nullptr;