diff --git a/asm/kinstone.s b/asm/kinstone.s index fd6f8de5..1f666fd2 100644 --- a/asm/kinstone.s +++ b/asm/kinstone.s @@ -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 diff --git a/include/area.h b/include/area.h index 00a2339d..25ac75aa 100644 --- a/include/area.h +++ b/include/area.h @@ -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)(); diff --git a/src/kinstone.c b/src/kinstone.c index 8ec8d54e..0d4ee14e 100644 --- a/src/kinstone.c +++ b/src/kinstone.c @@ -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(); diff --git a/src/object/object6A.c b/src/object/object6A.c index d1296659..8ff73b6f 100644 --- a/src/object/object6A.c +++ b/src/object/object6A.c @@ -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(); diff --git a/src/object/whirlwind.c b/src/object/whirlwind.c index 6017bbe7..5659a5a4 100644 --- a/src/object/whirlwind.c +++ b/src/object/whirlwind.c @@ -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); diff --git a/src/physics.c b/src/physics.c index 609d8e8c..fbe503c1 100644 --- a/src/physics.c +++ b/src/physics.c @@ -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) {