mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-24 23:53:12 -04:00
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
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
#include "JSystem/JSystem.h" // IWYU pragma: keep
|
||||
|
||||
#include "JSystem/JAudio2/JASTrackPort.h"
|
||||
|
||||
void JASTrackPort::init() {
|
||||
for (int i = 0; i < 16; i++) {
|
||||
field_0x4[i] = 0;
|
||||
}
|
||||
field_0x0 = 0;
|
||||
field_0x2 = 0;
|
||||
}
|
||||
|
||||
u16 JASTrackPort::readImport(u32 port_num) {
|
||||
JUT_ASSERT(27, port_num < MAX_PORTS);
|
||||
field_0x0 = field_0x0 & ~(1 << port_num);
|
||||
return field_0x4[port_num];
|
||||
}
|
||||
|
||||
u16 JASTrackPort::readExport(u32 port_num) {
|
||||
JUT_ASSERT(34, port_num < MAX_PORTS);
|
||||
field_0x2 = field_0x2 & ~(1 << port_num);
|
||||
return field_0x4[port_num];
|
||||
}
|
||||
|
||||
void JASTrackPort::writeImport(u32 port_num, u16 param_1) {
|
||||
JUT_ASSERT(41, port_num < MAX_PORTS);
|
||||
field_0x0 = field_0x0 | (1 << port_num);
|
||||
field_0x4[port_num] = param_1;
|
||||
}
|
||||
|
||||
void JASTrackPort::writeExport(u32 port_num, u16 param_1) {
|
||||
JUT_ASSERT(47, port_num < MAX_PORTS);
|
||||
field_0x2 = field_0x2 | (1 << port_num);
|
||||
field_0x4[port_num] = param_1;
|
||||
}
|
||||
|
||||
u32 JASTrackPort::checkImport(u32 param_0) const {
|
||||
return field_0x0 & 1 << param_0 ? 1 : 0;
|
||||
}
|
||||
|
||||
u32 JASTrackPort::checkExport(u32 param_0) const {
|
||||
return field_0x2 & 1 << param_0 ? 1 : 0;
|
||||
}
|
||||
Reference in New Issue
Block a user