// // Generated By: dol2asm // Translation Unit: JAISe // #include "JSystem/JAudio2/JAISe.h" #include "JSystem/JAudio2/JAIAudience.h" #include "JSystem/JAudio2/JAISeMgr.h" #include "JSystem/JSupport/JSUList.h" #include "dolphin/types.h" // // Types: // // // Forward References: // // // External References: // // // Declarations: // /* 8029F03C-8029F0F8 29997C 00BC+00 0/0 1/1 0/0 .text * __ct__5JAISeFP8JAISeMgrP27JAISoundStrategyMgr<5JAISe>Ul */ JAISe::JAISe(JAISeMgr* param_0, JAISoundStrategyMgr* param_1, u32 param_2) : JSULink(this) { inner_.mSoundStrategyMgr = param_1; inner_.seMgr = param_0; inner_.mProperPriority = param_2; } /* 8029F0F8-8029F214 299A38 011C+00 1/1 0/0 0/0 .text mixOut___5JAISeFRC14JASSoundParams */ void JAISe::mixOut_(JASSoundParams const& param_0) { inner_.track.setTempoRate(inner_.mTempoMgr.getTempo()); JASSoundParams stackParams; params.mixOutAll(param_0, &stackParams, fader.getIntensity()); if (inner_.field_0x278) { inner_.field_0x278->virtual4(this, stackParams); } if (audible_) { int maxChannels = audience_->getMaxChannels(); for (int i = 0; i < maxChannels; i++) { audience_->mixChannelOut(stackParams, audible_, i); } } else { inner_.mSoundParams = stackParams; } } /* 8029F214-8029F250 299B54 003C+00 1/1 0/0 0/0 .text stopTrack___5JAISeFv */ void JAISe::stopTrack_() { switch (inner_.track.getStatus()) { case 0: break; case 1: inner_.track.stopSeq(); break; case 2: break; } } /* 8029F250-8029F304 299B90 00B4+00 1/1 0/0 0/0 .text startTrack___5JAISeFRC14JASSoundParams */ void JAISe::startTrack_(JASSoundParams const& param_0) { if (inner_.track.getStatus() == 2) { inner_.track.init(); } if (audible_) { initTrack_JAISound_(&inner_.track); } else { params.mixOutAll(param_0, &inner_.mSoundParams, fader.getIntensity()); inner_.track.setChannelMgrCount(1); inner_.track.assignExtBuffer(0, &inner_.mSoundParams); } inner_.field_0x26c = 1; inner_.track.setSeqData(inner_.mSeqData.field_0x0, inner_.mSeqData.field_0x4); inner_.track.startSeq(); } /* 8029F304-8029F4CC 299C44 01C8+00 0/0 1/1 0/0 .text * JAISeCategoryMgr_mixOut___5JAISeFbRC14JASSoundParams16JAISoundActivity */ void JAISe::JAISeCategoryMgr_mixOut_(bool param_0, JASSoundParams const& param_1, JAISoundActivity param_2) { mixOut_(param_1); if (isStopping()) { stopTrack_(); } else if (param_0) { if (status_.isPlaying()) { if (inner_.field_0x26c) { switch (inner_.track.getStatus()) { case 2: if (status_.field_0x1.flags.flag1) { startTrack_(param_1); } else { stop_JAISound_(); } break; case 1: inner_.track.pause(status_.isPaused() || param_2.field_0x0.flags.flag2); inner_.track.mute(status_.isMute() || param_2.field_0x0.flags.flag1); } } else { startTrack_(param_1); } } } else if (status_.field_0x1.flags.flag1) { if (status_.field_0x1.flags.flag3) { inner_.track.pause(true); } else { stopTrack_(); } } else { stopTrack_(); stop_JAISound_(); } } /* 8029F4CC-8029F5C8 299E0C 00FC+00 0/0 1/1 0/0 .text JAISeCategoryMgr_calc___5JAISeFv */ void JAISe::JAISeCategoryMgr_calc_() { prepare_(); if (calc_JAISound_()) { inner_.mTempoMgr.calc(); if (inner_.field_0x278) { inner_.field_0x278->virtual3(this); } } if (isStopping() || mPriority == -1) { inner_.mPriority = -1; } else { inner_.mPriority = inner_.mProperPriority + mPriority; } } /* 8029F5C8-8029F650 299F08 0088+00 2/1 0/0 0/0 .text JAISound_tryDie___5JAISeFv */ bool JAISe::JAISound_tryDie_() { switch (inner_.track.getStatus()) { case 0: case 2: if (inner_.field_0x278) { inner_.mSoundStrategyMgr->virtual4(inner_.field_0x278); inner_.field_0x278 = NULL; } die_JAISound_(); return true; case 1: break; } return false; } /* 8029F650-8029F6D8 299F90 0088+00 0/0 1/1 0/0 .text * JAISeMgr_startID___5JAISeF10JAISoundIDPCQ29JGeometry8TVec3P11JAIAudience */ void JAISe::JAISeMgr_startID_(JAISoundID param_0, JGeometry::TVec3 const* param_1, JAIAudience* param_2) { start_JAISound_(param_0, param_1, param_2); inner_.field_0x26c = 0; if (inner_.mSoundStrategyMgr) { inner_.field_0x278 = inner_.mSoundStrategyMgr->virtual3(param_0); } else { inner_.field_0x278 = NULL; } } /* 8029F6D8-8029F6E0 29A018 0008+00 2/1 0/0 0/0 .text getNumChild__5JAISeCFv */ s32 JAISe::getNumChild() const { return 0; } /* 8029F6E0-8029F6E8 29A020 0008+00 2/1 0/0 0/0 .text getChild__5JAISeFi */ JAISoundChild* JAISe::getChild(int param_0) { return NULL; } /* 8029F6E8-8029F6EC 29A028 0004+00 2/1 0/0 0/0 .text releaseChild__5JAISeFi */ void JAISe::releaseChild(int param_0) { /* empty function */ } /* 8029F6EC-8029F78C 29A02C 00A0+00 1/1 0/0 0/0 .text prepare_getSeqData___5JAISeFv */ bool JAISe::prepare_getSeqData_() { switch (inner_.seMgr->getSeqDataMgr()->getSeqData(soundID, &inner_.mSeqData)) { case 0: status_.state.unk = 2; return false; case 1: increasePrepareCount_JAISound_(); return false; case 2: return true; } return false; } /* 8029F78C-8029F84C 29A0CC 00C0+00 1/1 0/0 0/0 .text prepare___5JAISeFv */ void JAISe::prepare_() { switch (status_.state.unk) { case 6: break; case 2: stop_JAISound_(); break; case 0: if (prepare_getSeqData_()) { status_.state.unk = 5; } break; case 1: if (prepare_getSeqData_()) { status_.state.unk = 3; } break; case 4: status_.state.unk = 5; break; case 3: case 5: break; } } /* 8029F84C-8029F854 29A18C 0008+00 2/1 0/0 0/0 .text getTrack__5JAISeFv */ JASTrack* JAISe::getTrack() { return &inner_.track; } /* 8029F854-8029F864 29A194 0010+00 2/1 0/0 0/0 .text getChildTrack__5JAISeFi */ JASTrack* JAISe::getChildTrack(int param_0) { return inner_.track.getChild(param_0); } /* 8029F864-8029F868 29A1A4 0004+00 2/1 0/0 0/0 .text asSe__5JAISeFv */ JAISe* JAISe::asSe() { return this; } /* 8029F868-8029F870 29A1A8 0008+00 2/1 0/0 0/0 .text getTempoMgr__5JAISeFv */ JAITempoMgr* JAISe::getTempoMgr() { return &inner_.mTempoMgr; }