JASBNKParser OK, Z2Audience OK (#2929)

This commit is contained in:
LagoLunatic
2025-12-08 00:49:42 -05:00
committed by GitHub
parent 05c8009191
commit 644b4fb96f
9 changed files with 90 additions and 30 deletions
+1 -1
View File
@@ -498,7 +498,7 @@ void JASAramStream::updateChannel(u32 i_callbackType, JASChannel* i_channel,
field_0x0b4 = i_dspChannel->field_0x074 + i_dspChannel->field_0x064;
if (field_0x118 >= field_0x160 - 2) {
JUT_WARN_DEVICE(810, 1, "%s", "buffer under error");
field_0x0ae |= 4;
field_0x0ae |= (u8)4;
}
} else {
if (field_0x12c & 1) {
+4
View File
@@ -305,3 +305,7 @@ JASOscillator::Point const* JASBNKParser::Ver0::getOscTableEndPtr(JASOscillator:
} while (tmp <= 10);
return points;
}
// Fakematch? Why is this here?
template<>
JASMemPool_MultiThreaded<JASChannel> JASPoolAllocObject_MultiThreaded<JASChannel>::memPool_;
+12 -4
View File
@@ -195,11 +195,19 @@ JASGenericMemPool::~JASGenericMemPool() {
JKRSolidHeap* JASDram;
void JASGenericMemPool::newMemPool(u32 size, int param_1) {
// TODO: What is this and Where does it go?
struct TNextOnFreeList {
u8 pad[4];
}; // Size: 0x4
void JASGenericMemPool::newMemPool(u32 n, int param_1) {
JUT_ASSERT(734, n >= sizeof(TNextOnFreeList));
void* runner;
for (int i = 0; i < param_1; i++) {
void* chunk = new (JASDram, 0) u8[size];
*(void**)chunk = field_0x0;
field_0x0 = chunk;
runner = new (JASDram, 0) u8[n];
JUT_ASSERT(739, runner);
*(void**)runner = field_0x0;
field_0x0 = runner;
}
freeMemCount += param_1;
totalMemCount += param_1;
+5 -1
View File
@@ -500,7 +500,11 @@ Z2Audience::Z2Audience() : JASGlobalInstance<Z2Audience>(true), field_0x4(1.0f),
}
Z2Audience::~Z2Audience() {
// JUT_ASSERT(751, !isActive()); // TODO: need to setup rest of JASMemPool stuff
JUT_ASSERT(751, !isActive());
}
bool Z2Audience::isActive() const {
return Z2Audible::getTotalMemCount() != Z2Audible::getFreeMemCount();
}
void Z2Audience::setAudioCamera(f32 (*param_0)[4], Vec& pos, Vec& param_2, f32 param_3,