Skip to content

Commit

Permalink
Random mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
marysaka committed Nov 1, 2024
1 parent b518cb3 commit b9870a8
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/th06_102h.exe/MidiOutput/MidiOutput.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ MidiOutput * __thiscall th06::MidiOutput::MidiOutput(MidiOutput *this)
MidiDevice::MidiDevice(&this->midiOutDev);
this->tracks = (MidiTrack *)0x0;
this->divisons = 0;
this->unk120 = 0;
this->tempo = 0;
this->num_tracks = 0;
this->unk2c4 = 0;
this->fadeOutVolumeMultiplier = 0.0;
Expand Down
4 changes: 2 additions & 2 deletions src/th06_102h.exe/MidiOutput/OnTimerElapsed.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ void __thiscall th06::MidiOutput::OnTimerElapsed(MidiOutput *this)
uVar5 = __allmul(*(undefined4 *)&this->unk128,*(undefined4 *)((int)&this->unk128 + 4),
this->divisons,this->divisons >> 0x1f);
uVar5 = __allmul(uVar5,1000,0);
uVar5 = __aulldiv(uVar5,this->unk120,this->unk120 >> 0x1f);
uVar5 = __aulldiv(uVar5,this->tempo,this->tempo >> 0x1f);
local_14 = *(uint *)&this->unk130 + (uint)uVar5;
local_10 = *(int *)((int)&this->unk130 + 4) + (int)((ulonglong)uVar5 >> 0x20) +
(uint)CARRY4(*(uint *)&this->unk130,(uint)uVar5);
Expand Down Expand Up @@ -56,7 +56,7 @@ void __thiscall th06::MidiOutput::OnTimerElapsed(MidiOutput *this)
uVar5 = __allmul(*(undefined4 *)&this->unk128,*(undefined4 *)((int)&this->unk128 + 4),
this->divisons,this->divisons >> 0x1f);
uVar5 = __allmul(uVar5,1000,0);
uVar5 = __aulldiv(uVar5,this->unk120,this->unk120 >> 0x1f);
uVar5 = __aulldiv(uVar5,this->tempo,this->tempo >> 0x1f);
local_14 = *(uint *)&this->unk130 + (uint)uVar5;
local_10 = *(int *)((int)&this->unk130 + 4) + (int)((ulonglong)uVar5 >> 0x20) +
(uint)CARRY4(*(uint *)&this->unk130,(uint)uVar5);
Expand Down
2 changes: 1 addition & 1 deletion src/th06_102h.exe/MidiOutput/ParseFile.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ ZunResult __thiscall th06::MidiOutput::ParseFile(MidiOutput *this,int fileIdx)
}
currentCursor = (undefined *)((int)(currentCursor + 8) + trackLength);
}
this->unk120 = 1000000;
this->tempo = 1000000;
result = ZUN_SUCCESS;
}
__security_check_cookie(cookie);
Expand Down
10 changes: 5 additions & 5 deletions src/th06_102h.exe/MidiOutput/ProcessMsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,20 +108,20 @@ void __thiscall th06::MidiOutput::ProcessMsg(MidiOutput *this,MidiTrack *param_1
uVar9 = __allmul(*(undefined4 *)&this->unk128,*(undefined4 *)((int)&this->unk128 + 4),
this->divisons,this->divisons >> 0x1f);
uVar9 = __allmul(uVar9,1000,0);
uVar9 = __aulldiv(uVar9,this->unk120,this->unk120 >> 0x1f);
uVar9 = __aulldiv(uVar9,this->tempo,this->tempo >> 0x1f);
uVar4 = *(uint *)&this->unk130;
iVar7 = *(int *)((int)&this->unk130 + 4);
*(uint *)&this->unk130 = uVar4 + (uint)uVar9;
*(uint *)((int)&this->unk130 + 4) =
iVar7 + (int)((ulonglong)uVar9 >> 0x20) + (uint)CARRY4(uVar4,(uint)uVar9);
*(undefined4 *)&this->unk128 = 0;
*(undefined4 *)((int)&this->unk128 + 4) = 0;
this->unk120 = 0;
this->tempo = 0;
arg2 = arg2 & 0xff;
uStack_9 = 0;
while (CONCAT13(uStack_9,arg2._1_3_) < iVar6) {
/* WARNING: Load size is inaccurate */
this->unk120 = this->unk120 * 0x100 + (uint)*param_1->curTrackDataCursor + this->unk120;
this->tempo = this->tempo * 0x100 + (uint)*param_1->curTrackDataCursor + this->tempo;
param_1->curTrackDataCursor = (void *)((int)param_1->curTrackDataCursor + 1);
iVar7 = CONCAT13(uStack_9,arg2._1_3_) + 1;
arg2._1_3_ = (undefined3)iVar7;
Expand Down Expand Up @@ -173,7 +173,7 @@ void __thiscall th06::MidiOutput::ProcessMsg(MidiOutput *this,MidiTrack *param_1
local_2c = local_2c + 1;
uStack_9 = (undefined)((uint)iVar6 >> 0x18);
}
this->unk2ec = this->unk120;
this->unk2ec = this->tempo;
this->unk2f0 = *(uint *)&this->unk128;
this->unk2f4 = *(uint *)((int)&this->unk128 + 4);
this->unk2f8 = *(uint *)&this->unk130;
Expand All @@ -192,7 +192,7 @@ void __thiscall th06::MidiOutput::ProcessMsg(MidiOutput *this,MidiTrack *param_1
local_30 = local_30 + 1;
uStack_9 = (undefined)((uint)iVar6 >> 0x18);
}
this->unk120 = this->unk2ec;
this->tempo = this->unk2ec;
*(uint *)&this->unk128 = this->unk2f0;
*(uint *)((int)&this->unk128 + 4) = this->unk2f4;
*(uint *)&this->unk130 = this->unk2f8;
Expand Down
2 changes: 1 addition & 1 deletion src/th06_102h.exe/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ struct MidiOutput {
int num_tracks;
undefined4 format;
int divisons;
int unk120;
int tempo;
undefined4 unk124;
double unk128;
double unk130;
Expand Down
2 changes: 1 addition & 1 deletion th06_102h.exe.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
289
290

0 comments on commit b9870a8

Please sign in to comment.