mirror of
https://github.com/zeldaret/ss
synced 2026-08-19 05:51:59 -04:00
weird bugged float harp mgr functions
This commit is contained in:
@@ -20913,8 +20913,8 @@ fn_803814B0 = .text:0x803814B0; // type:function size:0x8C
|
||||
fn_80381540 = .text:0x80381540; // type:function size:0x1C
|
||||
fn_80381560 = .text:0x80381560; // type:function size:0x14
|
||||
fn_80381580 = .text:0x80381580; // type:function size:0x78
|
||||
fn_80381600 = .text:0x80381600; // type:function size:0xA0
|
||||
fn_803816A0 = .text:0x803816A0; // type:function size:0xC0
|
||||
shiftFloat1__17dSndHarpSongMgr_cFf = .text:0x80381600; // type:function size:0xA0
|
||||
shiftFloat2__17dSndHarpSongMgr_cFf = .text:0x803816A0; // type:function size:0xC0
|
||||
resetFloatArr1__17dSndHarpSongMgr_cFv = .text:0x80381760; // type:function size:0x60
|
||||
resetFloatArr2__17dSndHarpSongMgr_cFv = .text:0x803817C0; // type:function size:0x80
|
||||
fn_80381840 = .text:0x80381840; // type:function size:0x28
|
||||
|
||||
@@ -24,7 +24,8 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
void shiftFloat1(f32 val);
|
||||
void shiftFloat2(f32 val);
|
||||
void resetFloatArr1();
|
||||
void resetFloatArr2();
|
||||
|
||||
|
||||
@@ -73,6 +73,42 @@ void dSndHarpSongMgr_c::setupState0() {
|
||||
mDataLoaded = true;
|
||||
}
|
||||
|
||||
void dSndHarpSongMgr_c::shiftFloat1(f32 val) {
|
||||
if (val < 0.0f) {
|
||||
val = 0.0f;
|
||||
}
|
||||
if (val > 150.0f) {
|
||||
val = 150.0f;
|
||||
}
|
||||
|
||||
// @bug (?) this loop ends up copying the value of field_0x07C[0]
|
||||
// to all array elements when surely the intention was to
|
||||
// move each of them back by one position. TODO: are array entries
|
||||
// other than [0] read anywhere?
|
||||
for (int i = 1; i < 300; i++) {
|
||||
field_0x07C[i] = field_0x07C[i - 1];
|
||||
}
|
||||
field_0x07C[0] = val;
|
||||
}
|
||||
|
||||
void dSndHarpSongMgr_c::shiftFloat2(f32 val) {
|
||||
if (val < 0.0f) {
|
||||
val = 0.0f;
|
||||
}
|
||||
if (val > 240.0f) {
|
||||
val = 240.0f;
|
||||
}
|
||||
|
||||
// @bug (?) this loop ends up copying the value of field_0x52C[0]
|
||||
// to all array elements when surely the intention was to
|
||||
// move each of them back by one position. TODO: are array entries
|
||||
// other than [0] read anywhere?
|
||||
for (int i = 1; i < 30; i++) {
|
||||
field_0x52C[i] = field_0x52C[i - 1];
|
||||
}
|
||||
field_0x52C[0] = val;
|
||||
}
|
||||
|
||||
void dSndHarpSongMgr_c::resetFloatArr1() {
|
||||
for (int i = 0; i < 300; i++) {
|
||||
field_0x07C[i] = 0.0f;
|
||||
|
||||
Reference in New Issue
Block a user