mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-10 18:46:45 -04:00
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:
@@ -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 {
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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(¶m_0, sizeof(uintptr_t));
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
JSUOutputStream& operator<<(u32 param_0) {
|
||||
write(¶m_0, sizeof(u32));
|
||||
return *this;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user