mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-24 06:50:43 -04:00
Merge branch 'main' into 26-02-25-more-endian-fixes
This commit is contained in:
@@ -10,7 +10,7 @@ namespace JGadget {
|
||||
namespace search {
|
||||
template <typename T>
|
||||
struct TExpandStride_ {
|
||||
#ifdef _MSC_VER
|
||||
#ifdef TARGET_PC
|
||||
static T get(T n) { return n << 3; }
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#ifdef _MSVC_LANG
|
||||
#include <stdint.h>
|
||||
#else
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include <global.h>
|
||||
|
||||
@@ -55,7 +55,7 @@ struct data {
|
||||
char* get() const { return (char*)getRaw(); }
|
||||
u8 get_formSupplement() const { return *(u8*)(get() + 0xB); }
|
||||
int get_number() const { return *(u16*)(get() + 0x8); }
|
||||
u32* getContent() const { return (u32*)((u32)getRaw() + 0x10); }
|
||||
u32* getContent() const { return (u32*)((uintptr_t)getRaw() + 0x10); }
|
||||
u32 get_form() const { return *(u8*)(get() + 0xA) & 0xF; }
|
||||
bool get_isOrdered() const { return *(u8*)(get() + 0xA) & 0xF0; }
|
||||
};
|
||||
|
||||
@@ -173,7 +173,7 @@ private:
|
||||
class TFunctionValue_composite : public TFunctionValue, public TFunctionValueAttribute_refer {
|
||||
public:
|
||||
struct TData {
|
||||
TData(void* data) : u32data((u32)data) {}
|
||||
TData(void* data) : u32data((uintptr_t)data) {}
|
||||
TData(const void* data) : rawData(data) {}
|
||||
TData(u32 data) : u32data(data) {}
|
||||
TData(f32 data) : f32data(data) {}
|
||||
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
const void* getSequence() const { return pSequence; }
|
||||
void setSequence_(const void* arg1) { pSequence = arg1; }
|
||||
const void* getSequence_offset(s32 i_no) const {
|
||||
int s32Val = (s32)getSequence();
|
||||
int s32Val = (intptr_t)getSequence();
|
||||
return (const void*)(s32Val + i_no);
|
||||
}
|
||||
const void* getSequence_next() const { return pSequence_next; }
|
||||
|
||||
@@ -18,7 +18,7 @@ public:
|
||||
s32 write(const void*, s32);
|
||||
void write(const char*);
|
||||
|
||||
#if defined(_MSVC_LANG) && defined(_WIN64)
|
||||
#ifdef TARGET_PC
|
||||
JSUOutputStream& operator<<(uintptr_t param_0) {
|
||||
write(¶m_0, sizeof(uintptr_t));
|
||||
return *this;
|
||||
|
||||
@@ -241,8 +241,8 @@ extern u8 __OSReport_Warning_disable;
|
||||
extern u8 __OSReport_System_disable;
|
||||
extern u8 __OSReport_enable;
|
||||
|
||||
#define OSRoundUp32B(x) (((u32)(x) + 32 - 1) & ~(32 - 1))
|
||||
#define OSRoundDown32B(x) (((u32)(x)) & ~(32 - 1))
|
||||
#define OSRoundUp32B(x) (((uintptr_t)(x) + 32 - 1) & ~(32 - 1))
|
||||
#define OSRoundDown32B(x) (((uintptr_t)(x)) & ~(32 - 1))
|
||||
|
||||
#ifdef TARGET_PC
|
||||
|
||||
|
||||
+1
-1
@@ -163,7 +163,7 @@ static const float INF = 2000000000.0f;
|
||||
#define UNSET_FLAG(var, flag, type) (var) &= ~(flag)
|
||||
#endif
|
||||
|
||||
#ifdef _MSVC_LANG
|
||||
#ifdef TARGET_PC
|
||||
template <int N>
|
||||
inline constexpr auto MultiCharLiteral(const char (&buf)[N]) {
|
||||
// static_assert(buf[0] == '\'' && buf[N - 2] == '\''); // can't constexpr strings, just pray
|
||||
|
||||
Reference in New Issue
Block a user