diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2025-03-22 21:00:51 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-22 18:00:51 -0700 |
| commit | 4dc0cd9d09d5a53bf6d68f0018a8053a1507ee9a (patch) | |
| tree | 285129a59d3939a79d1d2867413fe4a1fb5aa280 /src/JSystem | |
| parent | d0f89e41b1c2dd8b434cf8a63278757b4fc8b84f (diff) | |
Debug version now builds OK and all_source compiles (#2343)
* Fix missing arg to JUT_ASSERT
* Fix some MWCC version diff errors
* Compile m_Do_ext, d_demo, actor_mng
* Add VSCode task to quickly switch between versions
* Unlink magLift for debug
* Update the hash of the debug dol
The old cbea5fa... hash here was for the dol generated by the alf2dol.py script, which produces incorrect alignment.
The dol with the new hash can be obtained by using `dtk elf2dol` to convert the debug .alf file to a dol.
The DOL now builds OK.
* Fix all debug REL dtor splits
All RELs now also build OK, meaning `ninja build/ShieldD/ok` now succeeds.
* Add genMessage declarations to all HIO subclasses
* Fixing more compilation errors
* m_Do_mtx 100% on debug
Cannot be linked due to weak function name mangling?
* Improve various matches
* Fix all remaining compilation errors
* Fix new compilation errors from main
* Fix retail regression
* Link f_pc_profile_lst
Diffstat (limited to 'src/JSystem')
| -rw-r--r-- | src/JSystem/J2DGraph/J2DPictureEx.cpp | 10 | ||||
| -rw-r--r-- | src/JSystem/J3DGraphAnimator/J3DCluster.cpp | 3 | ||||
| -rw-r--r-- | src/JSystem/JAudio2/JAIStreamMgr.cpp | 2 | ||||
| -rw-r--r-- | src/JSystem/JAudio2/JASWaveArcLoader.cpp | 2 | ||||
| -rw-r--r-- | src/JSystem/JFramework/JFWSystem.cpp | 9 | ||||
| -rw-r--r-- | src/JSystem/JHostIO/JHIhioASync.cpp | 1 | ||||
| -rw-r--r-- | src/JSystem/JHostIO/JORServer.cpp | 18 | ||||
| -rw-r--r-- | src/JSystem/JParticle/JPAMath.cpp | 10 | ||||
| -rw-r--r-- | src/JSystem/JStudio/JStudio_JStage/object.cpp | 4 |
9 files changed, 30 insertions, 29 deletions
diff --git a/src/JSystem/J2DGraph/J2DPictureEx.cpp b/src/JSystem/J2DGraph/J2DPictureEx.cpp index c60dd7ba84..4cddb568a7 100644 --- a/src/JSystem/J2DGraph/J2DPictureEx.cpp +++ b/src/JSystem/J2DGraph/J2DPictureEx.cpp @@ -631,12 +631,12 @@ bool J2DPictureEx::isSetBlackWhite(JUtility::TColor param_0, JUtility::TColor pa } /* 803068F8-80306958 301238 0060+00 1/0 0/0 0/0 .text getBlack__12J2DPictureExCFv */ -void J2DPictureEx::getBlack() const { +JUtility::TColor J2DPictureEx::getBlack() const { // NONMATCHING } /* 80306958-803069B8 301298 0060+00 1/0 0/0 0/0 .text getWhite__12J2DPictureExCFv */ -void J2DPictureEx::getWhite() const { +JUtility::TColor J2DPictureEx::getWhite() const { // NONMATCHING } @@ -657,7 +657,7 @@ void J2DPictureEx::rewriteAlpha() { /* 80306A24-80306AC4 301364 00A0+00 1/0 0/0 0/0 .text isUsed__12J2DPictureExFPC7ResTIMG */ -void J2DPictureEx::isUsed(ResTIMG const* param_0) { +bool J2DPictureEx::isUsed(ResTIMG const* param_0) { // NONMATCHING } @@ -699,7 +699,7 @@ void J2DPictureEx::setAnimation(J2DAnmVtxColor* param_0) { /* 80306C70-80306DC8 3015B0 0158+00 1/0 0/0 0/0 .text * animationPane__12J2DPictureExFPC15J2DAnmTransform */ -void J2DPictureEx::animationPane(J2DAnmTransform const* param_0) { +const J2DAnmTransform* J2DPictureEx::animationPane(J2DAnmTransform const* param_0) { // NONMATCHING } @@ -779,7 +779,7 @@ void J2DPictureEx::setCullBack(bool param_0) { /* 803071A4-803071C4 301AE4 0020+00 1/0 0/0 0/0 .text isUsed__12J2DPictureExFPC7ResFONT */ -void J2DPictureEx::isUsed(ResFONT const* param_0) { +bool J2DPictureEx::isUsed(ResFONT const* param_0) { // NONMATCHING } diff --git a/src/JSystem/J3DGraphAnimator/J3DCluster.cpp b/src/JSystem/J3DGraphAnimator/J3DCluster.cpp index dbca675e9b..32d5ac3118 100644 --- a/src/JSystem/J3DGraphAnimator/J3DCluster.cpp +++ b/src/JSystem/J3DGraphAnimator/J3DCluster.cpp @@ -7,6 +7,7 @@ #include "JSystem/J3DGraphAnimator/J3DAnimation.h" #include "JSystem/J3DGraphAnimator/J3DModel.h" #include "JSystem/JMath/JMATrigonometric.h" +#include "JSystem/JUtility/JUTAssert.h" #include "dolphin/base/PPCArch.h" #include "dolphin/os.h" @@ -275,4 +276,4 @@ void J3DDeformer::normalizeWeight(int i_keyNum, f32* i_weights) { for (u16 i = 0; i < i_keyNum; i++) { i_weights[i] *= scale; } -}
\ No newline at end of file +} diff --git a/src/JSystem/JAudio2/JAIStreamMgr.cpp b/src/JSystem/JAudio2/JAIStreamMgr.cpp index f80b3f6a15..ea4d901344 100644 --- a/src/JSystem/JAudio2/JAIStreamMgr.cpp +++ b/src/JSystem/JAudio2/JAIStreamMgr.cpp @@ -28,7 +28,7 @@ bool JAIStreamMgr::startSound(JAISoundID param_1, JAISoundHandle* param_2, } s32 streamFileEntry = streamDataMgr_->getStreamFileEntry(param_1); if (streamFileEntry < 0) { - JUT_WARN("Cannot find the stream file entry for ID:%08x\n", param_1) + JUT_WARN(46, "Cannot find the stream file entry for ID:%08x\n", param_1.mId.mFullId) return false; } JAIStream* stream = newStream_(); diff --git a/src/JSystem/JAudio2/JASWaveArcLoader.cpp b/src/JSystem/JAudio2/JASWaveArcLoader.cpp index 6b049bbfba..56cbd26bef 100644 --- a/src/JSystem/JAudio2/JASWaveArcLoader.cpp +++ b/src/JSystem/JAudio2/JASWaveArcLoader.cpp @@ -8,7 +8,7 @@ #include "JSystem/JAudio2/JASTaskThread.h" #include "JSystem/JAudio2/JASMutex.h" #include "JSystem/JKernel/JKRDvdAramRipper.h" -#include "string.h" +#include "cstring.h" #include "dolphin/os.h" /* 80451290-80451298 000790 0004+04 1/1 0/0 0/0 .sbss sAramHeap__16JASWaveArcLoader */ diff --git a/src/JSystem/JFramework/JFWSystem.cpp b/src/JSystem/JFramework/JFWSystem.cpp index a7a599bcb0..7d8cd4e525 100644 --- a/src/JSystem/JFramework/JFWSystem.cpp +++ b/src/JSystem/JFramework/JFWSystem.cpp @@ -32,6 +32,7 @@ JKRExpHeap* JFWSystem::systemHeap; /* 80271CD0-80271D18 26C610 0048+00 1/1 1/1 0/0 .text firstInit__9JFWSystemFv */ void JFWSystem::firstInit() { + JUT_ASSERT(80, rootHeap == 0); OSInit(); DVDInit(); rootHeap = JKRExpHeap::createRoot(CSetUpParam::maxStdHeaps, false); @@ -51,15 +52,15 @@ u32 JFWSystem::CSetUpParam::aramGraphBufSize = 0x600000; /* 80450784-80450788 000204 0004+00 1/1 0/0 0/0 .sdata streamPriority__Q29JFWSystem11CSetUpParam */ -u32 JFWSystem::CSetUpParam::streamPriority = 8; +s32 JFWSystem::CSetUpParam::streamPriority = 8; /* 80450788-8045078C 000208 0004+00 1/1 0/0 0/0 .sdata decompPriority__Q29JFWSystem11CSetUpParam */ -u32 JFWSystem::CSetUpParam::decompPriority = 7; +s32 JFWSystem::CSetUpParam::decompPriority = 7; /* 8045078C-80450790 00020C 0004+00 1/1 0/0 0/0 .sdata aPiecePriority__Q29JFWSystem11CSetUpParam */ -u32 JFWSystem::CSetUpParam::aPiecePriority = 6; +s32 JFWSystem::CSetUpParam::aPiecePriority = 6; /* 80450790-80450794 -00001 0004+00 1/1 0/0 0/0 .sdata systemFontRes__Q29JFWSystem11CSetUpParam */ ResFONT* JFWSystem::CSetUpParam::systemFontRes = (ResFONT*)&JUTResFONT_Ascfont_fix12; @@ -92,6 +93,8 @@ static u8 sInitCalled; /* 80271D18-80272040 26C658 0328+00 0/0 1/1 0/0 .text init__9JFWSystemFv */ // NONMATCHING - regalloc, equivalent void JFWSystem::init() { + JUT_ASSERT(101, sInitCalled == false); + if (rootHeap == NULL) { firstInit(); } diff --git a/src/JSystem/JHostIO/JHIhioASync.cpp b/src/JSystem/JHostIO/JHIhioASync.cpp index ea46990579..6d1630b35e 100644 --- a/src/JSystem/JHostIO/JHIhioASync.cpp +++ b/src/JSystem/JHostIO/JHIhioASync.cpp @@ -1,6 +1,7 @@ #include "JSystem/JHostIO/JHIMccBuf.h" #include "JSystem/JHostIO/JHIRMcc.h" #include <dolphin.h> +#include "global.h" u32 gsEnableHostio; u32 gsEnableInterface; diff --git a/src/JSystem/JHostIO/JORServer.cpp b/src/JSystem/JHostIO/JORServer.cpp index 75935dc2ae..59d57f646a 100644 --- a/src/JSystem/JHostIO/JORServer.cpp +++ b/src/JSystem/JHostIO/JORServer.cpp @@ -441,16 +441,16 @@ void JORServer::hostinfo_localTime_(JSUMemoryInputStream& stream, JORHostInfo_Ca >> milliseconds; OSCalendarTime* pTime = pCalendarTime->getCalendarTime(); - pTime->seconds = seconds; - pTime->minutes = minutes; - pTime->hours = hours; - pTime->day_of_month = monthday; - pTime->month = month - 1; + pTime->sec = seconds; + pTime->min = minutes; + pTime->hour = hours; + pTime->mday = monthday; + pTime->mon = month - 1; pTime->year = year; - pTime->week_day = weekday; - pTime->milliseconds = milliseconds; - pTime->microseconds = 0; - pTime->year_day = monthday + JORGetYearDays(year, month - 1); + pTime->wday = weekday; + pTime->msec = milliseconds; + pTime->usec = 0; + pTime->yday = monthday + JORGetYearDays(year, month - 1); } void JORServer::sendReset() { diff --git a/src/JSystem/JParticle/JPAMath.cpp b/src/JSystem/JParticle/JPAMath.cpp index a2325f63a2..c86860382e 100644 --- a/src/JSystem/JParticle/JPAMath.cpp +++ b/src/JSystem/JParticle/JPAMath.cpp @@ -43,14 +43,10 @@ static f32 floatDummyFunc() { /* 80280588-802806C0 27AEC8 0138+00 0/0 1/1 0/0 .text JPAGetDirMtx__FRCQ29JGeometry8TVec3<f>PA4_f */ void JPAGetDirMtx(JGeometry::TVec3<f32> const& param_0, f32 (*param_1)[4]) { - JGeometry::TVec3<float> local_78; - f32 minusx = -param_0.x; - local_78.x = param_0.y; - local_78.y = minusx; - local_78.z = 0.0f; + JGeometry::TVec3<float> local_78(param_0.y, -param_0.x, 0.0f); f32 len = local_78.length(); - if (len <= 32.0f * FLT_EPSILON) { + if (len <= JGeometry::TUtil<f32>::epsilon()) { local_78.zero(); } else { local_78.scale(1.0f / len); @@ -183,4 +179,4 @@ f32 JPACalcKeyAnmValue(f32 param_0, u16 param_1, f32 const* param_2) { return JMAHermiteInterpolation(param_0, param_2[0], param_2[1], param_2[3], param_2[4], param_2[5], param_2[6]); -}
\ No newline at end of file +} diff --git a/src/JSystem/JStudio/JStudio_JStage/object.cpp b/src/JSystem/JStudio/JStudio_JStage/object.cpp index 03434f045c..2973046396 100644 --- a/src/JSystem/JStudio/JStudio_JStage/object.cpp +++ b/src/JSystem/JStudio/JStudio_JStage/object.cpp @@ -92,7 +92,7 @@ void JStudio_JStage::TAdaptor_object_::adaptor_object_data_(void const* param_1, void const* param_3, u32 param_4) { int uVar3; if (param_2 == 0) { - uVar3 = -1; + uVar3 = JStage::TActor::ID_NORMAL; } else { uVar3 = *(int*)param_1; } @@ -139,4 +139,4 @@ JStudio_JStage::TAdaptor_object_::adaptor_object_ENABLE_(JStudio::data::TEOperat } break; } -}
\ No newline at end of file +} |
