diff --git a/decompile/General/232/232_24_AH_Pause_Destroy.c b/decompile/General/232/232_24_AH_Pause_Destroy.c new file mode 100644 index 00000000..06e8d2e7 --- /dev/null +++ b/decompile/General/232/232_24_AH_Pause_Destroy.c @@ -0,0 +1,30 @@ +#include + +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; +} \ No newline at end of file diff --git a/decompile/WorkInProgress/src/232/AH_Pause_Destroy.c b/decompile/WorkInProgress/src/232/AH_Pause_Destroy.c deleted file mode 100644 index b3cd768b..00000000 --- a/decompile/WorkInProgress/src/232/AH_Pause_Destroy.c +++ /dev/null @@ -1,33 +0,0 @@ -#include - -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; -} \ No newline at end of file diff --git a/decompile/buildList.txt b/decompile/buildList.txt index 2ed8b22a..cfd6721b 100644 --- a/decompile/buildList.txt +++ b/decompile/buildList.txt @@ -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 diff --git a/include/ovr_232.h b/include/ovr_232.h index 47d3b825..0456718c 100644 --- a/include/ovr_232.h +++ b/include/ovr_232.h @@ -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;