Skip to content

Commit ffd010d

Browse files
committed
Add a precompiled header for RELs
1 parent 8a30030 commit ffd010d

File tree

1,085 files changed

+4484
-12581
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,085 files changed

+4484
-12581
lines changed

.clangd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,8 @@ Diagnostics:
1414
- "bound_member_function"
1515
- "typecheck_subscript_value"
1616
- "unknown_typename"
17+
---
18+
If:
19+
PathMatch: .*\.pch
20+
CompileFlags:
21+
Add: ["--language=c++", "--std=c++98"]

.vscode/settings.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
"files.trimFinalNewlines": true,
1717
"files.associations": {
1818
"*.inc": "cpp",
19+
"*.pch": "cpp",
20+
"*.pch++": "cpp",
1921
".clangd": "yaml",
2022
},
2123
// Disable C/C++ IntelliSense, use clangd instead

configure.py

Lines changed: 206 additions & 186 deletions
Large diffs are not rendered by default.

include/JSystem/J3DGraphAnimator/J3DMaterialAnm.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ typedef struct _GXColorS10 GXColorS10;
1212
*/
1313
class J3DMatColorAnm {
1414
public:
15-
/* 8003B2B8 */ ~J3DMatColorAnm() {};
16-
/* 8003B2F4 */ J3DMatColorAnm() : field_0x0(0), mAnmFlag(1), mAnmColor(NULL) {};
15+
/* 8003B2B8 */ ~J3DMatColorAnm() {}
16+
/* 8003B2F4 */ J3DMatColorAnm() : field_0x0(0), mAnmFlag(1), mAnmColor(NULL) {}
1717
J3DMatColorAnm(u16 param_1, J3DAnmColor* param_2) {
1818
field_0x0 = param_1;
1919
mAnmFlag = 1;
@@ -42,8 +42,8 @@ class J3DMatColorAnm {
4242
*/
4343
class J3DTexNoAnm {
4444
public:
45-
/* 8003B1F8 */ ~J3DTexNoAnm() {};
46-
/* 8003B240 */ J3DTexNoAnm() : field_0x4(0), mAnmFlag(1), mAnmTexPattern(NULL) {};
45+
/* 8003B1F8 */ ~J3DTexNoAnm() {}
46+
/* 8003B240 */ J3DTexNoAnm() : field_0x4(0), mAnmFlag(1), mAnmTexPattern(NULL) {}
4747
J3DTexNoAnm(u16 param_1, J3DAnmTexPattern* param_2) {
4848
field_0x4 = param_1;
4949
mAnmFlag = 1;
@@ -73,8 +73,8 @@ class J3DTexNoAnm {
7373
*/
7474
class J3DTexMtxAnm {
7575
public:
76-
/* 8003B264 */ ~J3DTexMtxAnm() {};
77-
/* 8003B2A0 */ J3DTexMtxAnm() : field_0x0(0), mAnmFlag(1), mAnmTransform(NULL) {};
76+
/* 8003B264 */ ~J3DTexMtxAnm() {}
77+
/* 8003B2A0 */ J3DTexMtxAnm() : field_0x0(0), mAnmFlag(1), mAnmTransform(NULL) {}
7878
J3DTexMtxAnm(u16 param_1, J3DAnmTextureSRTKey* param_2) {
7979
field_0x0 = param_1;
8080
mAnmFlag = 1;
@@ -174,7 +174,7 @@ class J3DMaterialAnm {
174174
/* 8032C664 */ void setTevColorAnm(int, J3DTevColorAnm*);
175175
/* 8032C6A4 */ void setTevKColorAnm(int, J3DTevKColorAnm*);
176176

177-
/* 800A4820 */ virtual ~J3DMaterialAnm() {};
177+
/* 800A4820 */ virtual ~J3DMaterialAnm() {}
178178
/* 8032C3C4 */ virtual void calc(J3DMaterial*) const;
179179

180180
const J3DTexMtxAnm& getTexMtxAnm(int i) const { return mTexMtxAnm[i]; }

include/JSystem/J3DGraphBase/J3DMatBlock.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,10 @@ struct J3DColorChan {
137137
u8 getAmbSrc() const { return (GXColorSrc)((u32)(mColorChanID & (1 << 6)) >> 6); }
138138
u8 getMatSrc() const { return (GXColorSrc)(mColorChanID & 1); }
139139
u8 getDiffuseFn() const { return ((u32)(mColorChanID & (3 << 7)) >> 7); }
140-
// This function has to appear in J3DMatBlock.cpp because it generates extra data in .sdata2
141-
inline u8 getAttnFn() const;
140+
u8 getAttnFn() const {
141+
u8 AttnArr[] = {2,0,2,1};
142+
return AttnArr[(u32)(mColorChanID & (3 << 9)) >> 9];
143+
}
142144

143145
void load() const {
144146
J3DGDWrite_u32(setChanCtrlMacro(getEnable(), (GXColorSrc)getAmbSrc(), (GXColorSrc)getMatSrc(), getLightMask(),
@@ -1549,12 +1551,13 @@ struct J3DAlphaComp {
15491551
mRef1 = info.mRef1;
15501552
}
15511553

1552-
J3DAlphaComp& operator=(u16 id) { mID = id; }
1554+
J3DAlphaComp& operator=(u16 id) { mID = id; return *this; }
15531555

15541556
J3DAlphaComp& operator=(const J3DAlphaComp& rhs) {
15551557
mID = rhs.mID;
15561558
mRef0 = rhs.mRef0;
15571559
mRef1 = rhs.mRef1;
1560+
return *this;
15581561
}
15591562

15601563
void setAlphaCompInfo(const J3DAlphaCompInfo& info) {
@@ -1599,6 +1602,7 @@ struct J3DIndTexOrder : public J3DIndTexOrderInfo {
15991602
/* 8000E128 */ J3DIndTexOrder() : J3DIndTexOrderInfo(j3dDefaultIndTexOrderNull) {}
16001603
J3DIndTexOrder& operator=(J3DIndTexOrder const& other) {
16011604
*(u32*)this = *(u32*)&other;
1605+
return *this;
16021606
}
16031607
J3DIndTexOrder(J3DIndTexOrderInfo const& info) : J3DIndTexOrderInfo(info) {}
16041608
u8 getMap() const { return (GXTexMapID)mMap; }

include/JSystem/JAudio2/JASBasicWaveBank.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ class JASWaveBank {
3333
*/
3434
struct JASBasicWaveBank : public JASWaveBank {
3535
struct TWaveHandle : public JASWaveHandle {
36-
/* 802985E4 */ ~TWaveHandle() {}
3736
/* 80298B64 */ int getWavePtr() const;
3837
/* 80298C18 */ TWaveHandle() { mHeap = NULL; }
3938
/* 80298C64 */ const JASWaveInfo* getWaveInfo() const { return &field_0x4; }

include/JSystem/JAudio2/JASSimpleWaveBank.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
struct JASSimpleWaveBank : JASWaveBank, JASWaveArc {
99
struct TWaveHandle : JASWaveHandle {
10-
/* 80298D84 */ ~TWaveHandle() {}
1110
/* 80298F38 */ int getWavePtr() const;
1211
/* 80298F5C */ TWaveHandle();
1312
/* 80298F90 */ const JASWaveInfo* getWaveInfo() const;

include/SSystem/SComponent/c_sxyz.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ struct SVec {
1010
class csXyz : public SVec {
1111
public:
1212
static const csXyz Zero;
13-
/* 80018BD0 */ ~csXyz() {};
13+
/* 80018BD0 */ ~csXyz() {}
1414
/* inline */ csXyz() {}
1515
/* inline */ csXyz(const csXyz& other) : SVec(other){};
1616
/* 802673F4 */ csXyz(s16, s16, s16);

include/SSystem/SComponent/c_xyz.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ struct cXyz : Vec {
100100
void zero() { set(0.0f, 0.0f, 0.0f); }
101101

102102
f32 getSquareMag() const { return VECSquareMag(this); }
103-
f32 getSquareDistance(const Vec& other) const { return VECSquareDistance(this, &other); }
103+
f32 getSquareDistance(const Vec& other) const { return PSVECSquareDistance(this, &other); }
104104

105105
static f32 getNearZeroValue() { return 8e-11f; }
106106

include/Z2AudioLib/Z2Calc.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22
#define Z2CALC_H
33

44
#include "dolphin/types.h"
5+
#include "m_Do/m_Do_lib.h"
56

67
namespace Z2Calc {
8+
// hack for f_op_actor, having this present breaks its weak func ordering
9+
static const Vec cNullVec = {0.0f, 0.0f, 0.0f};
10+
711
enum CurveSign {
812
CURVE_SIGN_0 = 0,
913
CURVE_SIGN_1 = 1,

0 commit comments

Comments
 (0)