mirror of
https://github.com/zeldaret/tww.git
synced 2026-07-09 22:11:35 -04:00
Merge pull request #548 from Jcw87/other_compilers
Improve compatibility with other compilers
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "dolphin/mtx/mtx.h"
|
||||
#include "dolphin/mtx/mtx44.h"
|
||||
#include "dolphin/mtx/vec.h"
|
||||
#include "global.h"
|
||||
|
||||
class J3DLightInfo {
|
||||
public:
|
||||
@@ -144,7 +145,7 @@ struct J3DIndTexOrderInfo {
|
||||
};
|
||||
|
||||
struct J3DTevSwapModeInfo {
|
||||
/* 0x0 */ u8 field_0x0 __attribute__((aligned(4)));
|
||||
/* 0x0 */ u8 field_0x0 ALIGN_DECL(4);
|
||||
/* 0x1 */ u8 field_0x1;
|
||||
};
|
||||
|
||||
@@ -179,7 +180,7 @@ struct J3DTevStageInfo {
|
||||
};
|
||||
|
||||
struct J3DIndTevStageInfo {
|
||||
/* 0x0 */ u8 mIndStage __attribute__((aligned(4)));
|
||||
/* 0x0 */ u8 mIndStage ALIGN_DECL(4);
|
||||
/* 0x1 */ u8 mIndFormat;
|
||||
/* 0x2 */ u8 mBiasSel;
|
||||
/* 0x3 */ u8 mMtxSel;
|
||||
@@ -191,7 +192,7 @@ struct J3DIndTevStageInfo {
|
||||
};
|
||||
|
||||
struct J3DTexCoordInfo {
|
||||
/* 0x0 */ u8 mTexGenType __attribute__((aligned(4)));
|
||||
/* 0x0 */ u8 mTexGenType ALIGN_DECL(4);
|
||||
/* 0x1 */ u8 mTexGenSrc;
|
||||
/* 0x2 */ u8 mTexGenMtx;
|
||||
};
|
||||
@@ -216,7 +217,7 @@ struct J3DBlendInfo {
|
||||
};
|
||||
|
||||
struct J3DTevOrderInfo {
|
||||
/* 0x0 */ u8 mTexCoord __attribute__((aligned(2)));
|
||||
/* 0x0 */ u8 mTexCoord ALIGN_DECL(2);
|
||||
/* 0x1 */ u8 mTexMap;
|
||||
/* 0x2 */ u8 mColorChan;
|
||||
};
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <dolphin/os/OSMessage.h>
|
||||
#include <dolphin/os/OSThread.h>
|
||||
#include "global.h"
|
||||
|
||||
class JKRSolidHeap;
|
||||
|
||||
@@ -15,7 +16,7 @@ namespace JASystem {
|
||||
void start(JKRSolidHeap*, u32, u32);
|
||||
|
||||
extern OSThread sAudioThread;
|
||||
extern u8 saAudioStack[4096] __attribute__((aligned(32)));
|
||||
extern u8 saAudioStack[4096] ALIGN_DECL(32);
|
||||
extern OSMessageQueue sAudioprocMQ;
|
||||
extern OSMessage saAudioMsgBuf[16];
|
||||
extern u32 sAudioprocMQInit;
|
||||
|
||||
@@ -2,14 +2,15 @@
|
||||
#define JASDRIVERTABLES_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
#include "global.h"
|
||||
|
||||
namespace JASystem {
|
||||
namespace Driver {
|
||||
extern f32 C5BASE_PITCHTABLE[];
|
||||
}
|
||||
namespace DSPInterface {
|
||||
extern u16 DSPADPCM_FILTER[] __attribute__((aligned(32)));
|
||||
extern u16 DSPRES_FILTER[] __attribute__((aligned(32)));
|
||||
extern u16 DSPADPCM_FILTER[] ALIGN_DECL(32);
|
||||
extern u16 DSPRES_FILTER[] ALIGN_DECL(32);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef JUTFONTDATA_ASCFONT_FIX12_H
|
||||
#define JUTFONTDATA_ASCFONT_FIX12_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
#include "global.h"
|
||||
|
||||
extern const u8 JUTResFONT_Ascfont_fix12[] __attribute__((aligned(32)));
|
||||
extern const u8 JUTResFONT_Ascfont_fix12[] ALIGN_DECL(32);
|
||||
|
||||
#endif /* JUTFONTDATA_ASCFONT_FIX12_H */
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "d/d_bg_s_acch.h"
|
||||
#include "d/d_particle.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
#include "global.h"
|
||||
#include "m_Do/m_Do_ext.h"
|
||||
#include "m_Do/m_Do_hostIO.h"
|
||||
|
||||
@@ -93,7 +94,7 @@ public:
|
||||
|
||||
struct daAgb_ItemBuy {
|
||||
/* 0x0 */ u8 field_0x0;
|
||||
} __attribute__((aligned(4)));
|
||||
} ALIGN_DECL(4);
|
||||
|
||||
struct daAgb_GbaFlg {
|
||||
/* 0x0 */ u16 field_0x0;
|
||||
@@ -124,11 +125,11 @@ public:
|
||||
struct daAgb_Item {
|
||||
/* 0x0 */ u8 field_0x0;
|
||||
/* 0x1 */ u8 field_0x1;
|
||||
} __attribute__((aligned(4)));
|
||||
} ALIGN_DECL(4);
|
||||
|
||||
struct daAgb_Shop {
|
||||
/* 0x0 */ u8 field_0x0;
|
||||
} __attribute__((aligned(4)));
|
||||
} ALIGN_DECL(4);
|
||||
|
||||
static int mEffect;
|
||||
static daAgb_ItemBuy mItemBuy;
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
#ifndef _DOLPHIN_GBAPRIV
|
||||
#define _DOLPHIN_GBAPRIV
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
#include "dolphin/dsp.h"
|
||||
#include "dolphin/gba/GBA.h"
|
||||
#include "dolphin/os/OS.h"
|
||||
#include "global.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -23,7 +22,7 @@ typedef struct GBASecParam {
|
||||
u32 keyA;
|
||||
s32 keyB;
|
||||
u8 _padding1[24];
|
||||
} GBASecParam __attribute__((aligned(32)));
|
||||
} GBASecParam ALIGN_DECL(32);
|
||||
|
||||
typedef struct GBABootInfo {
|
||||
s32 paletteColor;
|
||||
|
||||
@@ -29,8 +29,12 @@
|
||||
#define GLUE(a, b) a##b
|
||||
#define GLUE2(a, b) GLUE(a, b)
|
||||
#define STATIC_ASSERT(cond) typedef char GLUE2(static_assertion_failed, __LINE__)[(cond) ? 1 : -1]
|
||||
#define ALIGN_DECL(ALIGNMENT) __attribute__((aligned(ALIGNMENT)))
|
||||
#define SECTION_DATA __declspec(section ".data")
|
||||
#else
|
||||
#define STATIC_ASSERT(...)
|
||||
#define ALIGN_DECL(...)
|
||||
#define SECTION_DATA
|
||||
#endif
|
||||
|
||||
// hack to make functions that return comparisons as int match
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "dolphin/os/OSMessage.h"
|
||||
#include "dolphin/os/OSMutex.h"
|
||||
#include "f_pc/f_pc_node.h"
|
||||
#include "global.h"
|
||||
|
||||
class JKRHeap;
|
||||
class JKRMemArchive;
|
||||
@@ -106,7 +107,7 @@ private:
|
||||
|
||||
struct mDoDvdThdStack {
|
||||
u8 stack[4096];
|
||||
} __attribute__((aligned(32)));
|
||||
} ALIGN_DECL(32);
|
||||
|
||||
struct mDoDvdThd {
|
||||
static s32 main(void*);
|
||||
|
||||
Reference in New Issue
Block a user