summaryrefslogtreecommitdiff
path: root/libs/JSystem/src/JAudio2/JAUSoundTable.cpp
diff options
context:
space:
mode:
authorLuke Street <luke@street.dev>2026-03-01 15:35:36 -0700
committerGitHub <noreply@github.com>2026-03-01 14:35:36 -0800
commit9649319ec4926457ef85e6094f8207474c977c2d (patch)
tree1c5cd4c7cc4c1aee03f28921213da47f2775444d /libs/JSystem/src/JAudio2/JAUSoundTable.cpp
parent6e149819e13b1f70ecbf8a4c66b030c17ffed2bb (diff)
Reorganize library code into `libs/` (#3119)
* Reorganize files into libs/{dolphin,JSystem,PowerPC_EABI_Support,revolution,TRK_MINNOW_DOLPHIN} * Update configure.py and project.py for new libs structure * Refactor `#include <dolphin/x.h>` -> `<x.h>` * Remove `__REVOLUTION_SDK__` forwards from dolphin * Fix dolphin/ references in revolution * Wrap `#include <dolphin.h>` in `!__REVOLUTION_SDK__` * Always build TRK against dolphin headers * Resolve revolution SDK header resolution issues
Diffstat (limited to 'libs/JSystem/src/JAudio2/JAUSoundTable.cpp')
-rw-r--r--libs/JSystem/src/JAudio2/JAUSoundTable.cpp53
1 files changed, 53 insertions, 0 deletions
diff --git a/libs/JSystem/src/JAudio2/JAUSoundTable.cpp b/libs/JSystem/src/JAudio2/JAUSoundTable.cpp
new file mode 100644
index 0000000000..b398d8c1c0
--- /dev/null
+++ b/libs/JSystem/src/JAudio2/JAUSoundTable.cpp
@@ -0,0 +1,53 @@
+//
+// JAUSoundTable
+//
+
+#include "JSystem/JSystem.h" // IWYU pragma: keep
+
+#include "JSystem/JAudio2/JAUSoundTable.h"
+
+void JAUSoundTable::init(void const* param_0) {
+ if (param_0 != NULL) {
+ field_0x0.init(param_0);
+ } else {
+ field_0x0.reset();
+ }
+}
+
+u8 JAUSoundTable::getTypeID(JAISoundID param_0) const {
+ if (param_0.isAnonymous()) {
+ return 0xff;
+ }
+ JAUSoundTableSection* section = field_0x0.getSection(param_0.id_.info.type.parts.sectionID);
+ if (section == NULL) {
+ return 0xff;
+ }
+ JAUSoundTableGroup* group = field_0x0.getGroup(section, param_0.id_.info.type.parts.groupID);
+ if (group == NULL) {
+ return 0xff;
+ }
+ return group->getTypeID(param_0.id_.info.waveID);
+}
+
+JAUSoundTableItem* JAUSoundTable::getData(JAISoundID param_0) const {
+ if (param_0.isAnonymous()) {
+ return NULL;
+ }
+ JAUSoundTableSection* section = field_0x0.getSection(param_0.id_.info.type.parts.sectionID);
+ if (section == NULL) {
+ return NULL;
+ }
+ JAUSoundTableGroup* group = field_0x0.getGroup(section, param_0.id_.info.type.parts.groupID);
+ if (group == NULL) {
+ return NULL;
+ }
+ return getItem(group, param_0.id_.info.waveID);
+}
+
+void JAUSoundNameTable::init(void const* param_0) {
+ if (param_0 != NULL) {
+ field_0x0.init(param_0);
+ } else {
+ field_0x0.reset();
+ }
+}