summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorhatal175 <hatal175@users.noreply.github.com>2023-09-19 13:45:39 +0300
committerGitHub <noreply@github.com>2023-09-19 03:45:39 -0700
commite5cb9ce472674fbb385bb909005dacbd3576e681 (patch)
tree45cf88e27de779d1bb80b3692d0af30b80947368 /libs
parent6726d1cf475c2ea193b5c2a63938e6869b21e10d (diff)
JAUSeqCollection, JAUSoundTable OK (#1932)
Diffstat (limited to 'libs')
-rw-r--r--libs/JSystem/J3DGraphBase/J3DStruct.cpp12
-rw-r--r--libs/JSystem/JAudio2/JASVoiceBank.cpp1
-rw-r--r--libs/JSystem/JAudio2/JAUSeqCollection.cpp72
-rw-r--r--libs/JSystem/JAudio2/JAUSoundTable.cpp83
4 files changed, 70 insertions, 98 deletions
diff --git a/libs/JSystem/J3DGraphBase/J3DStruct.cpp b/libs/JSystem/J3DGraphBase/J3DStruct.cpp
index 63bfc37353..1ea220f35e 100644
--- a/libs/JSystem/J3DGraphBase/J3DStruct.cpp
+++ b/libs/JSystem/J3DGraphBase/J3DStruct.cpp
@@ -19,8 +19,6 @@ void J3DLightInfo::operator=(J3DLightInfo const& param_0) {
}
/* 80325718-80325794 320058 007C+00 0/0 4/4 0/0 .text __as__13J3DTexMtxInfoFRC13J3DTexMtxInfo */
-// J3DTextureSRTInfo::operator=
-#ifdef NONMATCHING
void J3DTexMtxInfo::operator=(J3DTexMtxInfo const& param_0) {
mProjection = param_0.mProjection;
mInfo = param_0.mInfo;
@@ -28,16 +26,6 @@ void J3DTexMtxInfo::operator=(J3DTexMtxInfo const& param_0) {
mSRT = param_0.mSRT;
JMath::gekko_ps_copy16(&mEffectMtx, &param_0.mEffectMtx);
}
-#else
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void J3DTexMtxInfo::operator=(J3DTexMtxInfo const& param_0) {
- nofralloc
-#include "asm/JSystem/J3DGraphBase/J3DStruct/__as__13J3DTexMtxInfoFRC13J3DTexMtxInfo.s"
-}
-#pragma pop
-#endif
/* ############################################################################################## */
/* 80456410-80456414 004A10 0004+00 1/1 0/0 0/0 .sdata2 @409 */
diff --git a/libs/JSystem/JAudio2/JASVoiceBank.cpp b/libs/JSystem/JAudio2/JASVoiceBank.cpp
index 87732ed6d1..88a77072e0 100644
--- a/libs/JSystem/JAudio2/JASVoiceBank.cpp
+++ b/libs/JSystem/JAudio2/JASVoiceBank.cpp
@@ -5,7 +5,6 @@
#include "JSystem/JAudio2/JASVoiceBank.h"
#include "JSystem/JAudio2/JASBasicInst.h"
-#include "dol2asm.h"
//
// Declarations:
diff --git a/libs/JSystem/JAudio2/JAUSeqCollection.cpp b/libs/JSystem/JAudio2/JAUSeqCollection.cpp
index 72b6b66cf5..e07a6b88e2 100644
--- a/libs/JSystem/JAudio2/JAUSeqCollection.cpp
+++ b/libs/JSystem/JAudio2/JAUSeqCollection.cpp
@@ -5,7 +5,6 @@
#include "JSystem/JAudio2/JAUSeqCollection.h"
#include "JSystem/JUtility/JUTAssert.h"
-#include "dol2asm.h"
//
// Types:
@@ -15,8 +14,6 @@
// Forward References:
//
-extern "C" void getSeqData__16JAUSeqCollectionFiiP10JAISeqData();
-
//
// External References:
//
@@ -31,36 +28,43 @@ JAUSeqCollection::JAUSeqCollection() {
}
/* 802A66AC-802A66FC 2A0FEC 0050+00 0/0 1/1 0/0 .text init__16JAUSeqCollectionFPCv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void JAUSeqCollection::init(void const* param_0) {
- nofralloc
-#include "asm/JSystem/JAudio2/JAUSeqCollection/init__16JAUSeqCollectionFPCv.s"
+void JAUSeqCollection::init(void const* param_0) {
+ field_0x8 = (const JAUSeqCollectionData*)param_0;
+ if (field_0x8->field_0x0 != 0x53 || field_0x8->field_0x1 != 0x43) {
+ field_0x8 = NULL;
+ return;
+ }
+
+ field_0x0 = field_0x8->field_0x2;
+ field_0xc = field_0x8->field_0x4;
+ field_0x4 = &field_0x8->field_0x8;
+
}
-#pragma pop
/* 802A66FC-802A6754 2A103C 0058+00 1/1 0/0 0/0 .text
* getSeqData__16JAUSeqCollectionFiiP10JAISeqData */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm bool JAUSeqCollection::getSeqData(int param_0, int param_1, JAISeqData* param_2) {
- nofralloc
-#include "asm/JSystem/JAudio2/JAUSeqCollection/getSeqData__16JAUSeqCollectionFiiP10JAISeqData.s"
+bool JAUSeqCollection::getSeqData(int param_0, int param_1, JAISeqData* param_2) {
+ if (param_0 >= field_0x0) {
+ return false;
+ }
+ u32* puVar2 = (u32*)((u8*)field_0x8 + field_0x4[param_0]);
+ if (param_1 >= puVar2[0]) {
+ return false;
+ }
+ param_2->set((void*)field_0x8, puVar2[param_1 + 1]);
+ return true;
}
-#pragma pop
/* 802A6754-802A677C 2A1094 0028+00 1/1 0/0 0/0 .text
* getSeqDataRegion__16JAUSeqCollectionFP16JAISeqDataRegion */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void JAUSeqCollection::getSeqDataRegion(JAISeqDataRegion* param_0) {
- nofralloc
-#include "asm/JSystem/JAudio2/JAUSeqCollection/getSeqDataRegion__16JAUSeqCollectionFP16JAISeqDataRegion.s"
+bool JAUSeqCollection::getSeqDataRegion(JAISeqDataRegion* param_0) {
+ if (isValid()) {
+ param_0->field_0x0 = (u32)field_0x8;
+ param_0->field_0x4 = field_0xc;
+ return true;
+ }
+ return false;
}
-#pragma pop
/* 802A677C-802A67D0 2A10BC 0054+00 0/0 1/1 0/0 .text __ct__27JAUSeqDataMgr_SeqCollectionFv */
JAUSeqDataMgr_SeqCollection::JAUSeqDataMgr_SeqCollection() {
@@ -88,27 +92,15 @@ int JAUSeqDataMgr_SeqCollection::releaseSeqData() {
/* 802A683C-802A6894 2A117C 0058+00 1/0 0/0 0/0 .text
* getSeqData__27JAUSeqDataMgr_SeqCollectionF10JAISoundIDP10JAISeqData */
-// branch
-#ifdef NONMATCHING
-s32 JAUSeqDataMgr_SeqCollection::getSeqData(JAISoundID param_0, JAISeqData* param_1) {
+JAUSeqDataMgr_SeqCollection::SeqDataReturnValue JAUSeqDataMgr_SeqCollection::getSeqData(JAISoundID param_0, JAISeqData* param_1) {
if (!isValid()) {
- return 0;
+ return SeqDataReturnValue_0;
}
if (JAUSeqCollection::getSeqData(param_0.mId.mBytes.b1, param_0.mId.mAdvancedId.mShortId, param_1)) {
- return 2;
+ return SeqDataReturnValue_2;
}
- return 0;
-}
-#else
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm s32 JAUSeqDataMgr_SeqCollection::getSeqData(JAISoundID param_0, JAISeqData* param_1) {
- nofralloc
-#include "asm/JSystem/JAudio2/JAUSeqCollection/getSeqData__27JAUSeqDataMgr_SeqCollectionF10JAISoundIDP10JAISeqData.s"
+ return SeqDataReturnValue_0;
}
-#pragma pop
-#endif
/* 802A6894-802A68F4 2A11D4 0060+00 1/0 0/0 0/0 .text __dt__27JAUSeqDataMgr_SeqCollectionFv */
JAUSeqDataMgr_SeqCollection::~JAUSeqDataMgr_SeqCollection() {} \ No newline at end of file
diff --git a/libs/JSystem/JAudio2/JAUSoundTable.cpp b/libs/JSystem/JAudio2/JAUSoundTable.cpp
index 840f6946dc..d18231f750 100644
--- a/libs/JSystem/JAudio2/JAUSoundTable.cpp
+++ b/libs/JSystem/JAudio2/JAUSoundTable.cpp
@@ -6,60 +6,53 @@
#include "JSystem/JAudio2/JAUSoundTable.h"
#include "dolphin/types.h"
-//
-// Forward References:
-//
-
-extern "C" void init__13JAUSoundTableFPCv();
-extern "C" void getTypeID__13JAUSoundTableCF10JAISoundID();
-extern "C" void getData__13JAUSoundTableCF10JAISoundID();
-extern "C" void init__17JAUSoundNameTableFPCv();
-
-//
-// External References:
-//
-
-//
-// Declarations:
-//
-
/* 802A7114-802A7160 2A1A54 004C+00 0/0 1/1 0/0 .text init__13JAUSoundTableFPCv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void JAUSoundTable::init(void const* param_0) {
- nofralloc
-#include "asm/JSystem/JAudio2/JAUSoundTable/init__13JAUSoundTableFPCv.s"
+void JAUSoundTable::init(void const* param_0) {
+ if (param_0 != NULL) {
+ field_0x0.init(param_0);
+ } else {
+ field_0x0.reset();
+ }
}
-#pragma pop
/* 802A7160-802A728C 2A1AA0 012C+00 0/0 10/10 0/0 .text getTypeID__13JAUSoundTableCF10JAISoundID
*/
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm u8 JAUSoundTable::getTypeID(JAISoundID param_0) const {
- nofralloc
-#include "asm/JSystem/JAudio2/JAUSoundTable/getTypeID__13JAUSoundTableCF10JAISoundID.s"
+u8 JAUSoundTable::getTypeID(JAISoundID param_0) const {
+ if (param_0.isAnonymous()) {
+ return 0xff;
+ }
+ JAUSoundTableSection* section = field_0x0.getSection(param_0.mId.mBytes.b0);
+ if (section == NULL) {
+ return 0xff;
+ }
+ JAUSoundTableGroup* group = field_0x0.getGroup(section, param_0.mId.mBytes.b1);
+ if (group == NULL) {
+ return 0xff;
+ }
+ return group->getTypeID(param_0.mId.mAdvancedId.mShortId);
}
-#pragma pop
/* 802A728C-802A73D4 2A1BCC 0148+00 0/0 7/7 0/0 .text getData__13JAUSoundTableCF10JAISoundID */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void JAUSoundTable::getData(JAISoundID param_0) const {
- nofralloc
-#include "asm/JSystem/JAudio2/JAUSoundTable/getData__13JAUSoundTableCF10JAISoundID.s"
+void* JAUSoundTable::getData(JAISoundID param_0) const {
+ if (param_0.isAnonymous()) {
+ return NULL;
+ }
+ JAUSoundTableSection* section = field_0x0.getSection(param_0.mId.mBytes.b0);
+ if (section == NULL) {
+ return NULL;
+ }
+ JAUSoundTableGroup* group = field_0x0.getGroup(section, param_0.mId.mBytes.b1);
+ if (group == NULL) {
+ return NULL;
+ }
+ return getItem(group, param_0.mId.mAdvancedId.mShortId);
}
-#pragma pop
/* 802A73D4-802A7420 2A1D14 004C+00 0/0 1/1 0/0 .text init__17JAUSoundNameTableFPCv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void JAUSoundNameTable::init(void const* param_0) {
- nofralloc
-#include "asm/JSystem/JAudio2/JAUSoundTable/init__17JAUSoundNameTableFPCv.s"
+void JAUSoundNameTable::init(void const* param_0) {
+ if (param_0 != NULL) {
+ field_0x0.init(param_0);
+ } else {
+ field_0x0.reset();
+ }
}
-#pragma pop