Skip to content

Commit

Permalink
Correct calling convention in ResultScreen
Browse files Browse the repository at this point in the history
  • Loading branch information
Renzo904 committed Oct 30, 2024
1 parent 9338d65 commit 37ad564
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 20 deletions.
24 changes: 12 additions & 12 deletions src/th06_102h.exe/ResultScreen/DeletedCallback.c
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@

undefined4 __thiscall th06::ResultScreen::DeletedCallback(ResultScreen *this,ResultScreen *param_1)
ZunResult th06::ResultScreen::DeletedCallback(ResultScreen *resultScreen)

{
int character;
int difficulty;

if (param_1->scoredat != (ScoreDat *)0x0) {
WriteScore(param_1);
ReleaseScoreDat(param_1->scoredat);
if (resultScreen->scoredat != (ScoreDat *)0x0) {
WriteScore(resultScreen);
ReleaseScoreDat(resultScreen->scoredat);
}
param_1->scoredat = (ScoreDat *)0x0;
resultScreen->scoredat = (ScoreDat *)0x0;
for (difficulty = 0; difficulty < 5; difficulty = difficulty + 1) {
for (character = 0; character < 4; character = character + 1) {
FreeScore(param_1,difficulty,character);
FreeScore(resultScreen,difficulty,character);
}
}
AnmManager::ReleaseAnm(g_AnmManager,0x25);
AnmManager::ReleaseAnm(g_AnmManager,0x26);
AnmManager::ReleaseAnm(g_AnmManager,0x27);
AnmManager::ReleaseAnm(g_AnmManager,0x28);
AnmManager::ReleaseSurface(g_AnmManager,0);
Chain::Cut(&g_Chain,param_1->draw_chain);
param_1->draw_chain = (ChainElem *)0x0;
if (param_1 != (ResultScreen *)0x0) {
_free(param_1->scoredat);
operator_delete(param_1);
Chain::Cut(&g_Chain,resultScreen->draw_chain);
resultScreen->draw_chain = (ChainElem *)0x0;
if (resultScreen != (ResultScreen *)0x0) {
_free(resultScreen->scoredat);
operator_delete(resultScreen);
}
return 0;
return ZUN_SUCCESS;
}

7 changes: 4 additions & 3 deletions src/th06_102h.exe/ResultScreen/OnDraw.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@

/* WARNING: Restarted to delay deadcode elimination for space: stack */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */

void th06::ResultScreen::OnDraw(ResultScreen *param_1)
ChainCallbackResult th06::ResultScreen::OnDraw(ResultScreen *param_1)

{
D3DXVECTOR3 *pDVar1;
float fVar2;
ChainCallbackResult CVar3;
uint unaff_retaddr;
int local_d0;
int local_8c;
Expand Down Expand Up @@ -325,7 +325,8 @@ void th06::ResultScreen::OnDraw(ResultScreen *param_1)
}
g_AsciiManager.color = 0xffffffff;
DrawFinalStats(param_1);
CVar3 = CHAIN_CALLBACK_RESULT_CONTINUE;
__security_check_cookie(local_18 ^ unaff_retaddr);
return;
return CVar3;
}

8 changes: 4 additions & 4 deletions src/th06_102h.exe/ResultScreen/OnUpdate.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

undefined4 __thiscall th06::ResultScreen::OnUpdate(ResultScreen *this,ResultScreen *result_screen)
ChainCallbackResult th06::ResultScreen::OnUpdate(ResultScreen *result_screen)

{
int iVar1;
Expand Down Expand Up @@ -110,7 +110,7 @@ undefined4 __thiscall th06::ResultScreen::OnUpdate(ResultScreen *this,ResultScre
if (iVar1 == 2) {
if (0x3b < result_screen->field1_0x4) {
g_Supervisor.curState = 1;
return 0;
return CHAIN_CALLBACK_RESULT_CONTINUE_AND_REMOVE_JOB;
}
}
else if (2 < iVar1) {
Expand Down Expand Up @@ -292,7 +292,7 @@ undefined4 __thiscall th06::ResultScreen::OnUpdate(ResultScreen *this,ResultScre
}
else if (iVar1 == 0x11) {
g_Supervisor.curState = 1;
return 0;
return CHAIN_CALLBACK_RESULT_CONTINUE_AND_REMOVE_JOB;
}
}
}
Expand All @@ -303,6 +303,6 @@ undefined4 __thiscall th06::ResultScreen::OnUpdate(ResultScreen *this,ResultScre
vm = vm + 1;
}
result_screen->field1_0x4 = result_screen->field1_0x4 + 1;
return 1;
return CHAIN_CALLBACK_RESULT_CONTINUE;
}

2 changes: 1 addition & 1 deletion th06_102h.exe.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
283
284

0 comments on commit 37ad564

Please sign in to comment.