mirror of
https://github.com/Zelda64Recomp/Zelda64Recomp
synced 2026-08-19 14:03:50 -04:00
Initial compile on linux
This commit is contained in:
@@ -304,6 +304,8 @@ extern int32_t section_addresses[];
|
||||
// ctx->r2 = setjmp(buf->storage->buffer); \
|
||||
//}
|
||||
|
||||
void pause_self(uint8_t *rdram);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user