Fix errors for msvc

Use less strict compiler flags instead of modifying source code

Add ugly defines so MSVC stops complaining about zero length arrays
This commit is contained in:
roeming
2026-01-18 18:11:54 -05:00
committed by Jeffrey Crowell
parent fcb2ab00e1
commit ef1e1e954c
105 changed files with 1871 additions and 1760 deletions
+5 -1
View File
@@ -6,9 +6,13 @@
#include "JSystem/JMath/JMath.h"
#ifndef __MWERKS__
#include <limits>
#ifdef _MSVC_LANG
#include <float.h>
#else
#include<limits>
#define FLT_EPSILON std::numeric_limits<float>::epsilon()
#endif
#endif
namespace JGeometry {
+7
View File
@@ -2,7 +2,14 @@
#define JORMCONTEXT_H
#include <dolphin/dolphin.h>
#ifdef _MSVC_LANG
#include <stdint.h>
#else
#include <stdint>
#endif
#include <global.h>
#include "JSystem/JHostIO/JORReflexible.h"
#include "JSystem/JSupport/JSUMemoryStream.h"
+5
View File
@@ -35,7 +35,12 @@ typedef struct str1_entry_t {
typedef struct str1_section_t {
/* 0x00 */ bmg_section_t header; // section header
#ifdef _MSVC_LANG
str1_entry_t* __get_entries() const { return (str1_entry_t*)(this + 1); }
__declspec(property(get = __get_entries)) str1_entry_t* entries;
#else
/* 0x08 */ str1_entry_t entries[0];
#endif
} str1_section_t;
#endif /* JMESSAGE_H */
@@ -18,6 +18,13 @@ public:
s32 write(const void*, s32);
void write(const char*);
#ifdef _MSVC_LANG
JSUOutputStream& operator<<(uintptr_t param_0) {
write(&param_0, sizeof(uintptr_t));
return *this;
}
#endif
JSUOutputStream& operator<<(u32 param_0) {
write(&param_0, sizeof(u32));
return *this;
+5
View File
@@ -52,7 +52,12 @@ struct ResFONT {
/* 0x1A */ u16 textureWidth;
/* 0x1C */ u16 textureHeight;
/* 0x1E */ u16 padding;
#ifdef _MSVC_LANG
u8* __get_data() const { return (u8*)(this + 1); }
__declspec(property(get = __get_data)) u8* data;
#else
/* 0x20 */ u8 data[];
#endif
};
/* 0x00 */ u64 magic;