mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-31 07:45:48 -04:00
project cleanup (#2895)
* some wii OS fixes * remove old dol2asm comments * remove dol2asm.h * remove function address comments * normalize ATTRIBUTE_ALIGN usage * DECL_WEAK macro * fix gcc attribute weak macro * wrap more mwcc specific things in ifdefs * fixes * fix revo sdk version flags * fixes
This commit is contained in:
@@ -1,8 +1,3 @@
|
||||
//
|
||||
// Generated By: dol2asm
|
||||
// Translation Unit: JASChannel
|
||||
//
|
||||
|
||||
#include "JSystem/JSystem.h" // IWYU pragma: keep
|
||||
|
||||
#include "JSystem/JAudio2/JASChannel.h"
|
||||
@@ -14,21 +9,14 @@
|
||||
#include "JSystem/JMath/JMATrigonometric.h"
|
||||
#include "JSystem/JGeometry.h"
|
||||
|
||||
/* 80431B90-80431BB0 05E8B0 0020+00 2/2 0/0 0/0 .bss sBankDisposeMsgQ__10JASChannel */
|
||||
OSMessageQueue JASChannel::sBankDisposeMsgQ;
|
||||
|
||||
/* 80431BB0-80431BF0 05E8D0 0040+00 1/1 0/0 0/0 .bss sBankDisposeMsg__10JASChannel */
|
||||
OSMessage JASChannel::sBankDisposeMsg[16];
|
||||
|
||||
/* 80431BF0-80431C30 05E910 0040+00 2/2 0/3 0/0 .bss sBankDisposeList__10JASChannel */
|
||||
OSMessage JASChannel::sBankDisposeList[16];
|
||||
|
||||
/* 80451298-804512A0 000798 0004+04 3/3 0/0 0/0 .sbss sBankDisposeListSize__10JASChannel
|
||||
*/
|
||||
int JASChannel::sBankDisposeListSize;
|
||||
|
||||
/* 8029A800-8029A918 295140 0118+00 0/0 3/3 0/0 .text
|
||||
* __ct__10JASChannelFPFUlP10JASChannelPQ26JASDsp8TChannelPv_vPv */
|
||||
JASChannel::JASChannel(Callback i_callback, void* i_callbackData) :
|
||||
mStatus(STATUS_INACTIVE),
|
||||
mDspCh(NULL),
|
||||
@@ -55,7 +43,6 @@ JASChannel::JASChannel(Callback i_callback, void* i_callbackData) :
|
||||
mPauseFlag = false;
|
||||
}
|
||||
|
||||
/* 8029A918-8029A9F0 295258 00D8+00 5/5 0/0 0/0 .text __dt__10JASChannelFv */
|
||||
JASChannel::~JASChannel() {
|
||||
if (mDspCh != NULL) {
|
||||
mDspCh->drop();
|
||||
@@ -66,7 +53,6 @@ JASChannel::~JASChannel() {
|
||||
}
|
||||
|
||||
|
||||
/* 8029A9F0-8029AA60 295330 0070+00 0/0 2/2 0/0 .text play__10JASChannelFv */
|
||||
int JASChannel::play() {
|
||||
JASDSPChannel* channel = JASDSPChannel::alloc(JSULoByte(mPriority), dspUpdateCallback, this);
|
||||
if (channel == NULL) {
|
||||
@@ -79,7 +65,6 @@ int JASChannel::play() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 8029AA60-8029AAD0 2953A0 0070+00 0/0 1/1 0/0 .text playForce__10JASChannelFv */
|
||||
int JASChannel::playForce() {
|
||||
JASDSPChannel* channel = JASDSPChannel::allocForce(JSULoByte(mPriority),
|
||||
dspUpdateCallback, this);
|
||||
@@ -93,7 +78,6 @@ int JASChannel::playForce() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 8029AAD0-8029AB64 295410 0094+00 0/0 4/4 0/0 .text release__10JASChannelFUs */
|
||||
void JASChannel::release(u16 i_directRelease) {
|
||||
if (mStatus == STATUS_ACTIVE) {
|
||||
if (i_directRelease != 0) {
|
||||
@@ -109,32 +93,23 @@ void JASChannel::release(u16 i_directRelease) {
|
||||
}
|
||||
}
|
||||
|
||||
/* 8029AB64-8029AB98 2954A4 0034+00 0/0 4/4 0/0 .text
|
||||
* setOscInit__10JASChannelFUlPCQ213JASOscillator4Data */
|
||||
void JASChannel::setOscInit(u32 i_index, JASOscillator::Data const* i_data) {
|
||||
mOscillators[i_index].initStart(i_data);
|
||||
}
|
||||
|
||||
/* 8029AB98-8029ABA8 2954D8 0010+00 0/0 2/2 0/0 .text setMixConfig__10JASChannelFUlUs */
|
||||
void JASChannel::setMixConfig(u32 i_index, u16 i_config) {
|
||||
mMixConfig[i_index].whole = i_config;
|
||||
}
|
||||
|
||||
/* 8029ABA8-8029ABC0 2954E8 0018+00 1/1 0/0 0/0 .text
|
||||
* calcEffect__10JASChannelFPCQ210JASChannel9PanVector */
|
||||
f32 JASChannel::calcEffect(JASChannel::PanVector const* i_vector) {
|
||||
return i_vector->mSound + i_vector->mEffect + i_vector->mChannel;
|
||||
}
|
||||
|
||||
/* 8029ABC0-8029ABEC 295500 002C+00 1/1 0/0 0/0 .text
|
||||
* calcPan__10JASChannelFPCQ210JASChannel9PanVector */
|
||||
f32 JASChannel::calcPan(JASChannel::PanVector const* i_vector) {
|
||||
return 0.5f + (i_vector->mSound - 0.5f) + (i_vector->mEffect - 0.5f)
|
||||
+ (i_vector->mChannel - 0.5f);
|
||||
}
|
||||
|
||||
/* 8029ABEC-8029ACD4 29552C 00E8+00 3/2 0/0 0/0 .text
|
||||
* effectOsc__10JASChannelFUlPQ213JASOscillator12EffectParams */
|
||||
void JASChannel::effectOsc(u32 i_index, JASOscillator::EffectParams* i_params) {
|
||||
f32 value = mOscillators[i_index].getValue();
|
||||
switch (mOscillators[i_index].getTarget()) {
|
||||
@@ -163,8 +138,6 @@ void JASChannel::effectOsc(u32 i_index, JASOscillator::EffectParams* i_params) {
|
||||
}
|
||||
}
|
||||
|
||||
/* 8029ACD4-8029AD38 295614 0064+00 0/0 1/1 0/0 .text setKeySweepTarget__10JASChannelFlUl
|
||||
*/
|
||||
void JASChannel::setKeySweepTarget(s32 i_target, u32 i_count) {
|
||||
if (i_count == 0) {
|
||||
mKeySweep = i_target;
|
||||
@@ -175,8 +148,6 @@ void JASChannel::setKeySweepTarget(s32 i_target, u32 i_count) {
|
||||
mKeySweepCount = i_count;
|
||||
}
|
||||
|
||||
/* 8029AD38-8029AF78 295678 0240+00 2/2 0/0 0/0 .text
|
||||
* updateEffectorParam__10JASChannelFPQ26JASDsp8TChannelPUsRCQ213JASOscillator12EffectParams */
|
||||
void JASChannel::updateEffectorParam(JASDsp::TChannel* i_channel, u16* i_mixerVolume,
|
||||
JASOscillator::EffectParams const& i_params) {
|
||||
PanVector pan_vector, fxmix_vector, dolby_vector;
|
||||
@@ -223,8 +194,6 @@ void JASChannel::updateEffectorParam(JASDsp::TChannel* i_channel, u16* i_mixerVo
|
||||
}
|
||||
}
|
||||
|
||||
/* 8029AF78-8029B004 2958B8 008C+00 2/2 0/0 0/0 .text
|
||||
* dspUpdateCallback__10JASChannelFUlPQ26JASDsp8TChannelPv */
|
||||
s32 JASChannel::dspUpdateCallback(u32 i_type, JASDsp::TChannel* i_channel, void* i_this) {
|
||||
JASChannel* _this = static_cast<JASChannel*>(i_this);
|
||||
switch (i_type) {
|
||||
@@ -242,8 +211,6 @@ s32 JASChannel::dspUpdateCallback(u32 i_type, JASDsp::TChannel* i_channel, void*
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 8029B004-8029B324 295944 0320+00 1/1 0/0 0/0 .text
|
||||
* initialUpdateDSPChannel__10JASChannelFPQ26JASDsp8TChannel */
|
||||
s32 JASChannel::initialUpdateDSPChannel(JASDsp::TChannel* i_channel) {
|
||||
if (isDolbyMode()) {
|
||||
i_channel->initAutoMixer();
|
||||
@@ -322,8 +289,6 @@ s32 JASChannel::initialUpdateDSPChannel(JASDsp::TChannel* i_channel) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 8029B324-8029B6A0 295C64 037C+00 1/1 0/0 0/0 .text
|
||||
* updateDSPChannel__10JASChannelFPQ26JASDsp8TChannel */
|
||||
s32 JASChannel::updateDSPChannel(JASDsp::TChannel* i_channel) {
|
||||
if (mCallback != NULL) {
|
||||
mCallback(CB_PLAY, this, i_channel, mCallbackData);
|
||||
@@ -398,8 +363,6 @@ s32 JASChannel::updateDSPChannel(JASDsp::TChannel* i_channel) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 8029B6A0-8029B7D8 295FE0 0138+00 1/1 0/0 0/0 .text
|
||||
* updateAutoMixer__10JASChannelFPQ26JASDsp8TChannelffff */
|
||||
void JASChannel::updateAutoMixer(JASDsp::TChannel* i_channel, f32 param_1, f32 param_2,
|
||||
f32 param_3, f32 param_4) {
|
||||
if (JASDriver::getOutputMode() == 0) {
|
||||
@@ -410,8 +373,6 @@ void JASChannel::updateAutoMixer(JASDsp::TChannel* i_channel, f32 param_1, f32 p
|
||||
param_4 * 127.5f, param_3 * 127.5f, 0);
|
||||
}
|
||||
|
||||
/* 8029B7D8-8029BBFC 296118 0424+00 3/1 0/0 0/0 .text updateMixer__10JASChannelFffffPUs
|
||||
*/
|
||||
void JASChannel::updateMixer(f32 i_volume, f32 i_pan, f32 i_fxmix, f32 i_dolby, u16* i_volumeOut) {
|
||||
for (u32 i = 0; i < 6; i++) {
|
||||
f32 volume = i_volume;
|
||||
@@ -505,19 +466,16 @@ void JASChannel::updateMixer(f32 i_volume, f32 i_pan, f32 i_fxmix, f32 i_dolby,
|
||||
}
|
||||
}
|
||||
|
||||
/* 8029BBFC-8029BC0C 29653C 0010+00 0/0 3/3 0/0 .text free__10JASChannelFv */
|
||||
void JASChannel::free() {
|
||||
mCallback = NULL;
|
||||
mCallbackData = NULL;
|
||||
}
|
||||
|
||||
/* 8029BC0C-8029BC48 29654C 003C+00 0/0 1/1 0/0 .text initBankDisposeMsgQueue__10JASChannelFv */
|
||||
void JASChannel::initBankDisposeMsgQueue() {
|
||||
OSInitMessageQueue(&sBankDisposeMsgQ, sBankDisposeMsg, 0x10);
|
||||
sBankDisposeListSize = 0;
|
||||
}
|
||||
|
||||
/* 8029BC48-8029BCC0 296588 0078+00 0/0 1/1 0/0 .text receiveBankDisposeMsg__10JASChannelFv */
|
||||
void JASChannel::receiveBankDisposeMsg() {
|
||||
OSMessage msg;
|
||||
for (sBankDisposeListSize = 0;
|
||||
@@ -528,8 +486,6 @@ void JASChannel::receiveBankDisposeMsg() {
|
||||
}
|
||||
}
|
||||
|
||||
/* 8029BCC0-8029BD14 296600 0054+00 2/2 0/0 0/0 .text checkBankDispose__10JASChannelCFv
|
||||
*/
|
||||
bool JASChannel::checkBankDispose() const {
|
||||
if (mBankDisposeID == NULL) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user