diff --git a/include/nw4r/lyt/layout.h b/include/nw4r/lyt/layout.h index cd2e78a..f13ee3b 100644 --- a/include/nw4r/lyt/layout.h +++ b/include/nw4r/lyt/layout.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include #include #include diff --git a/include/nw4r/lyt/material.h b/include/nw4r/lyt/material.h index 2c891ef..47edaee 100644 --- a/include/nw4r/lyt/material.h +++ b/include/nw4r/lyt/material.h @@ -1,11 +1,14 @@ #pragma once #include +#include #include namespace nw4r { namespace lyt { +USING(wii::gx::GXColorS10) + class Material { public: diff --git a/include/nw4r/math/types.h b/include/nw4r/math/types.h index 47d88f9..af6e627 100644 --- a/include/nw4r/math/types.h +++ b/include/nw4r/math/types.h @@ -10,6 +10,9 @@ namespace nw4r { namespace math { +USING(wii::mtx::Vec3) +USING(wii::mtx::Mtx34) + struct _VEC2 { f32 x, y; @@ -18,10 +21,10 @@ struct _VEC2 struct VEC2 : _VEC2 { VEC2() {} - VEC2(f32 x, f32 y) + VEC2(f32 x_, f32 y_) { - this->x = x; - this->y = y; + this->x = x_; + this->y = y_; } operator f32*() { return reinterpret_cast(this); } @@ -37,11 +40,11 @@ struct _VEC3 struct VEC3 : _VEC3 { VEC3() {} - VEC3(f32 x, f32 y, f32 z) + VEC3(f32 x_, f32 y_, f32 z_) { - this->x = x; - this->y = y; - this->z = z; + this->x = x_; + this->y = y_; + this->z = z_; } operator Vec3*() { return reinterpret_cast(this); } @@ -53,12 +56,14 @@ struct _MTX34 { union { +#ifdef DECOMP struct { f32 _00, _01, _02, _03, _10, _11, _12, _13, _20, _21, _22, _23; }; +#endif f32 m[3][4]; f32 a[3 * 4]; Mtx34 mtx; @@ -72,6 +77,7 @@ struct MTX34 : public _MTX34 MTX34() {} +#ifdef DECOMP // clang-format off MTX34(f32 f00, f32 f01, f32 f02, f32 f03, f32 f10, f32 f11, f32 f12, f32 f13, @@ -81,6 +87,7 @@ struct MTX34 : public _MTX34 _20 = f20; _21 = f21; _22 = f22; _23 = f23; } // clang-format on +#endif operator MtxRef() { return mtx; } operator MtxRefConst() const { return mtx; } diff --git a/include/nw4r/ut/color.h b/include/nw4r/ut/color.h index 8fe4cc2..157cda9 100644 --- a/include/nw4r/ut/color.h +++ b/include/nw4r/ut/color.h @@ -10,6 +10,8 @@ namespace nw4r { namespace ut { +USING(wii::gx::GXColor) + class Color : public GXColor { public: Color() { *this = 0xFFFFFFFF; } diff --git a/include/nw4r/ut/linkList.h b/include/nw4r/ut/linkList.h index 522cbba..cb446b8 100644 --- a/include/nw4r/ut/linkList.h +++ b/include/nw4r/ut/linkList.h @@ -168,11 +168,11 @@ template class ReverseIterator { return *this; } - const TIter::TElem* operator->() const { + const typename TIter::TElem* operator->() const { return &this->operator*(); } - TIter::TElem& operator*() const { + typename TIter::TElem& operator*() const { TIter it = mCurrent; --it; return *it; diff --git a/include/spm/camdrv.h b/include/spm/camdrv.h index b361c11..3546028 100644 --- a/include/spm/camdrv.h +++ b/include/spm/camdrv.h @@ -11,6 +11,7 @@ CPP_WRAPPER(spm::camdrv) +USING(wii::gx::GXProjectionType) USING(wii::mtx::Vec3) USING(wii::mtx::Mtx34) USING(wii::mtx::Mtx44) diff --git a/include/spm/fadedrv.h b/include/spm/fadedrv.h index 7bfa49d..344fe84 100644 --- a/include/spm/fadedrv.h +++ b/include/spm/fadedrv.h @@ -5,7 +5,7 @@ CPP_WRAPPER(spm::fadedrv) -USING(wii::GX::GXColor) +USING(wii::gx::GXColor) void fadeInit(); void fadeEntry(u32 transitionType, s32 param_2, GXColor colour);