Use precompiled headers, fix weak data issues

This commit is contained in:
LagoLunatic
2025-08-19 17:15:39 -04:00
parent a32174dff6
commit 217775af4e
629 changed files with 646 additions and 445 deletions
+2 -7
View File
@@ -51,8 +51,7 @@ public:
virtual ~J3DMtxCalcBasic() {}
virtual void init(const Vec& vec, const Mtx& mtx) {
J3DSys::mCurrentS = vec;
// TODO: Same issue as J3DMtxCalcMaya::init.
// J3DSys::mParentS = (Vec){1.0f, 1.0f, 1.0f};
J3DSys::mParentS = (Vec){1.0f, 1.0f, 1.0f};
J3DSys::mCurrentMtx[0][0] = mtx[0][0] * J3DSys::mCurrentS.x;
J3DSys::mCurrentMtx[0][1] = mtx[0][1] * J3DSys::mCurrentS.y;
J3DSys::mCurrentMtx[0][2] = mtx[0][2] * J3DSys::mCurrentS.z;
@@ -94,11 +93,7 @@ public:
J3DMtxCalcMaya() : J3DMtxCalcBasic() {}
virtual ~J3DMtxCalcMaya() {}
virtual void init(const Vec& vec, const Mtx& mtx) {
// TODO: This breaks some TUs by adding extra data ({0x3F800000, 0x3F800000, 0x3F800000})
// This seems to be responsible for the @2100 Vec literal that gets added to most TUs.
// The strange part is that @2100 needs to be in the .data section, but uncommenting this
// will put it in the .rodata sections.
// J3DSys::mParentS = (Vec){1.0f, 1.0f, 1.0f};
J3DSys::mParentS = (Vec){1.0f, 1.0f, 1.0f};
J3DSys::mCurrentS = vec;
J3DSys::mCurrentMtx[0][0] = mtx[0][0] * J3DSys::mCurrentS.x;
J3DSys::mCurrentMtx[0][1] = mtx[0][1] * J3DSys::mCurrentS.y;
+4 -1
View File
@@ -992,7 +992,10 @@ struct J3DColorChan {
info.mDiffuseFn, info.mAttnFn, ambSrc);
}
J3DColorChan(u16 id) : mChanCtrl(id) {}
GXAttnFn getAttnFn();
GXAttnFn getAttnFn() {
u8 attnFnTbl[] = { GX_AF_NONE, GX_AF_SPEC, GX_AF_NONE, GX_AF_SPOT };
return GXAttnFn(attnFnTbl[mChanCtrl >> 9 & 0x03]);
}
GXDiffuseFn getDiffuseFn() { return GXDiffuseFn(mChanCtrl >> 7 & 3); }
u8 getLightMask() { return ((mChanCtrl >> 2 & 0x0f) | (mChanCtrl >> 11 & 0x0f) << 4); }
void setLightMask(u8 mask) {
@@ -4,7 +4,6 @@
#include "JSystem/JUtility/TColor.h"
#include "stdarg.h"
namespace std {
// no idea what this is or why it is used instead of va_list
struct __tag_va_List : __va_list_struct {};