Match sub_080186C0

This commit is contained in:
Tal Hayon 2022-05-09 18:10:05 +03:00
parent c17adeba29
commit f6efbab252
6 changed files with 12 additions and 17 deletions

View File

@ -246,15 +246,3 @@ _0801869E:
_080186BC:
pop {r4, r5, r6, pc}
.align 2, 0
thumb_func_start sub_080186C0
sub_080186C0: @ 0x080186C0
ldr r3, _080186D0 @ =gArea
adds r2, r3, #0
adds r2, #0x28
movs r1, #0xff
strb r1, [r2]
strh r0, [r3, #0x2c]
bx lr
.align 2, 0
_080186D0: .4byte gArea

View File

@ -44,13 +44,15 @@ typedef struct {
u8 unk1A;
u8 filler2[13];
u8 inventoryGfxIdx;
u8 filler4[0x13];
u8 filler4[0x3];
u16 unk2C;
u8 filler5[0xe];
RoomResInfo roomResInfos[MAX_ROOMS];
RoomResInfo currentRoomInfo;
RoomResInfo* pCurrentRoomInfo;
u32 bgm;
u32 queued_bgm;
u8 filler5[0x20];
u8 filler6[0x20];
void* transitionManager;
void (*onEnter)();
void (*onExit)();

View File

@ -28,6 +28,11 @@ void sub_080189EC(int);
void sub_0801876C(int, int);
void sub_08018738(u32, int);
void sub_080186C0(u32 param_1) {
gArea.inventoryGfxIdx = 0xff;
gArea.unk2C = param_1;
}
void sub_080186D4(void) {
if (gArea.inventoryGfxIdx == 0xff) {
sub_0801855C();

View File

@ -808,7 +808,7 @@ void sub_0809584C(Object6AEntity* this) {
u32 tmp, idx;
idx = super->health;
if ((idx & 0x7F) != 0 && !ReadBit((u32*)gArea.filler5, idx - 1))
if ((idx & 0x7F) != 0 && !ReadBit((u32*)gArea.filler6, idx - 1))
DeleteThisEntity();
if (super->timer != 0 && CheckKinstoneFused(super->type2))
DeleteThisEntity();

View File

@ -23,7 +23,7 @@ void Whirlwind(Entity* this) {
Whirlwind_Action2,
};
u32 tmp = this->health;
if (((tmp & 0x7f) != 0) && (ReadBit(gArea.filler5, tmp - 1) == 0)) {
if (((tmp & 0x7f) != 0) && (ReadBit(gArea.filler6, tmp - 1) == 0)) {
DeleteThisEntity();
}
Whirlwind_Actions[this->action](this);

View File

@ -26,7 +26,7 @@ static bool32 sub_0807007C(struct_gUnk_020000C0*, u32);
void sub_0806F364(void) {
gArea.filler[2] ^= 0x80;
MemClear(&gArea.filler5[(gArea.filler[2] + 7) / 8], 16);
MemClear(&gArea.filler6[(gArea.filler[2] + 7) / 8], 16);
}
void sub_0806F38C(void) {