Fixed windows compilation, finally

This commit is contained in:
KiritoDv 2025-03-11 02:24:39 -06:00
parent ab6eabacca
commit 914cdfc50b
6 changed files with 36 additions and 4 deletions

View file

@ -261,6 +261,10 @@ FetchContent_Declare(
FetchContent_MakeAvailable(sol2)
target_link_libraries(${PROJECT_NAME} PRIVATE lua::lua sol2)
if (MSVC AND CMAKE_SYSTEM_NAME STREQUAL "Windows")
set_target_properties(liblua PROPERTIES MSVC_RUNTIME_LIBRARY ${MSVC_RUNTIME_LIBRARY_STR})
endif()
#==============================================================================#
# Libultraship Integration #
#==============================================================================#

View file

@ -3,6 +3,10 @@
#include "gfx.h"
#ifdef __cplusplus
extern "C" {
#endif
extern u64 gDramStack[];
extern u8 gOSYieldData[];
extern FrameBuffer gZBuffer; // z buffer
@ -12,4 +16,8 @@ extern u16 gTextureRenderBuffer[];
extern u16 gFillBuffer[];
extern FrameBuffer gFrameBuffers[]; // 8038F800
#ifdef __cplusplus
}
#endif
#endif

View file

@ -236,10 +236,6 @@ void RCP_SetupDL_44(void);
void RCP_SetupDL_50(void);
void RCP_SetupDL_61(s32 r, s32 g, s32 b, s32 a, s32 near, s32 far);
#ifdef __cplusplus
}
#endif
typedef enum SetupDL {
/* 0x00 */ SETUPDL_0,
/* 0x01 */ SETUPDL_1,
@ -347,4 +343,8 @@ extern Gfx gRcpSetupDLs[][9]; // 0x800D31B0
extern u8 D_80178580[];
extern void* D_80178710;
#ifdef __cplusplus
}
#endif
#endif

View file

@ -6,6 +6,10 @@
#include "sf64object.h"
#include "sf64player.h"
#ifdef __cplusplus
extern "C" {
#endif
extern s32 gSceneId;
extern s32 gSceneSetup;
extern s32 gClearPlayerInfo;
@ -349,5 +353,8 @@ extern UNK_TYPE F_8017833C;
extern UNK_TYPE F_80178344;
extern UNK_TYPE F_8017834C;
#ifdef __cplusplus
}
#endif
#endif

View file

@ -6,6 +6,10 @@
#include "sf64object.h"
#include "sf64player.h"
#ifdef __cplusplus
extern "C" {
#endif
// fox_360
extern s32 gAllRangeSpawnEvent;
@ -204,6 +208,10 @@ extern Gfx D_Gfx_800D94D0[];
// extern OSTime osClockRate;
#ifdef __cplusplus
}
#endif
#define osViClock 0x02E6D354;
#endif // VARIABLES_H

View file

@ -22,9 +22,14 @@ typedef void (*EventCallback)(IEvent*);
#define DECLARE_EVENT(eventName) \
EventID eventName##ID = -1;
#else
#ifdef __cplusplus
#define DECLARE_EVENT(eventName) \
extern "C" EventID eventName##ID;
#else
#define DECLARE_EVENT(eventName) \
extern EventID eventName##ID;
#endif
#endif
#define DEFINE_EVENT(eventName, ...) \
typedef struct { \