diff options
| author | Henny022p <73211432+Henny022p@users.noreply.github.com> | 2026-02-08 18:32:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-08 18:32:38 +0100 |
| commit | 5ab63f00e522ff69c5bc987e379f0163943f2833 (patch) | |
| tree | 53622222ac729c6ab6dc75ef7f9bafa8031daf18 /src/manager/templeOfDropletsManager.c | |
| parent | 73901a0a012d55ebb66a4627dcb246d19737fcb5 (diff) | |
| parent | 5b2cafdc894823d57beee8f3947a391d881d91de (diff) | |
Various code cleanup changes
Diffstat (limited to 'src/manager/templeOfDropletsManager.c')
| -rw-r--r-- | src/manager/templeOfDropletsManager.c | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/src/manager/templeOfDropletsManager.c b/src/manager/templeOfDropletsManager.c index 19d8f07a..fc8309df 100644 --- a/src/manager/templeOfDropletsManager.c +++ b/src/manager/templeOfDropletsManager.c @@ -7,11 +7,16 @@ #include "manager/templeOfDropletsManager.h" #include "enemy.h" #include "flags.h" -#include "functions.h" +#include "common.h" #include "object.h" +#include "room.h" +#include "player.h" #include "screen.h" #include "sound.h" -#include "structures.h" +#include "game.h" +#include "vram.h" +#include "pauseMenu.h" +#include "asm.h" static const u16 gUnk_081085B8[] = { 0x1008, 0x1007, 0x1006, 0x1005, 0x1006, 0x1007, 0x1008, 0x1009, 0x1008, 0x1007, 0x1006, 0x1005, 0x1006, 0x1007, 0x1008, 0x1009 }; @@ -60,7 +65,7 @@ void TempleOfDropletsManager_Main(TempleOfDropletsManager* this) { void TempleOfDropletsManager_Type0(TempleOfDropletsManager* this) { if (super->action == 0) { sub_0805A89C(this); - if (!CheckLocalFlag(this->unk_3e)) { + if (!CheckLocalFlag(this->localFlag)) { this->unk_23 = 1; } else { this->unk_23 = 2; @@ -83,7 +88,7 @@ void TempleOfDropletsManager_Type1(TempleOfDropletsManager* this) { sub_0805A89C(this); this->unk_23 = 1; sub_0805AAF0(1); - if (!CheckLocalFlag(this->unk_3e)) { + if (!CheckLocalFlag(this->localFlag)) { super->action = 1; gScreen.lcd.displayControl &= 0xB7FF; } else { @@ -144,12 +149,12 @@ void TempleOfDropletsManager_Type2(TempleOfDropletsManager* this) { this->unk_23 = 1; } sub_0805AAF0(this->unk_23); - if (!CheckLocalFlag(this->unk_3e)) { - ClearFlag(this->unk_3c); + if (!CheckLocalFlag(this->localFlag)) { + ClearFlag(this->flag); super->action = 1; gScreen.lcd.displayControl &= ~(DISPCNT_WIN1_ON | DISPCNT_BG3_ON); } else { - SetFlag(this->unk_3c); + SetFlag(this->flag); super->action = 3; gScreen.lcd.displayControl |= DISPCNT_WIN1_ON | DISPCNT_BG3_ON; } @@ -162,7 +167,7 @@ void TempleOfDropletsManager_Type2(TempleOfDropletsManager* this) { void sub_0805A4CC(TempleOfDropletsManager*, u32); void TempleOfDropletsManager_Type1_Action1(TempleOfDropletsManager* this) { - if (CheckLocalFlag(this->unk_3e)) { + if (CheckLocalFlag(this->localFlag)) { super->action = 2; sub_0805A4CC(this, 0); } @@ -171,12 +176,12 @@ void TempleOfDropletsManager_Type1_Action1(TempleOfDropletsManager* this) { void TempleOfDropletsManager_Type2_Action2(TempleOfDropletsManager* this) { if (super->subAction != 0) { super->action = 3; - SetFlag(this->unk_3c); + SetFlag(this->flag); } } void TempleOfDropletsManager_Type2_Action3(TempleOfDropletsManager* this) { - if (!CheckLocalFlag(this->unk_3e)) { + if (!CheckLocalFlag(this->localFlag)) { super->action = 4; sub_0805A4CC(this, 1); } @@ -185,7 +190,7 @@ void TempleOfDropletsManager_Type2_Action3(TempleOfDropletsManager* this) { void TempleOfDropletsManager_Type2_Action4(TempleOfDropletsManager* this) { if (super->subAction != 0) { super->action = 1; - ClearFlag(this->unk_3c); + ClearFlag(this->flag); } } @@ -363,7 +368,7 @@ void TempleOfDropletsManager_Type6_Action3(TempleOfDropletsManager* this) { void TempleOfDropletsManager_Type7(TempleOfDropletsManager* this) { switch (super->action) { case 0: - if (CheckLocalFlag(this->unk_3e)) { + if (CheckLocalFlag(this->localFlag)) { super->action = 1; } else { super->action = 2; @@ -373,7 +378,7 @@ void TempleOfDropletsManager_Type7(TempleOfDropletsManager* this) { SetEntityPriority((Entity*)this, PRIO_PLAYER_EVENT); break; case 1: - if (CheckLocalFlag(this->unk_3e)) + if (CheckLocalFlag(this->localFlag)) break; super->action = 2; sub_0805A4CC(this, 4); @@ -384,7 +389,7 @@ void TempleOfDropletsManager_Type7(TempleOfDropletsManager* this) { } break; case 3: - if (!CheckLocalFlag(this->unk_3e)) + if (!CheckLocalFlag(this->localFlag)) break; super->action = 4; sub_0805A4CC(this, 4); @@ -399,7 +404,7 @@ void TempleOfDropletsManager_Type7(TempleOfDropletsManager* this) { } } -void sub_0805AAC8(TempleOfDropletsManager*); +void TempleOfDropletsManager_OnEnterRoom(TempleOfDropletsManager*); void sub_0805A89C(TempleOfDropletsManager* this) { SetEntityPriority((Entity*)this, PRIO_PLAYER_EVENT); @@ -412,7 +417,7 @@ void sub_0805A89C(TempleOfDropletsManager* this) { this->unk_20 = gRoomControls.room; this->unk_24 = gRoomControls.origin_x; this->unk_26 = gRoomControls.origin_y; - RegisterTransitionManager(this, sub_0805AAC8, 0); + RegisterTransitionHandler(this, TempleOfDropletsManager_OnEnterRoom, NULL); } void sub_0805A94C(TempleOfDropletsManager* this); @@ -505,7 +510,7 @@ void sub_0805AA58(TempleOfDropletsManager* this) { } } -void sub_0805AAC8(TempleOfDropletsManager* this) { +void TempleOfDropletsManager_OnEnterRoom(TempleOfDropletsManager* this) { sub_0805AAF0(this->unk_23); TempleOfDropletsManager_Main(this); } |
