mirror of
https://github.com/zeldaret/tp
synced 2026-08-21 22:41:04 -04:00
work on JASTrack (#2065)
This commit is contained in:
@@ -138,8 +138,9 @@ asm JASChannel* JASBank::noteOn(JASBank const* param_0, int param_1, u8 param_2,
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 8039B190-8039B19C 0277F0 000C+00 1/0 0/0 0/0 .rodata OSC_RELEASE_TABLE$260 */
|
||||
SECTION_RODATA static s16 const OSC_RELEASE_TABLE[6] = {
|
||||
0x0001, 0x000A, 0x0000, 0x000F, 0x0000, 0x0000,
|
||||
SECTION_RODATA static JASOscillator::Point const OSC_RELEASE_TABLE[2] = {
|
||||
{0x0001, 0x000A, 0x0000},
|
||||
{0x000F, 0x0000, 0x0000},
|
||||
};
|
||||
COMPILER_STRIP_GATE(0x8039B190, &OSC_RELEASE_TABLE);
|
||||
|
||||
|
||||
@@ -77,9 +77,9 @@ bool JASDrumSet::getParam(int param_0, int param_1, JASInstParam* param_2) const
|
||||
param_2->field_0x18 = perc->field_0xc;
|
||||
osc._00 = 0;
|
||||
osc._04 = 1.0f;
|
||||
osc._08 = NULL;
|
||||
osc.mTable = NULL;
|
||||
osc._0C = NULL;
|
||||
osc._10 = 1.0f;
|
||||
osc.mScale = 1.0f;
|
||||
osc._14 = 0.0f;
|
||||
|
||||
if (data_80451274[0] == 0) {
|
||||
|
||||
@@ -52,14 +52,14 @@ void JASOscillator::initStart(JASOscillator::Data const* data) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mData->_08 == NULL) {
|
||||
if (mData->mTable == NULL) {
|
||||
_1C = 2;
|
||||
_08 = 1.0f;
|
||||
return;
|
||||
}
|
||||
|
||||
_10 = mData->_08[2] / 32768.0f;
|
||||
_18 = mData->_08[0];
|
||||
_10 = mData->mTable[0]._4 / 32768.0f;
|
||||
_18 = mData->mTable[0]._0;
|
||||
_1C = 1;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ void JASOscillator::incCounter(f32 param_0) {
|
||||
|
||||
/* 8029BFC8-8029BFE4 296908 001C+00 0/0 1/1 0/0 .text getValue__13JASOscillatorCFv */
|
||||
f32 JASOscillator::getValue() const {
|
||||
return _08 * mData->_10 + mData->_14;
|
||||
return _08 * mData->mScale + mData->_14;
|
||||
}
|
||||
|
||||
/* 8029BFE4-8029C0E0 296924 00FC+00 0/0 1/1 0/0 .text release__13JASOscillatorFv */
|
||||
@@ -100,12 +100,12 @@ void JASOscillator::release() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mData->_08 != mData->_0C) {
|
||||
if (mData->mTable != mData->_0C) {
|
||||
_04 = 0.0f;
|
||||
_0C = _08;
|
||||
_10 = mData->_0C[2] / 32768.0f;
|
||||
_10 = mData->_0C[0]._4 / 32768.0f;
|
||||
_14 = 0;
|
||||
_18 = mData->_0C[0];
|
||||
_18 = mData->_0C[0]._0;
|
||||
}
|
||||
|
||||
_1C = 3;
|
||||
@@ -127,9 +127,9 @@ void JASOscillator::update() {
|
||||
|
||||
if (_1C == 2) return;
|
||||
|
||||
const short* psVar1;
|
||||
const Point* psVar1;
|
||||
if (_1C == 1) {
|
||||
psVar1 = mData->_08;
|
||||
psVar1 = mData->mTable;
|
||||
} else {
|
||||
psVar1 = mData->_0C;
|
||||
}
|
||||
@@ -139,12 +139,12 @@ void JASOscillator::update() {
|
||||
return;
|
||||
}
|
||||
|
||||
while (_04 >= psVar1[_14 * 3 + 1]) {
|
||||
_04 -= psVar1[_14 * 3 + 1];
|
||||
while (_04 >= psVar1[_14]._2) {
|
||||
_04 -= psVar1[_14]._2;
|
||||
_08 = _10;
|
||||
_14++;
|
||||
_0C = _08;
|
||||
const s16* ps = &psVar1[_14 * 3];
|
||||
const s16* ps = &psVar1[_14]._0;
|
||||
switch(ps[0]) {
|
||||
case 0xf:
|
||||
_1C = 0;
|
||||
@@ -162,7 +162,7 @@ void JASOscillator::update() {
|
||||
}
|
||||
}
|
||||
|
||||
updateCurrentValue(psVar1[_14 * 3 + 1]);
|
||||
updateCurrentValue(psVar1[_14]._2);
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
|
||||
+785
-333
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user