mirror of
https://github.com/CTR-tools/CTR-ModSDK.git
synced 2024-12-02 10:16:20 +00:00
progress
This commit is contained in:
parent
69cfdd7b43
commit
c134bbe513
30
decompile/General/232/232_24_AH_Pause_Destroy.c
Normal file
30
decompile/General/232/232_24_AH_Pause_Destroy.c
Normal file
@ -0,0 +1,30 @@
|
||||
#include <common.h>
|
||||
|
||||
void DECOMP_AH_Pause_Destroy(void)
|
||||
{
|
||||
char i;
|
||||
struct Instance *inst;
|
||||
struct Thread *t;
|
||||
int iVar3;
|
||||
|
||||
// global -> register
|
||||
struct PauseObject* ptrPauseObject =
|
||||
D232.ptrPauseObject;
|
||||
|
||||
// set global
|
||||
D232.ptrPauseObject = 0;
|
||||
|
||||
// check register
|
||||
if (ptrPauseObject == 0)
|
||||
return;
|
||||
|
||||
// loop through 14 instances, destroy them
|
||||
for (i = 0; i < 0xe; i++)
|
||||
{
|
||||
INSTANCE_Death(
|
||||
ptrPauseObject->PauseMember[i].inst);
|
||||
}
|
||||
|
||||
// kill thread
|
||||
ptrPauseObject->t->flags |= 0x800;
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
#include <common.h>
|
||||
|
||||
void DECOMP_AH_Pause_Destroy(void)
|
||||
{
|
||||
char i;
|
||||
struct Instance *inst;
|
||||
struct Thread *t;
|
||||
int iVar3;
|
||||
|
||||
// if PAUSE object exists
|
||||
if (*(int*)0x800b5578 != NULL)
|
||||
{
|
||||
iVar3 = DAT_800b5578 + 0xd0;
|
||||
|
||||
// loop through 14 instances, destroy them
|
||||
for (i = 0; i < 0xe; i++)
|
||||
{
|
||||
inst = (struct Instance *)(iVar3 + 0xc);
|
||||
iVar3 = iVar3 + -0x10;
|
||||
INSTANCE_Death(inst->next);
|
||||
}
|
||||
|
||||
// thread from object
|
||||
t = (struct Thread *)(DAT_800b5578 + 0xe0);
|
||||
|
||||
// erase pointer to PAUSE object
|
||||
*(int*)0x800b5578 = NULL;
|
||||
|
||||
// This AdvPause thread is now dead
|
||||
t->flags |= 0x800;
|
||||
}
|
||||
return;
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
// 484+43+33+27+38+14+18+16+19+12+6+1+8+9+1+1+1+2+2+3+3+2+4+2+3+16+3+47-12 = 806 rewritten so far
|
||||
// 484 for every 'common' and ','
|
||||
// 485+43+33+27+38+14+18+16+19+12+6+1+8+9+1+1+1+2+2+3+3+2+4+2+3+16+3+47-12 = 807 rewritten so far
|
||||
// 485 for every 'common' and ','
|
||||
// additions for every file that has multiple functions,
|
||||
// 43 for HOWL block
|
||||
// 33 for LOAD block
|
||||
@ -120,6 +120,7 @@ common, 232, AH_Map_HubArrowOutter, 0x0, General/232/232_20_AH_Map_HubArrowOutte
|
||||
common, 232, AH_Map_HubItems, 0x0, General/232/232_21_AH_Map_HubItems.c
|
||||
common, 232, AH_Map_Warppads, 0x0, General/232/232_22_AH_Map_Warppads.c
|
||||
common, 232, AH_Map_Main, 0x0, General/232/232_23_AH_Map_Main.c
|
||||
common, 232, AH_Pause_Destroy, 0x0, General/232/232_24_AH_Pause_Destroy.c
|
||||
|
||||
common, 232, AH_HintMenu_MaskPosRot, 0x0, General/232/232_28_AH_HintMenu_MaskPosRot.c
|
||||
|
||||
|
@ -417,11 +417,7 @@ struct OverlayDATA_232
|
||||
// 800b5574
|
||||
int maskWarppadBoolInterrupt;
|
||||
|
||||
// 800b5578
|
||||
void* ptrPauseObject;
|
||||
|
||||
// 800b557c
|
||||
struct
|
||||
struct PauseObject
|
||||
{
|
||||
// 0x0
|
||||
struct
|
||||
@ -443,7 +439,13 @@ struct OverlayDATA_232
|
||||
struct Thread* t;
|
||||
|
||||
// 0xe4 -- size
|
||||
} PauseObject;
|
||||
};
|
||||
|
||||
// 800b5578
|
||||
struct PauseObject* ptrPauseObject;
|
||||
|
||||
// 800b557c
|
||||
struct PauseObject pauseObject;
|
||||
|
||||
// 800B5660
|
||||
int hintMenu_boolViewHint;
|
||||
|
Loading…
Reference in New Issue
Block a user