From 28bf8b929fa13f89ce0a555fbcbb5545e4e4a88a Mon Sep 17 00:00:00 2001 From: theo3 Date: Thu, 16 Dec 2021 21:12:43 -0800 Subject: [PATCH 1/4] furniture ok --- asm/furniture.s | 1102 --------------------- asm/non_matching/furniture/sub_08090E64.s | 33 + data/animations/object/furniture.s | 18 - include/entity.h | 2 + include/global.h | 2 + linker.ld | 3 +- src/object/furniture.c | 390 ++++++++ 7 files changed, 429 insertions(+), 1121 deletions(-) delete mode 100644 asm/furniture.s create mode 100644 asm/non_matching/furniture/sub_08090E64.s create mode 100644 src/object/furniture.c diff --git a/asm/furniture.s b/asm/furniture.s deleted file mode 100644 index 9b2cf28d..00000000 --- a/asm/furniture.s +++ /dev/null @@ -1,1102 +0,0 @@ - .include "asm/macros.inc" - - .include "constants/constants.inc" - - .syntax unified - - .text - - - thumb_func_start Furniture -Furniture: @ 0x080905A0 - push {lr} - ldr r2, _080905B4 @ =gUnk_08122218 - ldrb r1, [r0, #0xc] - lsls r1, r1, #2 - adds r1, r1, r2 - ldr r1, [r1] - bl _call_via_r1 - pop {pc} - .align 2, 0 -_080905B4: .4byte gUnk_08122218 - - thumb_func_start sub_080905B8 -sub_080905B8: @ 0x080905B8 - push {r4, r5, r6, r7, lr} - mov r7, sb - mov r6, r8 - push {r6, r7} - adds r7, r0, #0 - movs r0, #1 - mov sb, r0 - mov r1, sb - strb r1, [r7, #0xc] - movs r5, #0x2e - ldrsh r2, [r7, r5] - ldr r6, _08090618 @ =gRoomControls - ldrh r0, [r6, #6] - subs r2, r2, r0 - asrs r2, r2, #4 - movs r4, #0x3f - ands r2, r4 - movs r1, #0x32 - ldrsh r0, [r7, r1] - ldrh r1, [r6, #8] - subs r0, r0, r1 - asrs r0, r0, #4 - ands r0, r4 - lsls r0, r0, #6 - orrs r2, r0 - adds r5, r7, #0 - adds r5, #0x78 - movs r0, #0 - mov r8, r0 - strh r2, [r5] - adds r0, r7, #0 - bl sub_08090DC4 - adds r0, r7, #0 - adds r0, #0x82 - ldrh r0, [r0] - ldr r1, _0809061C @ =0x00007FFF - ands r1, r0 - cmp r1, #0x80 - beq _08090680 - cmp r1, #0x80 - bgt _08090620 - cmp r1, #0x20 - beq _080906E6 - cmp r1, #0x40 - beq _08090650 - b _080906E0 - .align 2, 0 -_08090618: .4byte gRoomControls -_0809061C: .4byte 0x00007FFF -_08090620: - movs r0, #0x80 - lsls r0, r0, #2 - cmp r1, r0 - beq _080906E6 - cmp r1, r0 - bgt _08090636 - movs r0, #0x80 - lsls r0, r0, #1 - cmp r1, r0 - beq _08090640 - b _080906E0 -_08090636: - movs r0, #0x80 - lsls r0, r0, #3 - cmp r1, r0 - beq _080906C4 - b _080906E0 -_08090640: - adds r1, r7, #0 - adds r1, #0x38 - movs r0, #2 - strb r0, [r1] - adds r0, r7, #0 - bl UpdateSpriteForCollisionLayer - b _080906E6 -_08090650: - ldrh r1, [r7, #0x32] - movs r0, #0x10 - rsbs r0, r0, #0 - ands r0, r1 - movs r1, #4 - orrs r0, r1 - strh r0, [r7, #0x32] - ldr r4, _0809067C @ =0x00004017 - ldrh r1, [r5] - subs r1, #0x80 - adds r0, r4, #0 - movs r2, #1 - bl SetTile - ldrh r1, [r5] - subs r1, #0x40 - adds r0, r4, #0 - movs r2, #1 - bl SetTile - b _080906E6 - .align 2, 0 -_0809067C: .4byte 0x00004017 -_08090680: - mov r1, r8 - strb r1, [r7, #0x1e] - ldrh r1, [r7, #0x32] - movs r0, #0x10 - rsbs r0, r0, #0 - ands r0, r1 - movs r1, #6 - orrs r0, r1 - strh r0, [r7, #0x32] - movs r2, #0x2e - ldrsh r1, [r7, r2] - ldrh r0, [r6, #6] - subs r1, r1, r0 - asrs r1, r1, #4 - ands r1, r4 - movs r2, #0x32 - ldrsh r0, [r7, r2] - ldrh r2, [r6, #8] - subs r0, r0, r2 - asrs r0, r0, #4 - ands r0, r4 - lsls r0, r0, #6 - orrs r1, r0 - strh r1, [r5] - ldr r0, _080906C0 @ =0x00004026 - ldrh r1, [r5] - adds r2, r7, #0 - adds r2, #0x38 - ldrb r2, [r2] - bl SetTile - b _080906E6 - .align 2, 0 -_080906C0: .4byte 0x00004026 -_080906C4: - adds r0, r7, #0 - bl sub_08090E64 - ldrb r0, [r7, #0xb] - cmp r0, #0 - beq _080906E0 - adds r0, r7, #0 - adds r0, #0x62 - mov r5, sb - strb r5, [r0] - adds r1, r7, #0 - adds r1, #0x80 - movs r0, #0x30 - strb r0, [r1] -_080906E0: - adds r0, r7, #0 - bl sub_08090B6C -_080906E6: - adds r0, r7, #0 - adds r0, #0x81 - ldrb r1, [r0] - cmp r1, #0x10 - beq _0809075C - movs r0, #0x70 - ands r0, r1 - adds r4, r7, #0 - adds r4, #0x78 - cmp r0, #0x20 - beq _0809072E - cmp r0, #0x30 - bne _0809073A - ldrh r0, [r4] - subs r0, #0x40 - strh r0, [r4] - adds r0, r7, #0 - bl sub_08090B6C - movs r0, #0x2e - ldrsh r1, [r7, r0] - ldr r2, _08090778 @ =gRoomControls - ldrh r0, [r2, #6] - subs r1, r1, r0 - asrs r1, r1, #4 - movs r3, #0x3f - ands r1, r3 - movs r5, #0x32 - ldrsh r0, [r7, r5] - ldrh r2, [r2, #8] - subs r0, r0, r2 - asrs r0, r0, #4 - ands r0, r3 - lsls r0, r0, #6 - orrs r1, r0 - strh r1, [r4] -_0809072E: - ldrh r0, [r4] - adds r0, #0x40 - strh r0, [r4] - adds r0, r7, #0 - bl sub_08090B6C -_0809073A: - movs r0, #0x2e - ldrsh r1, [r7, r0] - ldr r2, _08090778 @ =gRoomControls - ldrh r0, [r2, #6] - subs r1, r1, r0 - asrs r1, r1, #4 - movs r3, #0x3f - ands r1, r3 - movs r5, #0x32 - ldrsh r0, [r7, r5] - ldrh r2, [r2, #8] - subs r0, r0, r2 - asrs r0, r0, #4 - ands r0, r3 - lsls r0, r0, #6 - orrs r1, r0 - strh r1, [r4] -_0809075C: - adds r0, r7, #0 - adds r0, #0x82 - ldrh r0, [r0] - ldr r1, _0809077C @ =0x00007FFF - ands r1, r0 - cmp r1, #2 - beq _08090780 - cmp r1, #4 - bne _080907C8 - adds r0, r7, #0 - movs r1, #0x7e - bl ChangeObjPalette - b _080907C8 - .align 2, 0 -_08090778: .4byte gRoomControls -_0809077C: .4byte 0x00007FFF -_08090780: - adds r0, r7, #0 - adds r0, #0x78 - ldrh r0, [r0] - adds r4, r0, #0 - subs r4, #0x81 - ldrb r0, [r7, #0xa] - movs r1, #2 - mov r8, r1 - cmp r0, #0x1a - beq _08090798 - movs r2, #3 - mov r8, r2 -_08090798: - movs r5, #0 - cmp r5, r8 - bhs _080907C8 - ldr r6, _080907DC @ =0x00004026 -_080907A0: - adds r0, r6, #0 - adds r1, r4, #0 - movs r2, #2 - bl SetTile - adds r0, r6, #0 - adds r1, r4, #0 - movs r2, #1 - bl SetTile - adds r1, r4, #0 - adds r1, #0x40 - movs r0, #0 - movs r2, #1 - bl sub_080001D0 - adds r5, #1 - adds r4, #1 - cmp r5, r8 - blo _080907A0 -_080907C8: - ldrb r0, [r7, #0xa] - subs r0, #1 - cmp r0, #0x3b - bls _080907D2 - b _080909DC -_080907D2: - lsls r0, r0, #2 - ldr r1, _080907E0 @ =_080907E4 - adds r0, r0, r1 - ldr r0, [r0] - mov pc, r0 - .align 2, 0 -_080907DC: .4byte 0x00004026 -_080907E0: .4byte _080907E4 -_080907E4: @ jump table - .4byte _080908D4 @ case 0 - .4byte _080909DC @ case 1 - .4byte _080909DC @ case 2 - .4byte _080909DC @ case 3 - .4byte _080909DC @ case 4 - .4byte _080909DC @ case 5 - .4byte _080909DC @ case 6 - .4byte _080909DC @ case 7 - .4byte _080908F0 @ case 8 - .4byte _080909DC @ case 9 - .4byte _080909DC @ case 10 - .4byte _080909DC @ case 11 - .4byte _080909DC @ case 12 - .4byte _080909DC @ case 13 - .4byte _080909DC @ case 14 - .4byte _080909DC @ case 15 - .4byte _080909DC @ case 16 - .4byte _080909DC @ case 17 - .4byte _080909DC @ case 18 - .4byte _080909DC @ case 19 - .4byte _080909DC @ case 20 - .4byte _080909DC @ case 21 - .4byte _080909DC @ case 22 - .4byte _080909DC @ case 23 - .4byte _080909DC @ case 24 - .4byte _080909DC @ case 25 - .4byte _080909DC @ case 26 - .4byte _080909DC @ case 27 - .4byte _080909DC @ case 28 - .4byte _08090920 @ case 29 - .4byte _08090938 @ case 30 - .4byte _080909DC @ case 31 - .4byte _080909DC @ case 32 - .4byte _080909DC @ case 33 - .4byte _080909DC @ case 34 - .4byte _080909DC @ case 35 - .4byte _080909DC @ case 36 - .4byte _080909DC @ case 37 - .4byte _080909DC @ case 38 - .4byte _08090984 @ case 39 - .4byte _080909DC @ case 40 - .4byte _080909DC @ case 41 - .4byte _080909DC @ case 42 - .4byte _080909DC @ case 43 - .4byte _080909DC @ case 44 - .4byte _080909DC @ case 45 - .4byte _080909DC @ case 46 - .4byte _080909DC @ case 47 - .4byte _080909DC @ case 48 - .4byte _080909DC @ case 49 - .4byte _080909DC @ case 50 - .4byte _080909DC @ case 51 - .4byte _080909DC @ case 52 - .4byte _080909DC @ case 53 - .4byte _080909DC @ case 54 - .4byte _080909DC @ case 55 - .4byte _080909DC @ case 56 - .4byte _080909DC @ case 57 - .4byte _08090994 @ case 58 - .4byte _080909C8 @ case 59 -_080908D4: - ldrb r0, [r7, #0xb] - cmp r0, #0 - bne _080908DC - b _080909DC -_080908DC: - adds r2, r7, #0 - adds r2, #0x29 - ldrb r1, [r2] - movs r0, #8 - rsbs r0, r0, #0 - ands r0, r1 - movs r1, #4 - orrs r0, r1 - strb r0, [r2] - b _080909DC -_080908F0: - movs r0, #0x4d - movs r1, #0x3e - movs r2, #0 - bl CreateObject - adds r4, r0, #0 - cmp r4, #0 - beq _080909DC - movs r3, #0x80 - lsls r3, r3, #0xd - adds r0, r7, #0 - adds r1, r4, #0 - adds r2, r3, #0 - bl PositionRelative - movs r0, #1 - strb r0, [r4, #0x1e] - ldrb r1, [r4, #0x11] - subs r0, #0x11 - ands r0, r1 - movs r1, #2 - orrs r0, r1 - strb r0, [r4, #0x11] - b _080909DC -_08090920: - ldr r0, _08090934 @ =0x00000306 - adds r1, r7, #0 - adds r1, #0x78 - ldrh r1, [r1] - adds r1, #0x41 - movs r2, #2 - bl sub_0807B7D8 - b _080909DC - .align 2, 0 -_08090934: .4byte 0x00000306 -_08090938: - adds r5, r7, #0 - adds r5, #0x38 - movs r0, #1 - strb r0, [r5] - ldrb r1, [r7, #0x1b] - movs r0, #0x3f - ands r0, r1 - movs r1, #0x80 - orrs r0, r1 - strb r0, [r7, #0x1b] - ldr r0, _0809097C @ =0x00004074 - adds r4, r7, #0 - adds r4, #0x78 - ldrh r1, [r4] - subs r1, #0x40 - ldrb r2, [r5] - bl SetTile - ldrh r1, [r4] - subs r1, #0x40 - ldrb r2, [r5] - movs r0, #0x3f - bl sub_080001D0 - ldr r6, _08090980 @ =0x00004017 - ldrh r1, [r4] - ldrb r2, [r5] - adds r0, r6, #0 - bl SetTile - ldrh r1, [r4] - adds r1, #0x40 - ldrb r2, [r5] - b _080909BC - .align 2, 0 -_0809097C: .4byte 0x00004074 -_08090980: .4byte 0x00004017 -_08090984: - ldrb r0, [r7, #0xb] - cmp r0, #0 - beq _080909DC - adds r1, r7, #0 - adds r1, #0x62 - movs r0, #0xfc - strb r0, [r1] - b _080909DC -_08090994: - ldr r6, _080909C4 @ =0x00004023 - adds r5, r7, #0 - adds r5, #0x78 - ldrh r1, [r5] - subs r1, #0x41 - adds r4, r7, #0 - adds r4, #0x38 - ldrb r2, [r4] - adds r0, r6, #0 - bl SetTile - ldrh r1, [r5] - subs r1, #0x40 - ldrb r2, [r4] - adds r0, r6, #0 - bl SetTile - ldrh r1, [r5] - subs r1, #0x3f - ldrb r2, [r4] -_080909BC: - adds r0, r6, #0 - bl SetTile - b _080909DC - .align 2, 0 -_080909C4: .4byte 0x00004023 -_080909C8: - ldr r0, _080909E4 @ =0x00004022 - adds r1, r7, #0 - adds r1, #0x78 - ldrh r1, [r1] - adds r1, #0x41 - adds r2, r7, #0 - adds r2, #0x38 - ldrb r2, [r2] - bl SetTile -_080909DC: - pop {r3, r4} - mov r8, r3 - mov sb, r4 - pop {r4, r5, r6, r7, pc} - .align 2, 0 -_080909E4: .4byte 0x00004022 - - thumb_func_start sub_080909E8 -sub_080909E8: @ 0x080909E8 - push {r4, r5, r6, lr} - adds r5, r0, #0 - adds r0, #0x82 - ldrh r0, [r0] - ldr r1, _08090A04 @ =0x00007FFF - ands r1, r0 - cmp r1, #8 - beq _08090A42 - cmp r1, #8 - bgt _08090A08 - cmp r1, #1 - beq _08090A12 - b _08090B60 - .align 2, 0 -_08090A04: .4byte 0x00007FFF -_08090A08: - cmp r1, #0x10 - beq _08090A68 - cmp r1, #0x80 - beq _08090AB0 - b _08090B60 -_08090A12: - ldr r2, _08090A34 @ =gPlayerEntity - movs r0, #0x32 - ldrsh r1, [r2, r0] - movs r3, #0x32 - ldrsh r0, [r5, r3] - cmp r1, r0 - blt _08090A26 - adds r0, #0x18 - cmp r1, r0 - ble _08090A38 -_08090A26: - ldrb r0, [r5, #0x19] - movs r1, #0x3f - ands r1, r0 - movs r0, #0x80 - orrs r1, r0 - strb r1, [r5, #0x19] - b _08090B60 - .align 2, 0 -_08090A34: .4byte gPlayerEntity -_08090A38: - ldrb r0, [r5, #0x19] - movs r1, #0xc0 - orrs r0, r1 - strb r0, [r5, #0x19] - b _08090B60 -_08090A42: - ldrb r0, [r5, #0xe] - adds r0, #1 - strb r0, [r5, #0xe] - lsls r0, r0, #0x18 - lsrs r0, r0, #0x18 - cmp r0, #0x10 - beq _08090A52 - b _08090B60 -_08090A52: - movs r0, #0 - strb r0, [r5, #0xe] - ldrb r0, [r5, #0xf] - adds r0, #1 - movs r1, #3 - ands r0, r1 - strb r0, [r5, #0xf] - adds r0, r5, #0 - bl sub_08090E4C - b _08090B60 -_08090A68: - ldrb r0, [r5, #0xa] - cmp r0, #0x3e - beq _08090A8C - ldrb r0, [r5, #0xe] - adds r0, #1 - strb r0, [r5, #0xe] - lsls r0, r0, #0x18 - lsrs r0, r0, #0x18 - cmp r0, #0x14 - bne _08090B60 - ldrb r0, [r5, #0x1e] - adds r0, #1 - movs r1, #3 - ands r0, r1 - strb r0, [r5, #0x1e] - movs r0, #0 - strb r0, [r5, #0xe] - b _08090B60 -_08090A8C: - ldrb r0, [r5, #0xe] - adds r0, #1 - strb r0, [r5, #0xe] - lsls r0, r0, #0x18 - lsrs r0, r0, #0x18 - cmp r0, #0xe - bne _08090B60 - movs r0, #0 - strb r0, [r5, #0xe] - ldrb r0, [r5, #0xf] - adds r0, #1 - movs r1, #3 - bl __modsi3 - strb r0, [r5, #0xf] - adds r0, #1 - strb r0, [r5, #0x1e] - b _08090B60 -_08090AB0: - ldr r2, _08090B00 @ =gPlayerEntity - movs r3, #0x32 - ldrsh r1, [r2, r3] - movs r3, #0x32 - ldrsh r0, [r5, r3] - adds r0, #8 - cmp r1, r0 - bge _08090B14 - ldr r0, _08090B04 @ =gPlayerState - ldrb r0, [r0, #0x12] - cmp r0, #0x1e - beq _08090B60 - adds r0, r5, #0 - bl GetTileTypeByEntity - ldr r1, _08090B08 @ =0x00004017 - cmp r0, r1 - bne _08090B60 - ldr r0, _08090B0C @ =0x00004026 - adds r4, r5, #0 - adds r4, #0x78 - ldrh r1, [r4] - adds r5, #0x38 - ldrb r2, [r5] - bl SetTile - ldr r6, _08090B10 @ =0x0000403D - ldrh r1, [r4] - subs r1, #0x40 - ldrb r2, [r5] - adds r0, r6, #0 - bl SetTile - ldrh r1, [r4] - subs r1, #0x80 - ldrb r2, [r5] - adds r0, r6, #0 - bl SetTile - b _08090B60 - .align 2, 0 -_08090B00: .4byte gPlayerEntity -_08090B04: .4byte gPlayerState -_08090B08: .4byte 0x00004017 -_08090B0C: .4byte 0x00004026 -_08090B10: .4byte 0x0000403D -_08090B14: - adds r3, r2, #0 - adds r3, #0x38 - ldrb r1, [r3] - movs r0, #2 - ands r0, r1 - cmp r0, #0 - beq _08090B2C - movs r0, #1 - strb r0, [r3] - adds r0, r2, #0 - bl UpdateSpriteForCollisionLayer -_08090B2C: - adds r0, r5, #0 - bl GetTileTypeByEntity - ldr r6, _08090B64 @ =0x00004017 - cmp r0, r6 - beq _08090B60 - adds r4, r5, #0 - adds r4, #0x78 - ldrh r1, [r4] - adds r5, #0x38 - ldrb r2, [r5] - adds r0, r6, #0 - bl SetTile - ldrh r1, [r4] - subs r1, #0x40 - ldrb r2, [r5] - adds r0, r6, #0 - bl SetTile - ldr r0, _08090B68 @ =0x00004014 - ldrh r1, [r4] - subs r1, #0x80 - ldrb r2, [r5] - bl SetTile -_08090B60: - pop {r4, r5, r6, pc} - .align 2, 0 -_08090B64: .4byte 0x00004017 -_08090B68: .4byte 0x00004014 - - thumb_func_start sub_08090B6C -sub_08090B6C: @ 0x08090B6C - push {r4, r5, r6, r7, lr} - mov r7, r8 - push {r7} - adds r1, r0, #0 - adds r0, #0x80 - ldrb r0, [r0] - lsls r0, r0, #0x18 - cmp r0, #0 - bne _08090B80 - b _08090CD2 -_08090B80: - lsrs r0, r0, #0x1b - lsls r2, r0, #0x18 - lsrs r3, r2, #0x18 - ldrh r0, [r1, #0x2e] - movs r4, #0xf - mov r8, r4 - ands r4, r0 - mov r8, r4 - adds r0, r1, #0 - adds r0, #0x78 - ldrh r6, [r0] - subs r0, #0x40 - ldrb r7, [r0] - movs r0, #3 - ands r0, r3 - cmp r0, #1 - beq _08090BF8 - cmp r0, #1 - blo _08090BB0 - cmp r0, #2 - beq _08090C48 - cmp r0, #3 - beq _08090C90 - b _08090CD2 -_08090BB0: - lsrs r5, r2, #0x1b - cmp r3, #0xc - bne _08090BB8 - movs r5, #2 -_08090BB8: - rsbs r4, r5, #0 - cmp r4, r5 - bgt _08090BCE -_08090BBE: - adds r1, r6, r4 - ldr r0, _08090BE4 @ =0x00004022 - adds r2, r7, #0 - bl SetTile - adds r4, #1 - cmp r4, r5 - ble _08090BBE -_08090BCE: - movs r0, #8 - mov r1, r8 - ands r1, r0 - cmp r1, #0 - beq _08090BEC - ldr r0, _08090BE8 @ =0x00004024 - subs r1, r6, r4 - adds r2, r7, #0 - bl sub_08090CDC - b _08090CB2 - .align 2, 0 -_08090BE4: .4byte 0x00004022 -_08090BE8: .4byte 0x00004024 -_08090BEC: - ldr r0, _08090BF4 @ =0x00004022 - subs r1, r6, r4 - b _08090C6E - .align 2, 0 -_08090BF4: .4byte 0x00004022 -_08090BF8: - lsrs r5, r2, #0x1b - rsbs r4, r5, #0 - cmp r4, r5 - bgt _08090C10 -_08090C00: - adds r1, r6, r4 - ldr r0, _08090C2C @ =0x00004022 - adds r2, r7, #0 - bl SetTile - adds r4, #1 - cmp r4, r5 - ble _08090C00 -_08090C10: - movs r0, #8 - mov r1, r8 - ands r1, r0 - cmp r1, #0 - beq _08090C34 - ldr r0, _08090C30 @ =0x00004024 - subs r1, r6, r4 - adds r2, r7, #0 - bl sub_08090CDC - cmp r4, #0 - beq _08090CD2 - b _08090C6A - .align 2, 0 -_08090C2C: .4byte 0x00004022 -_08090C30: .4byte 0x00004024 -_08090C34: - cmp r4, #0 - beq _08090CB2 - ldr r0, _08090C44 @ =0x00004022 - subs r1, r6, r4 - adds r2, r7, #0 - bl SetTile - b _08090CB2 - .align 2, 0 -_08090C44: .4byte 0x00004022 -_08090C48: - lsrs r5, r2, #0x1a - rsbs r4, r5, #0 - cmp r4, r5 - bge _08090C60 -_08090C50: - adds r1, r6, r4 - ldr r0, _08090C78 @ =0x00004022 - adds r2, r7, #0 - bl SetTile - adds r4, #1 - cmp r4, r5 - blt _08090C50 -_08090C60: - movs r0, #8 - mov r1, r8 - ands r1, r0 - cmp r1, #0 - beq _08090C7C -_08090C6A: - ldr r0, _08090C78 @ =0x00004022 - adds r1, r6, r4 -_08090C6E: - adds r2, r7, #0 - bl SetTile - b _08090CD2 - .align 2, 0 -_08090C78: .4byte 0x00004022 -_08090C7C: - ldr r0, _08090C8C @ =0x00004024 - subs r1, r6, r4 - subs r1, #1 - adds r2, r7, #0 - bl sub_08090CDC - b _08090CB2 - .align 2, 0 -_08090C8C: .4byte 0x00004024 -_08090C90: - lsrs r5, r2, #0x1a - rsbs r4, r5, #0 - cmp r4, r5 - bgt _08090CA8 -_08090C98: - adds r1, r6, r4 - ldr r0, _08090CC0 @ =0x00004022 - adds r2, r7, #0 - bl SetTile - adds r4, #1 - cmp r4, r5 - ble _08090C98 -_08090CA8: - movs r0, #8 - mov r1, r8 - ands r1, r0 - cmp r1, #0 - beq _08090CC8 -_08090CB2: - ldr r0, _08090CC4 @ =0x00004025 - adds r1, r6, r4 - adds r2, r7, #0 - bl sub_08090CDC - b _08090CD2 - .align 2, 0 -_08090CC0: .4byte 0x00004022 -_08090CC4: .4byte 0x00004025 -_08090CC8: - ldr r0, _08090CD8 @ =0x00004024 - subs r1, r6, r4 - adds r2, r7, #0 - bl sub_08090CDC -_08090CD2: - pop {r3} - mov r8, r3 - pop {r4, r5, r6, r7, pc} - .align 2, 0 -_08090CD8: .4byte 0x00004024 - - thumb_func_start sub_08090CDC -sub_08090CDC: @ 0x08090CDC - push {r4, r5, r6, lr} - adds r4, r0, #0 - adds r5, r1, #0 - adds r6, r2, #0 - adds r0, r5, #0 - adds r1, r6, #0 - bl sub_080001DA - lsls r0, r0, #0x10 - lsrs r2, r0, #0x10 - movs r0, #0x80 - lsls r0, r0, #7 - ands r0, r2 - cmp r0, #0 - bne _08090D06 - adds r0, r4, #0 - adds r1, r5, #0 - adds r2, r6, #0 - bl SetTile - b _08090DB2 -_08090D06: - ldr r1, _08090D18 @ =0xFFFFBFDE - adds r0, r2, r1 - cmp r0, #0xb - bhi _08090DB2 - lsls r0, r0, #2 - ldr r1, _08090D1C @ =_08090D20 - adds r0, r0, r1 - ldr r0, [r0] - mov pc, r0 - .align 2, 0 -_08090D18: .4byte 0xFFFFBFDE -_08090D1C: .4byte _08090D20 -_08090D20: @ jump table - .4byte _08090DB2 @ case 0 - .4byte _08090DB2 @ case 1 - .4byte _08090D80 @ case 2 - .4byte _08090D50 @ case 3 - .4byte _08090DB2 @ case 4 - .4byte _08090DB2 @ case 5 - .4byte _08090DB2 @ case 6 - .4byte _08090DB2 @ case 7 - .4byte _08090DB2 @ case 8 - .4byte _08090DB2 @ case 9 - .4byte _08090D98 @ case 10 - .4byte _08090D68 @ case 11 -_08090D50: - ldr r0, _08090D5C @ =0x00004024 - cmp r4, r0 - bne _08090D58 - ldr r2, _08090D60 @ =0x00004022 -_08090D58: - ldr r0, _08090D64 @ =0x0000402C - b _08090DA2 - .align 2, 0 -_08090D5C: .4byte 0x00004024 -_08090D60: .4byte 0x00004022 -_08090D64: .4byte 0x0000402C -_08090D68: - ldr r0, _08090D74 @ =0x0000402C - cmp r4, r0 - bne _08090D70 - ldr r2, _08090D78 @ =0x0000402B -_08090D70: - ldr r0, _08090D7C @ =0x00004024 - b _08090DA2 - .align 2, 0 -_08090D74: .4byte 0x0000402C -_08090D78: .4byte 0x0000402B -_08090D7C: .4byte 0x00004024 -_08090D80: - ldr r0, _08090D8C @ =0x00004025 - cmp r4, r0 - bne _08090D88 - ldr r2, _08090D90 @ =0x00004022 -_08090D88: - ldr r0, _08090D94 @ =0x0000402D - b _08090DA2 - .align 2, 0 -_08090D8C: .4byte 0x00004025 -_08090D90: .4byte 0x00004022 -_08090D94: .4byte 0x0000402D -_08090D98: - ldr r0, _08090DB4 @ =0x0000402D - cmp r4, r0 - bne _08090DA0 - ldr r2, _08090DB8 @ =0x0000402B -_08090DA0: - ldr r0, _08090DBC @ =0x00004025 -_08090DA2: - cmp r4, r0 - bne _08090DA8 - ldr r2, _08090DC0 @ =0x00004022 -_08090DA8: - adds r0, r2, #0 - adds r1, r5, #0 - adds r2, r6, #0 - bl SetTile -_08090DB2: - pop {r4, r5, r6, pc} - .align 2, 0 -_08090DB4: .4byte 0x0000402D -_08090DB8: .4byte 0x0000402B -_08090DBC: .4byte 0x00004025 -_08090DC0: .4byte 0x00004022 - - thumb_func_start sub_08090DC4 -sub_08090DC4: @ 0x08090DC4 - push {r4, lr} - mov ip, r0 - ldrb r0, [r0, #0xa] - lsls r0, r0, #3 - ldr r1, _08090E44 @ =gUnk_08121EF8 - adds r3, r0, r1 - ldrh r1, [r3, #6] - movs r0, #0x80 - lsls r0, r0, #8 - ands r0, r1 - cmp r0, #0 - beq _08090DF4 - ldr r1, _08090E48 @ =gUnk_08122220 - movs r0, #3 - ldrsb r0, [r3, r0] - lsls r0, r0, #2 - adds r0, r0, r1 - ldr r3, [r0] - mov r0, ip - ldrb r1, [r0, #0xb] - lsls r0, r1, #3 - adds r3, r3, r0 - mov r0, ip - strb r1, [r0, #0x1e] -_08090DF4: - ldrb r1, [r3] - mov r0, ip - adds r0, #0x80 - strb r1, [r0] - ldrb r0, [r3, #1] - mov r1, ip - adds r1, #0x81 - strb r0, [r1] - ldrb r0, [r3, #2] - subs r1, #0x1f - strb r0, [r1] - ldrb r0, [r3, #3] - adds r1, #1 - strb r0, [r1] - ldrb r1, [r3, #4] - lsls r1, r1, #6 - mov r0, ip - ldrb r2, [r0, #0x19] - movs r0, #0x3f - ands r0, r2 - orrs r0, r1 - mov r1, ip - strb r0, [r1, #0x19] - ldrb r0, [r3, #5] - mov r4, ip - adds r4, #0x29 - movs r1, #7 - ands r1, r0 - ldrb r2, [r4] - movs r0, #8 - rsbs r0, r0, #0 - ands r0, r2 - orrs r0, r1 - strb r0, [r4] - ldrh r1, [r3, #6] - mov r0, ip - adds r0, #0x82 - strh r1, [r0] - pop {r4, pc} - .align 2, 0 -_08090E44: .4byte gUnk_08121EF8 -_08090E48: .4byte gUnk_08122220 - - thumb_func_start sub_08090E4C -sub_08090E4C: @ 0x08090E4C - push {lr} - ldr r2, _08090E60 @ =gUnk_08122244 - ldrb r1, [r0, #0xf] - lsls r1, r1, #2 - adds r1, r1, r2 - ldr r1, [r1] - bl ChangeObjPalette - pop {pc} - .align 2, 0 -_08090E60: .4byte gUnk_08122244 - - thumb_func_start sub_08090E64 -sub_08090E64: @ 0x08090E64 - push {r4, r5, lr} - adds r5, r0, #0 - movs r0, #0x2a - movs r1, #0 - movs r2, #0 - bl CreateObject - adds r4, r0, #0 - cmp r4, #0 - beq _08090EA0 - ldr r0, _08090EA4 @ =0x0000FFFE - adds r2, r0, #0 - ldrb r0, [r5, #0xb] - adds r2, r2, r0 - lsls r2, r2, #0x10 - adds r0, r5, #0 - adds r1, r4, #0 - movs r3, #0 - bl PositionRelative - ldrh r0, [r4, #0x36] - subs r0, #0x10 - strh r0, [r4, #0x36] - adds r1, r4, #0 - adds r1, #0x38 - movs r0, #2 - strb r0, [r1] - adds r0, r4, #0 - bl UpdateSpriteForCollisionLayer -_08090EA0: - pop {r4, r5, pc} - .align 2, 0 -_08090EA4: .4byte 0x0000FFFE diff --git a/asm/non_matching/furniture/sub_08090E64.s b/asm/non_matching/furniture/sub_08090E64.s new file mode 100644 index 00000000..51b42bc6 --- /dev/null +++ b/asm/non_matching/furniture/sub_08090E64.s @@ -0,0 +1,33 @@ + .syntax unified + push {r4, r5, lr} + adds r5, r0, #0 + movs r0, #0x2a + movs r1, #0 + movs r2, #0 + bl CreateObject + adds r4, r0, #0 + cmp r4, #0 + beq _08090EA0 + ldr r0, _08090EA4 @ =0x0000FFFE + adds r2, r0, #0 + ldrb r0, [r5, #0xb] + adds r2, r2, r0 + lsls r2, r2, #0x10 + adds r0, r5, #0 + adds r1, r4, #0 + movs r3, #0 + bl PositionRelative + ldrh r0, [r4, #0x36] + subs r0, #0x10 + strh r0, [r4, #0x36] + adds r1, r4, #0 + adds r1, #0x38 + movs r0, #2 + strb r0, [r1] + adds r0, r4, #0 + bl UpdateSpriteForCollisionLayer +_08090EA0: + pop {r4, r5, pc} + .align 2, 0 +_08090EA4: .4byte 0x0000FFFE + .syntax divided diff --git a/data/animations/object/furniture.s b/data/animations/object/furniture.s index 07c8a6ef..d33e0045 100644 --- a/data/animations/object/furniture.s +++ b/data/animations/object/furniture.s @@ -30,21 +30,3 @@ gUnk_081221F8:: @ 081221F8 gUnk_08122208:: @ 08122208 .incbin "furniture/gUnk_08122208.bin" - -gUnk_08122218:: @ 08122218 - .4byte sub_080905B8 - .4byte sub_080909E8 - -gUnk_08122220:: @ 08122220 - .4byte gUnk_08122128 - .4byte gUnk_08122198 - .4byte gUnk_081221A8 - .4byte gUnk_081221B8 - .4byte gUnk_081221C8 - .4byte gUnk_081221D8 - .4byte gUnk_081221E8 - .4byte gUnk_081221F8 - .4byte gUnk_08122208 - -gUnk_08122244:: @ 08122244 - .incbin "furniture/gUnk_08122244.bin" diff --git a/include/entity.h b/include/entity.h index 778a3f8e..83c3a6c5 100644 --- a/include/entity.h +++ b/include/entity.h @@ -130,6 +130,7 @@ typedef struct Entity { /*0x62*/ u8 spriteOffsetX; /*0x63*/ s8 spriteOffsetY; /*0x64*/ u32* myHeap; +#ifndef NENT_DEPRECATED /*0x68*/ union SplitHWord field_0x68; /*0x6a*/ union SplitHWord field_0x6a; /*0x6c*/ union SplitHWord field_0x6c; @@ -144,6 +145,7 @@ typedef struct Entity { /*0x82*/ union SplitHWord field_0x82; /*0x84*/ union SplitHWord cutsceneBeh; /*0x86*/ union SplitHWord field_0x86; +#endif } Entity; typedef struct LinkedList { diff --git a/include/global.h b/include/global.h index 669d2557..e7eddd31 100644 --- a/include/global.h +++ b/include/global.h @@ -50,6 +50,8 @@ #define BOOLCAST(x) ((-(x) | (x)) >> 31) #define static_assert(cond) extern char assertion[(cond) ? 1 : -1] +#define super (&this->base) + #if NON_MATCHING #define ASM_FUNC(path, decl) #else diff --git a/linker.ld b/linker.ld index 162ed5bc..2d25fba6 100644 --- a/linker.ld +++ b/linker.ld @@ -783,7 +783,7 @@ SECTIONS { src/object/backgroundCloud.o(.text); asm/object4B.o(.text); asm/pushableFurniture.o(.text); - asm/furniture.o(.text); + src/object/furniture.o(.text); src/object/minishSizedEntrance.o(.text); src/object/archway.o(.text); asm/giantRock.o(.text); @@ -1519,6 +1519,7 @@ SECTIONS { data/const/object/pushableFurniture.o(.rodata); data/const/object/furniture.o(.rodata); data/animations/object/furniture.o(.rodata); + src/object/furniture.o(.rodata); data/const/object/minishSizedEntrance.o(.rodata); data/animations/object/minishSizedEntrance.o(.rodata); data/const/object/object51.o(.rodata); diff --git a/src/object/furniture.c b/src/object/furniture.c new file mode 100644 index 00000000..130c2ce4 --- /dev/null +++ b/src/object/furniture.c @@ -0,0 +1,390 @@ +#define NENT_DEPRECATED +#include "entity.h" +#include "room.h" +#include "functions.h" +#include "object.h" + +extern void sub_080001D0(u32, u32, u32); +extern u32 sub_080001DA(u32, u32); + +enum { + FURNITURE_INIT, + FURNITURE_UPDATE, +}; + +typedef enum { + TMP, +} FurnitureFlag; + +typedef enum { + TMP2, +} FurnitureType; + +typedef struct { + Entity base; + /* 0x68 */ u8 pad[0x10]; + /* 0x78 */ u16 tile; + /* 0x7a */ u16 unk1; + /* 0x7c */ u16 unk2; + /* 0x7e */ u16 unk3; + /* 0x80 */ u8 width; + /* 0x81 */ u8 height; + /* 0x82 */ u16 flags; +} FurnitureEntity; + +typedef void(FurnitureAction)(FurnitureEntity*); + +static FurnitureAction FurnitureInit; +static FurnitureAction FurnitureUpdate; + +typedef struct { + u8 width; + u8 height; + s8 x; + s8 y; + u8 rendering; + u8 priority; + u16 flags; +} FurnitureCfg; + +extern FurnitureCfg gUnk_08122128[]; +extern FurnitureCfg gUnk_08122198[]; +extern FurnitureCfg gUnk_081221A8[]; +extern FurnitureCfg gUnk_081221B8[]; +extern FurnitureCfg gUnk_081221C8[]; +extern FurnitureCfg gUnk_081221D8[]; +extern FurnitureCfg gUnk_081221E8[]; +extern FurnitureCfg gUnk_081221F8[]; +extern FurnitureCfg gUnk_08122208[]; +extern const FurnitureCfg gUnk_08121EF8[]; + +static void sub_08090DC4(FurnitureEntity*); +static void sub_08090E64(FurnitureEntity*); +static void sub_08090B6C(FurnitureEntity*); +static void sub_08090E4C(FurnitureEntity*); +static void sub_08090CDC(u32, u32, u32); + +void Furniture(FurnitureEntity* this) { + static FurnitureAction* const sFurnitureActions[] = { + FurnitureInit, + FurnitureUpdate, + }; + + sFurnitureActions[super->action](this); +} + +static void FurnitureInit(FurnitureEntity* this) { + u32 i, tile, cnt; + Entity* e; + + super->action = FURNITURE_UPDATE; + this->tile = COORD_TO_TILE(super); + sub_08090DC4(this); + switch (this->flags & 0x7fff) { + case 0x100: + super->collisionLayer = 2; + UpdateSpriteForCollisionLayer(super); + break; + case 0x20: + break; + case 0x40: + super->y.HALF.HI = (super->y.HALF.HI & ~0xF) | 4; + SetTile(0x4017, this->tile - 128, 1); + SetTile(0x4017, this->tile - 64, 1); + break; + case 0x80: + super->frameIndex = 0; + super->y.HALF.HI = (super->y.HALF.HI & ~0xF) | 6; + this->tile = COORD_TO_TILE(super); + SetTile(0x4026, this->tile, super->collisionLayer); + break; + case 0x200: + break; + case 0x400: + sub_08090E64(this); + if (super->type2 != 0) { + super->spriteOffsetX = 1; + this->width = 48; + } + default: + sub_08090B6C(this); + break; + } + + if (this->height != 16) { + switch (this->height & 0x70) { + case 0x30: + this->tile -= 64; + sub_08090B6C(this); + this->tile = COORD_TO_TILE(super); + case 0x20: + this->tile += 64; + sub_08090B6C(this); + } + this->tile = COORD_TO_TILE(super); + } + + switch (this->flags & 0x7fff) { + case 0x4: + ChangeObjPalette(super, 0x7E); + break; + case 0x2: + tile = this->tile - 129; + cnt = super->type != 26 ? 3 : 2; + for (i = 0; i < cnt; ++i, ++tile) { + SetTile(0x4026, tile, 2); + SetTile(0x4026, tile, 1); + sub_080001D0(0, tile + 64, 1); + } + break; + } + + switch (super->type) { + case 1: + if (super->type2 != 0) { + super->spritePriority.b0 = 4; + } + break; + case 9: + e = CreateObject(FURNITURE, 62, 0); + if (e != NULL) { + PositionRelative(super, e, 0x100000, 0x100000); + e->frameIndex = 1; + e->updatePriority = 2; + } + break; + case 30: + sub_0807B7D8(774, this->tile + 65, 2); + break; + case 31: + super->collisionLayer = 1; + super->spriteOrientation.flipY = 2; + SetTile(0x4074, this->tile - 64, super->collisionLayer); + sub_080001D0(63, this->tile - 64, super->collisionLayer); + SetTile(0x4017, this->tile, super->collisionLayer); + SetTile(0x4017, this->tile + 64, super->collisionLayer); + break; + case 40: + if (super->type2 != 0) + super->spriteOffsetX = -4; + break; + case 59: + SetTile(0x4023, this->tile - 65, super->collisionLayer); + SetTile(0x4023, this->tile - 64, super->collisionLayer); + SetTile(0x4023, this->tile - 63, super->collisionLayer); + break; + case 60: + SetTile(0x4022, this->tile + 65, super->collisionLayer); + } +} + +static void FurnitureUpdate(FurnitureEntity* this) { + switch (this->flags & 0x7FFF) { + case 0x1: + if (gPlayerEntity.y.HALF.HI < super->y.HALF.HI || gPlayerEntity.y.HALF.HI > super->y.HALF.HI + 24) { + super->spriteRendering.b3 = 2; + } else { + super->spriteRendering.b3 = 3; + } + break; + case 0x8: + if (++super->actionDelay == 16) { + super->actionDelay = 0; + super->field_0xf = (super->field_0xf + 1) & 3; + sub_08090E4C(this); + } + break; + case 0x10: + if (super->type != 62) { + if (++super->actionDelay == 20) { + super->frameIndex = (super->frameIndex + 1) & 3; + super->actionDelay = 0; + } + } else { + if (++super->actionDelay == 14) { + super->actionDelay = 0; + super->field_0xf = (super->field_0xf + 1) % 3; + super->frameIndex = super->field_0xf + 1; + } + } + break; + case 0x80: + if (gPlayerEntity.y.HALF.HI < super->y.HALF.HI + 8) { + if (gPlayerState.field_0x10[2] != 30 && GetTileTypeByEntity(super) == 0x4017) { + SetTile(0x4026, this->tile, super->collisionLayer); + SetTile(0x403D, this->tile - 64, super->collisionLayer); + SetTile(0x403D, this->tile - 128, super->collisionLayer); + } + } else { + if (gPlayerEntity.collisionLayer & 2) { + gPlayerEntity.collisionLayer = 1; + UpdateSpriteForCollisionLayer(&gPlayerEntity); + } + if (GetTileTypeByEntity(super) != 0x4017) { + SetTile(0x4017, this->tile, super->collisionLayer); + SetTile(0x4017, this->tile - 64, super->collisionLayer); + SetTile(0x4014, this->tile - 128, super->collisionLayer); + } + } + break; + } +} + +static void sub_08090B6C(FurnitureEntity* this) { + s32 num; + + u32 width = (u32)(this->width << 0x18) >> 0x18; + if (width != 0) { + u8 w2 = width / 8; + u32 px = super->x.HALF.HI & 0xF; + u32 tile = this->tile; + u32 cl = super->collisionLayer; + int i; + + switch ((u32)w2 & 3) { + case 0: + num = w2 / 8; + if (w2 == 0xc) { + num = 2; + } + for (i = -num; i <= num; ++i) { + SetTile(0x4022, tile + i, cl); + } + if (px & 8) { + sub_08090CDC(0x4024, tile - i, cl); + sub_08090CDC(0x4025, tile + i, cl); + } else { + SetTile(0x4022, tile - i, cl); + } + break; + case 1: + num = w2 / 8; + for (i = -num; i <= num; i++) { + SetTile(0x4022, tile + i, cl); + } + if (px & 8) { + sub_08090CDC(0x4024, tile - i, cl); + if (i != 0) { + SetTile(0x4022, tile + i, cl); + } + } else { + if (i != 0) { + SetTile(0x4022, tile - i, cl); + } + sub_08090CDC(0x4025, tile + i, cl); + } + break; + case 2: + num = w2 / 4; + for (i = -num; i < num; ++i) { + SetTile(0x4022, tile + i, cl); + } + if (px & 8) { + SetTile(0x4022, tile + i, cl); + } else { + sub_08090CDC(0x4024, tile - i - 1, cl); + sub_08090CDC(0x4025, tile + i, cl); + } + break; + case 3: + num = w2 / 4; + for (i = -num; i <= num; ++i) { + SetTile(0x4022, tile + i, cl); + } + if (px & 8) { + sub_08090CDC(0x4025, tile + i, cl); + } else { + sub_08090CDC(0x4024, tile - i, cl); + } + break; + } + } +} + +static void sub_08090CDC(u32 id, u32 pos, u32 layer) { + u16 cur = sub_080001DA(pos, layer); + u32 next = cur; + u32 id2; + + if ((cur & 0x4000) == 0) { + SetTile(id, pos, layer); + } else { + switch (cur) { + case 0x4025: + if (id == 0x4024) + next = 0x4022; + if (id == 0x402c) + next = 0x4022; + break; + case 0x402D: + if (id == 0x402c) + next = 0x402b; + if (id == 0x4024) + next = 0x4022; + break; + case 0x4024: + if (id == 0x4025) + next = 0x4022; + if (id == 0x402d) + next = 0x4022; + break; + case 0x402C: + if (id == 0x402d) + next = 0x402b; + if (id == 0x4025) + next = 0x4022; + break; + case 0x4022: + case 0x4023: + case 0x4026: + case 0x4027: + case 0x4028: + case 0x4029: + case 0x402a: + case 0x402b: + default: + return; + } + SetTile(next, pos, layer); + } +} + +static void sub_08090DC4(FurnitureEntity* this) { + static const FurnitureCfg* const sCfgTable[] = { + gUnk_08122128, gUnk_08122198, gUnk_081221A8, gUnk_081221B8, gUnk_081221C8, + gUnk_081221D8, gUnk_081221E8, gUnk_081221F8, gUnk_08122208, + }; + + const FurnitureCfg* cfg = &gUnk_08121EF8[super->type]; + if (cfg->flags & 0x8000) { + cfg = sCfgTable[cfg->y]; + cfg += super->type2; + super->frameIndex = super->type2; + } + this->width = cfg->width; + this->height = cfg->height; + super->spriteOffsetX = cfg->x; + super->spriteOffsetY = cfg->y; + super->spriteRendering.b3 = cfg->rendering; + super->spritePriority.b0 = cfg->priority; + this->flags = cfg->flags; +} + +static void sub_08090E4C(FurnitureEntity* this) { + static const u32 sPalettes[] = { 0x5f, 0x60, 0x61, 0x62 }; + + ChangeObjPalette(super, sPalettes[super->field_0xf]); +} + +static NONMATCH("asm/non_matching/furniture/sub_08090E64.s", void sub_08090E64(FurnitureEntity* this)) { + Entity* e = CreateObject(OBJECT_42, 0, 0); + u32 tmp = 0x10000 - 2; + + if (e != NULL) { + PositionRelative(super, e, (tmp + super->type2) * 0x10000, 0); + e->z.HALF.HI -= 16; + e->collisionLayer = 2; + UpdateSpriteForCollisionLayer(e); + } +} +END_NONMATCH From 929f6000a634910fd89f54c646d05e6a168e2a18 Mon Sep 17 00:00:00 2001 From: theo3 Date: Thu, 16 Dec 2021 22:26:16 -0800 Subject: [PATCH 2/4] add furniture types --- src/object/furniture.c | 98 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 85 insertions(+), 13 deletions(-) diff --git a/src/object/furniture.c b/src/object/furniture.c index 130c2ce4..b313ca3f 100644 --- a/src/object/furniture.c +++ b/src/object/furniture.c @@ -17,7 +17,79 @@ typedef enum { } FurnitureFlag; typedef enum { - TMP2, + BOOKSHELF, + CRATE, + BULLETIN_BOARD, + CERAMIC_SHELF1, + FLOUR_SACK, + LOGS, + WATER_BARREL, + WEAPON_RACK, + RED_CAULDRON, + SMITH_FORGE, + LARGE_CERAMIC_SHELF, + LADDER, + GLOWING_PLANT, + GLOWING_SPORES, + LOG_SHELF, + KINSTONE_SHELF, + BLUE_CAULDRON, + HAY_BED, + MILK_JUG, + HAY_BALE, + FLOWER_BED_SMALL, + FLOWER_BED_VERT, + FLOWER_BED_HORIZ, + CARPENTER_MACHINE, + SPROUT_CART, + ENVELOPE_SHELF, + BREAD_SHELF, + MAYOR_DESK, + SHOES, + REPAIRED_SHOE, + SHOE_DESK, + STAIRCASE, + DECORATED_STONE, + BIRD_STATUE, + CLOSET, + DRAWERS, + CERAMIC_SHELF2, + LARGE_BOOKCASE, + MINISH_BED, + MINISH_BUTTONS, + MINISH_CHEESE, + MINISH_CHERRIES, + MINISH_CHESSPIECE, + MINISH_COOKIES, + MINISH_MUG, + DR_LEFT_DESK1, + DR_LEFT_DESK2, + MINISH_DIE, + MINISH_GEAR, + MINISH_PINCUSHION, + MINISH_THREAD, + MINISH_MALLET, + MINISH_SCROLL_BOX, + MINISH_APPLE, + MINISH_CANDLE, + MINISH_WOOD_PLANK, + GBA_SCREEN, + PHONOGRAPH, + BAKERY_TABLE, + WOODEN_TABLE, + LOW_BOOKSHELF, + FIGURINE_DEVICE_STATIC, + FORGE_HELPER, + MINISH_UNLIT_CANDLE, + MINISH_GEARS, + DOUBLE_BOOKSHELF, + MINISH_DECOR1, + MINISH_DECOR2, + MINISH_JAM, + MINISH_BREAD, + POSTER1, + POSTER2, + NOTE, } FurnitureType; typedef struct { @@ -64,13 +136,13 @@ static void sub_08090B6C(FurnitureEntity*); static void sub_08090E4C(FurnitureEntity*); static void sub_08090CDC(u32, u32, u32); -void Furniture(FurnitureEntity* this) { +void Furniture(Entity* this) { static FurnitureAction* const sFurnitureActions[] = { FurnitureInit, FurnitureUpdate, }; - sFurnitureActions[super->action](this); + sFurnitureActions[this->action]((FurnitureEntity*)this); } static void FurnitureInit(FurnitureEntity* this) { @@ -140,23 +212,23 @@ static void FurnitureInit(FurnitureEntity* this) { } switch (super->type) { - case 1: + case CRATE: if (super->type2 != 0) { super->spritePriority.b0 = 4; } break; - case 9: - e = CreateObject(FURNITURE, 62, 0); + case SMITH_FORGE: + e = CreateObject(FURNITURE, FORGE_HELPER, 0); if (e != NULL) { PositionRelative(super, e, 0x100000, 0x100000); e->frameIndex = 1; - e->updatePriority = 2; + e->updatePriority = PRIO_MESSAGE; } break; - case 30: + case SHOE_DESK: sub_0807B7D8(774, this->tile + 65, 2); break; - case 31: + case STAIRCASE: super->collisionLayer = 1; super->spriteOrientation.flipY = 2; SetTile(0x4074, this->tile - 64, super->collisionLayer); @@ -164,16 +236,16 @@ static void FurnitureInit(FurnitureEntity* this) { SetTile(0x4017, this->tile, super->collisionLayer); SetTile(0x4017, this->tile + 64, super->collisionLayer); break; - case 40: + case MINISH_CHEESE: if (super->type2 != 0) super->spriteOffsetX = -4; break; - case 59: + case WOODEN_TABLE: SetTile(0x4023, this->tile - 65, super->collisionLayer); SetTile(0x4023, this->tile - 64, super->collisionLayer); SetTile(0x4023, this->tile - 63, super->collisionLayer); break; - case 60: + case LOW_BOOKSHELF: SetTile(0x4022, this->tile + 65, super->collisionLayer); } } @@ -195,7 +267,7 @@ static void FurnitureUpdate(FurnitureEntity* this) { } break; case 0x10: - if (super->type != 62) { + if (super->type != FORGE_HELPER) { if (++super->actionDelay == 20) { super->frameIndex = (super->frameIndex + 1) & 3; super->actionDelay = 0; From c2ba47d796dfdbd091d534ee70456fd47d2ef4b6 Mon Sep 17 00:00:00 2001 From: theo3 Date: Fri, 17 Dec 2021 11:26:16 -0800 Subject: [PATCH 3/4] identify more objects --- asm/{object29.s => ambientClouds.s} | 4 +- asm/{objectA0.s => angryStatue.s} | 4 +- asm/{object26.s => barrelInside.s} | 4 +- asm/{object80.s => board.s} | 4 +- asm/{object8A.s => cabinFurniture.s} | 4 +- asm/{object8B.s => doubleBookshelf.s} | 4 +- asm/{objectA5.s => fireballChain.s} | 4 +- asm/{object51.s => giantRock2.s} | 4 +- asm/{objectBA.s => gyorgBossObject.s} | 4 +- asm/{object93.s => lamp.s} | 4 +- asm/{object89.s => mazaalBossObject.s} | 4 +- asm/{object4.s => minishEmoticon.s} | 4 +- asm/{object5A.s => paper.s} | 4 +- asm/{object24.s => pressurePlate.s} | 4 +- asm/{object72.s => stoneTablet.s} | 4 +- assets/assets.json | 120 +++++++++--------- data/animations/object/ambientClouds.s | 16 +++ data/animations/object/angryStatue.s | 34 +++++ .../object/{objectBA.s => gyorgBossObject.s} | 16 +-- data/animations/object/lamp.s | 23 ++++ data/animations/object/minishEmoticon.s | 112 ++++++++++++++++ data/animations/object/object24.s | 27 ---- data/animations/object/object29.s | 16 --- data/animations/object/object4.s | 112 ---------------- data/animations/object/object93.s | 23 ---- data/animations/object/objectA0.s | 34 ----- data/animations/object/pressurePlate.s | 27 ++++ .../object/{object29.s => ambientClouds.s} | 0 .../object/{objectA0.s => angryStatue.s} | 2 +- .../object/{object26.s => barrelInside.s} | 4 +- data/const/object/{object80.s => board.s} | 2 +- .../object/{object8A.s => cabinFurniture.s} | 0 .../object/{object8B.s => doubleBookshelf.s} | 2 +- .../const/object/{object51.s => giantRock2.s} | 0 .../object/{objectBA.s => gyorgBossObject.s} | 2 +- .../object/{object89.s => mazaalBossObject.s} | 0 .../object/{object4.s => minishEmoticon.s} | 0 data/const/object/{object5A.s => paper.s} | 0 .../object/{object24.s => pressurePlate.s} | 2 +- .../object/{object72.s => stoneTablet.s} | 4 +- data/gfx/sprite_frames.s | 4 +- data/gfx/sprite_ptrs.s | 14 +- include/definitions.h | 12 +- include/object.h | 64 +++++----- linker.ld | 73 +++++------ src/manager/manager2B.c | 2 +- src/object.c | 32 ++--- src/object/furniture.c | 2 +- src/object/{object9E.c => treeThorns.c} | 4 +- src/objectDefinitions.c | 6 +- 50 files changed, 426 insertions(+), 425 deletions(-) rename asm/{object29.s => ambientClouds.s} (99%) rename asm/{objectA0.s => angryStatue.s} (98%) rename asm/{object26.s => barrelInside.s} (96%) rename asm/{object80.s => board.s} (98%) rename asm/{object8A.s => cabinFurniture.s} (98%) rename asm/{object8B.s => doubleBookshelf.s} (99%) rename asm/{objectA5.s => fireballChain.s} (93%) rename asm/{object51.s => giantRock2.s} (96%) rename asm/{objectBA.s => gyorgBossObject.s} (99%) rename asm/{object93.s => lamp.s} (92%) rename asm/{object89.s => mazaalBossObject.s} (99%) rename asm/{object4.s => minishEmoticon.s} (98%) rename asm/{object5A.s => paper.s} (98%) rename asm/{object24.s => pressurePlate.s} (98%) rename asm/{object72.s => stoneTablet.s} (96%) create mode 100644 data/animations/object/ambientClouds.s create mode 100644 data/animations/object/angryStatue.s rename data/animations/object/{objectBA.s => gyorgBossObject.s} (59%) create mode 100644 data/animations/object/lamp.s create mode 100644 data/animations/object/minishEmoticon.s delete mode 100644 data/animations/object/object24.s delete mode 100644 data/animations/object/object29.s delete mode 100644 data/animations/object/object4.s delete mode 100644 data/animations/object/object93.s delete mode 100644 data/animations/object/objectA0.s create mode 100644 data/animations/object/pressurePlate.s rename data/const/object/{object29.s => ambientClouds.s} (100%) rename data/const/object/{objectA0.s => angryStatue.s} (86%) rename data/const/object/{object26.s => barrelInside.s} (64%) rename data/const/object/{object80.s => board.s} (83%) rename data/const/object/{object8A.s => cabinFurniture.s} (100%) rename data/const/object/{object8B.s => doubleBookshelf.s} (83%) rename data/const/object/{object51.s => giantRock2.s} (100%) rename data/const/object/{objectBA.s => gyorgBossObject.s} (88%) rename data/const/object/{object89.s => mazaalBossObject.s} (100%) rename data/const/object/{object4.s => minishEmoticon.s} (100%) rename data/const/object/{object5A.s => paper.s} (100%) rename data/const/object/{object24.s => pressurePlate.s} (83%) rename data/const/object/{object72.s => stoneTablet.s} (72%) rename src/object/{object9E.c => treeThorns.c} (92%) diff --git a/asm/object29.s b/asm/ambientClouds.s similarity index 99% rename from asm/object29.s rename to asm/ambientClouds.s index 59abd928..05a600c8 100644 --- a/asm/object29.s +++ b/asm/ambientClouds.s @@ -7,8 +7,8 @@ .text - thumb_func_start Object29 -Object29: @ 0x08089848 + thumb_func_start AmbientClouds +AmbientClouds: @ 0x08089848 push {r4, lr} adds r4, r0, #0 ldr r1, _08089870 @ =gUnk_08120D90 diff --git a/asm/objectA0.s b/asm/angryStatue.s similarity index 98% rename from asm/objectA0.s rename to asm/angryStatue.s index 17e17e6d..6383a766 100644 --- a/asm/objectA0.s +++ b/asm/angryStatue.s @@ -7,8 +7,8 @@ .text - thumb_func_start ObjectA0 -ObjectA0: @ 0x0809F12C + thumb_func_start AngryStatue +AngryStatue: @ 0x0809F12C push {lr} ldr r2, _0809F140 @ =gUnk_08124670 ldrb r1, [r0, #0xc] diff --git a/asm/object26.s b/asm/barrelInside.s similarity index 96% rename from asm/object26.s rename to asm/barrelInside.s index 6005735c..e2c26772 100644 --- a/asm/object26.s +++ b/asm/barrelInside.s @@ -7,8 +7,8 @@ .text - thumb_func_start Object26 -Object26: @ 0x08089134 + thumb_func_start BarrelInside +BarrelInside: @ 0x08089134 push {r4, r5, lr} adds r5, r0, #0 ldrb r0, [r5, #0xc] diff --git a/asm/object80.s b/asm/board.s similarity index 98% rename from asm/object80.s rename to asm/board.s index 1b158d68..01b22d8c 100644 --- a/asm/object80.s +++ b/asm/board.s @@ -7,8 +7,8 @@ .text - thumb_func_start Object80 -Object80: @ 0x08098B10 + thumb_func_start Board +Board: @ 0x08098B10 push {lr} ldr r2, _08098B24 @ =gUnk_08123664 ldrb r1, [r0, #0xc] diff --git a/asm/object8A.s b/asm/cabinFurniture.s similarity index 98% rename from asm/object8A.s rename to asm/cabinFurniture.s index b6f8f79f..e2799e52 100644 --- a/asm/object8A.s +++ b/asm/cabinFurniture.s @@ -7,8 +7,8 @@ .text - thumb_func_start Object8A -Object8A: @ 0x0809ADB4 + thumb_func_start CabinFurniture +CabinFurniture: @ 0x0809ADB4 push {lr} ldr r2, _0809ADC8 @ =gUnk_08123D4C ldrb r1, [r0, #0xc] diff --git a/asm/object8B.s b/asm/doubleBookshelf.s similarity index 99% rename from asm/object8B.s rename to asm/doubleBookshelf.s index 0a6e701a..aa06fe22 100644 --- a/asm/object8B.s +++ b/asm/doubleBookshelf.s @@ -7,8 +7,8 @@ .text - thumb_func_start Object8B -Object8B: @ 0x0809AF5C + thumb_func_start DoubleBookshelf +DoubleBookshelf: @ 0x0809AF5C push {lr} ldr r2, _0809AF70 @ =gUnk_08123D58 ldrb r1, [r0, #0xc] diff --git a/asm/objectA5.s b/asm/fireballChain.s similarity index 93% rename from asm/objectA5.s rename to asm/fireballChain.s index 44831ffc..dfda3925 100644 --- a/asm/objectA5.s +++ b/asm/fireballChain.s @@ -7,8 +7,8 @@ .text - thumb_func_start ObjectA5 -ObjectA5: @ 0x0809F8A4 + thumb_func_start FireballChain +FireballChain: @ 0x0809F8A4 push {r4, r5, r6, r7, lr} mov r7, r8 push {r7} diff --git a/asm/object51.s b/asm/giantRock2.s similarity index 96% rename from asm/object51.s rename to asm/giantRock2.s index fddf2b40..b664a087 100644 --- a/asm/object51.s +++ b/asm/giantRock2.s @@ -7,8 +7,8 @@ .text - thumb_func_start Object51 -Object51: @ 0x08090FF8 + thumb_func_start GiantRock2 +GiantRock2: @ 0x08090FF8 push {lr} ldr r2, _0809100C @ =gUnk_08122278 ldrb r1, [r0, #0xc] diff --git a/asm/objectBA.s b/asm/gyorgBossObject.s similarity index 99% rename from asm/objectBA.s rename to asm/gyorgBossObject.s index aaa2d687..bf2efd4e 100644 --- a/asm/objectBA.s +++ b/asm/gyorgBossObject.s @@ -7,8 +7,8 @@ .text - thumb_func_start ObjectBA -ObjectBA: @ 0x080A16DC + thumb_func_start GyorgBossObject +GyorgBossObject: @ 0x080A16DC push {r4, lr} adds r4, r0, #0 ldr r1, _080A1700 @ =gUnk_08124ED0 diff --git a/asm/object93.s b/asm/lamp.s similarity index 92% rename from asm/object93.s rename to asm/lamp.s index 2862be71..f94156fe 100644 --- a/asm/object93.s +++ b/asm/lamp.s @@ -6,8 +6,8 @@ .text - thumb_func_start Object93 -Object93: @ 0x0809CE90 + thumb_func_start Lamp +Lamp: @ 0x0809CE90 push {lr} ldr r2, _0809CEA4 @ =gUnk_08123E80 ldrb r1, [r0, #0xc] diff --git a/asm/object89.s b/asm/mazaalBossObject.s similarity index 99% rename from asm/object89.s rename to asm/mazaalBossObject.s index 69ca1913..22ea10b6 100644 --- a/asm/object89.s +++ b/asm/mazaalBossObject.s @@ -7,8 +7,8 @@ .text - thumb_func_start Object89 -Object89: @ 0x0809AAEC + thumb_func_start MazaalBossObject +MazaalBossObject: @ 0x0809AAEC push {lr} ldr r2, _0809AB00 @ =gUnk_08123D28 ldrb r1, [r0, #0xc] diff --git a/asm/object4.s b/asm/minishEmoticon.s similarity index 98% rename from asm/object4.s rename to asm/minishEmoticon.s index c439f4e3..3a8f533e 100644 --- a/asm/object4.s +++ b/asm/minishEmoticon.s @@ -7,8 +7,8 @@ .text - thumb_func_start Object4 -Object4: @ 0x08082040 + thumb_func_start MinishEmoticon +MinishEmoticon: @ 0x08082040 push {lr} ldr r2, _08082054 @ =gUnk_0811EE5C ldrb r1, [r0, #0xc] diff --git a/asm/object5A.s b/asm/paper.s similarity index 98% rename from asm/object5A.s rename to asm/paper.s index 9bc22d68..cd693e79 100644 --- a/asm/object5A.s +++ b/asm/paper.s @@ -7,8 +7,8 @@ .text - thumb_func_start Object5A -Object5A: @ 0x0809271C + thumb_func_start Paper +Paper: @ 0x0809271C push {lr} ldr r2, _08092730 @ =gUnk_08122780 ldrb r1, [r0, #0xc] diff --git a/asm/object24.s b/asm/pressurePlate.s similarity index 98% rename from asm/object24.s rename to asm/pressurePlate.s index 00ed5c8b..a001c65a 100644 --- a/asm/object24.s +++ b/asm/pressurePlate.s @@ -7,8 +7,8 @@ .text - thumb_func_start Object24 -Object24: @ 0x08088804 + thumb_func_start PressurePlate +PressurePlate: @ 0x08088804 push {r4, lr} adds r4, r0, #0 ldrb r0, [r4, #0xf] diff --git a/asm/object72.s b/asm/stoneTablet.s similarity index 96% rename from asm/object72.s rename to asm/stoneTablet.s index 0f25ded5..77588487 100644 --- a/asm/object72.s +++ b/asm/stoneTablet.s @@ -7,8 +7,8 @@ .text - thumb_func_start Object72 -Object72: @ 0x080979B4 + thumb_func_start StoneTablet +StoneTablet: @ 0x080979B4 push {lr} ldr r2, _080979C8 @ =gUnk_081232E4 ldrb r1, [r0, #0xc] diff --git a/assets/assets.json b/assets/assets.json index 38ff89a0..67bbda54 100644 --- a/assets/assets.json +++ b/assets/assets.json @@ -41660,7 +41660,7 @@ "type": "sprite_frame" }, { - "path": "sprites/gSpriteFrames_Object4.bin", + "path": "sprites/gSpriteFrames_MinishEmoticon.bin", "start": 1142028, "size": 200, "type": "sprite_frame" @@ -42820,151 +42820,151 @@ "size": 12 }, { - "path": "animations/gSpriteAnimations_Object4_2.bin", + "path": "animations/gSpriteAnimations_MinishEmoticon_2.bin", "start": 1175140, "size": 41, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object4_10.bin", + "path": "animations/gSpriteAnimations_MinishEmoticon_10.bin", "start": 1175181, "size": 4, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object4_3.bin", + "path": "animations/gSpriteAnimations_MinishEmoticon_3.bin", "start": 1175185, "size": 41, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object4_11.bin", + "path": "animations/gSpriteAnimations_MinishEmoticon_11.bin", "start": 1175226, "size": 4, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object4_0.bin", + "path": "animations/gSpriteAnimations_MinishEmoticon_0.bin", "start": 1175230, "size": 5, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object4_8.bin", + "path": "animations/gSpriteAnimations_MinishEmoticon_8.bin", "start": 1175235, "size": 4, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object4_1.bin", + "path": "animations/gSpriteAnimations_MinishEmoticon_1.bin", "start": 1175239, "size": 41, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object4_9.bin", + "path": "animations/gSpriteAnimations_MinishEmoticon_9.bin", "start": 1175280, "size": 4, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object4_12.bin", + "path": "animations/gSpriteAnimations_MinishEmoticon_12.bin", "start": 1175284, "size": 9, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object4_13.bin", + "path": "animations/gSpriteAnimations_MinishEmoticon_13.bin", "start": 1175293, "size": 9, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object4_14.bin", + "path": "animations/gSpriteAnimations_MinishEmoticon_14.bin", "start": 1175302, "size": 9, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object4_19.bin", + "path": "animations/gSpriteAnimations_MinishEmoticon_19.bin", "start": 1175311, "size": 40, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object4_15.bin", + "path": "animations/gSpriteAnimations_MinishEmoticon_15.bin", "start": 1175351, "size": 24, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object4_16.bin", + "path": "animations/gSpriteAnimations_MinishEmoticon_16.bin", "start": 1175375, "size": 24, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object4_17.bin", + "path": "animations/gSpriteAnimations_MinishEmoticon_17.bin", "start": 1175399, "size": 24, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object4_18.bin", + "path": "animations/gSpriteAnimations_MinishEmoticon_18.bin", "start": 1175423, "size": 24, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object4_22.bin", + "path": "animations/gSpriteAnimations_MinishEmoticon_22.bin", "start": 1175447, "size": 9, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object4_23.bin", + "path": "animations/gSpriteAnimations_MinishEmoticon_23.bin", "start": 1175456, "size": 9, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object4_20.bin", + "path": "animations/gSpriteAnimations_MinishEmoticon_20.bin", "start": 1175465, "size": 9, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object4_21.bin", + "path": "animations/gSpriteAnimations_MinishEmoticon_21.bin", "start": 1175474, "size": 9, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object4_24.bin", + "path": "animations/gSpriteAnimations_MinishEmoticon_24.bin", "start": 1175483, "size": 9, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object4_25.bin", + "path": "animations/gSpriteAnimations_MinishEmoticon_25.bin", "start": 1175492, "size": 21, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object4_26.bin", + "path": "animations/gSpriteAnimations_MinishEmoticon_26.bin", "start": 1175513, "size": 21, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object4_27.bin", + "path": "animations/gSpriteAnimations_MinishEmoticon_27.bin", "start": 1175534, "size": 21, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object4_28.bin", + "path": "animations/gSpriteAnimations_MinishEmoticon_28.bin", "start": 1175555, "size": 21, "type": "animation" @@ -44273,37 +44273,37 @@ "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object24_0.bin", + "path": "animations/gSpriteAnimations_PressurePlate_0.bin", "start": 1182705, "size": 4, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object24_1.bin", + "path": "animations/gSpriteAnimations_PressurePlate_1.bin", "start": 1182709, "size": 4, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object24_2.bin", + "path": "animations/gSpriteAnimations_PressurePlate_2.bin", "start": 1182713, "size": 4, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object24_3.bin", + "path": "animations/gSpriteAnimations_PressurePlate_3.bin", "start": 1182717, "size": 4, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object24_4.bin", + "path": "animations/gSpriteAnimations_PressurePlate_4.bin", "start": 1182721, "size": 7, "type": "animation" }, { - "path": "object24/gUnk_08120BEC.bin", + "path": "PressurePlate/gUnk_08120BEC.bin", "start": 1182700, "size": 5 }, @@ -44360,12 +44360,12 @@ "size": 8 }, { - "path": "object26/gUnk_08120C80.bin", + "path": "barrelInside/gUnk_08120C80.bin", "start": 1182848, "size": 18 }, { - "path": "object26/gUnk_08120C92.bin", + "path": "barrelInside/gUnk_08120C92.bin", "start": 1182866, "size": 6 }, @@ -44396,13 +44396,13 @@ "size": 26 }, { - "path": "animations/gSpriteAnimations_Object29_0.bin", + "path": "animations/gSpriteAnimations_AmbientClouds_0.bin", "start": 1183136, "size": 17, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object29_1.bin", + "path": "animations/gSpriteAnimations_AmbientClouds_1.bin", "start": 1183153, "size": 19, "type": "animation" @@ -46228,12 +46228,12 @@ "size": 6 }, { - "path": "object72/gUnk_081232EC.bin", + "path": "stoneTablet/gUnk_081232EC.bin", "start": 1192684, "size": 18 }, { - "path": "object72/gUnk_081232FE.bin", + "path": "stoneTablet/gUnk_081232FE.bin", "start": 1192702, "size": 26 }, @@ -46391,7 +46391,7 @@ "size": 6 }, { - "path": "object80/gUnk_0812366C.bin", + "path": "board/gUnk_0812366C.bin", "start": 1193580, "size": 8 }, @@ -46571,7 +46571,7 @@ "size": 40 }, { - "path": "object8B/gUnk_08123D68.bin", + "path": "doubleBookshelf/gUnk_08123D68.bin", "start": 1195368, "size": 20 }, @@ -46602,25 +46602,25 @@ "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object93_0_0.bin", + "path": "animations/gSpriteAnimations_Lamp_0_0.bin", "start": 1195656, "size": 20, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object93_0.bin", + "path": "animations/gSpriteAnimations_Lamp_0.bin", "start": 1195680, "size": 4, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object93_1_0.bin", + "path": "animations/gSpriteAnimations_Lamp_1_0.bin", "start": 1195684, "size": 20, "type": "animation" }, { - "path": "animations/gSpriteAnimations_Object93_1.bin", + "path": "animations/gSpriteAnimations_Lamp_1.bin", "start": 1195708, "size": 4, "type": "animation" @@ -46801,43 +46801,43 @@ "size": 8 }, { - "path": "animations/gSpriteAnimations_ObjectA0_1.bin", + "path": "animations/gSpriteAnimations_AngryStatue_1.bin", "start": 1197708, "size": 4, "type": "animation" }, { - "path": "animations/gSpriteAnimations_ObjectA0_0.bin", + "path": "animations/gSpriteAnimations_AngryStatue_0.bin", "start": 1197712, "size": 4, "type": "animation" }, { - "path": "animations/gSpriteAnimations_ObjectA0_3.bin", + "path": "animations/gSpriteAnimations_AngryStatue_3.bin", "start": 1197716, "size": 4, "type": "animation" }, { - "path": "animations/gSpriteAnimations_ObjectA0_5.bin", + "path": "animations/gSpriteAnimations_AngryStatue_5.bin", "start": 1197720, "size": 16, "type": "animation" }, { - "path": "animations/gSpriteAnimations_ObjectA0_4.bin", + "path": "animations/gSpriteAnimations_AngryStatue_4.bin", "start": 1197736, "size": 16, "type": "animation" }, { - "path": "animations/gSpriteAnimations_ObjectA0_7.bin", + "path": "animations/gSpriteAnimations_AngryStatue_7.bin", "start": 1197752, "size": 16, "type": "animation" }, { - "path": "objectA0/gUnk_08124684.bin", + "path": "angryStatue/gUnk_08124684.bin", "start": 1197700, "size": 8 }, @@ -47082,47 +47082,47 @@ "size": 4 }, { - "path": "objectBA/gUnk_08124F08.bin", + "path": "gyorgBossObject/gUnk_08124F08.bin", "start": 1199880, "size": 32 }, { - "path": "objectBA/gUnk_08124F28.bin", + "path": "gyorgBossObject/gUnk_08124F28.bin", "start": 1199912, "size": 32 }, { - "path": "objectBA/gUnk_08124F48.bin", + "path": "gyorgBossObject/gUnk_08124F48.bin", "start": 1199944, "size": 32 }, { - "path": "objectBA/gUnk_08124F68.bin", + "path": "gyorgBossObject/gUnk_08124F68.bin", "start": 1199976, "size": 32 }, { - "path": "objectBA/gUnk_08124F88.bin", + "path": "gyorgBossObject/gUnk_08124F88.bin", "start": 1200008, "size": 32 }, { - "path": "objectBA/gUnk_08124FA8.bin", + "path": "gyorgBossObject/gUnk_08124FA8.bin", "start": 1200040, "size": 32 }, { - "path": "objectBA/gUnk_08124FC8.bin", + "path": "gyorgBossObject/gUnk_08124FC8.bin", "start": 1200072, "size": 20 }, { - "path": "objectBA/gUnk_08124FDC.bin", + "path": "gyorgBossObject/gUnk_08124FDC.bin", "start": 1200092, "size": 20 }, { - "path": "objectBA/gUnk_08124EF8.bin", + "path": "gyorgBossObject/gUnk_08124EF8.bin", "start": 1199864, "size": 16 }, diff --git a/data/animations/object/ambientClouds.s b/data/animations/object/ambientClouds.s new file mode 100644 index 00000000..16463f0a --- /dev/null +++ b/data/animations/object/ambientClouds.s @@ -0,0 +1,16 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2 + +gSpriteAnimations_AmbientClouds_0:: @ 08120DA0 + .include "animations/gSpriteAnimations_AmbientClouds_0.s" + +gSpriteAnimations_AmbientClouds_1:: @ 08120DB1 + .include "animations/gSpriteAnimations_AmbientClouds_1.s" + +gSpriteAnimations_AmbientClouds:: @ 08120DC4 + .4byte gSpriteAnimations_AmbientClouds_0 + .4byte gSpriteAnimations_AmbientClouds_1 + .4byte 00000000 diff --git a/data/animations/object/angryStatue.s b/data/animations/object/angryStatue.s new file mode 100644 index 00000000..8d1791bf --- /dev/null +++ b/data/animations/object/angryStatue.s @@ -0,0 +1,34 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2 + +gSpriteAnimations_AngryStatue_1:: @ 0812468C + .include "animations/gSpriteAnimations_AngryStatue_1.s" + +gSpriteAnimations_AngryStatue_0:: @ 08124690 + .include "animations/gSpriteAnimations_AngryStatue_0.s" + +gSpriteAnimations_AngryStatue_3:: @ 08124694 + .include "animations/gSpriteAnimations_AngryStatue_3.s" + +gSpriteAnimations_AngryStatue_5:: @ 08124698 + .include "animations/gSpriteAnimations_AngryStatue_5.s" + +gSpriteAnimations_AngryStatue_4:: @ 081246A8 + .include "animations/gSpriteAnimations_AngryStatue_4.s" + +gSpriteAnimations_AngryStatue_7:: @ 081246B8 + .include "animations/gSpriteAnimations_AngryStatue_7.s" + +gSpriteAnimations_AngryStatue:: @ 081246C8 + .4byte gSpriteAnimations_AngryStatue_0 + .4byte gSpriteAnimations_AngryStatue_1 + .4byte gSpriteAnimations_AngryStatue_0 + .4byte gSpriteAnimations_AngryStatue_3 + .4byte gSpriteAnimations_AngryStatue_4 + .4byte gSpriteAnimations_AngryStatue_5 + .4byte gSpriteAnimations_AngryStatue_4 + .4byte gSpriteAnimations_AngryStatue_7 + .4byte 00000000 diff --git a/data/animations/object/objectBA.s b/data/animations/object/gyorgBossObject.s similarity index 59% rename from data/animations/object/objectBA.s rename to data/animations/object/gyorgBossObject.s index 4489eee6..3dc36b66 100644 --- a/data/animations/object/objectBA.s +++ b/data/animations/object/gyorgBossObject.s @@ -5,28 +5,28 @@ .align 2 gUnk_08124F08:: @ 08124F08 - .incbin "objectBA/gUnk_08124F08.bin" + .incbin "gyorgBossObject/gUnk_08124F08.bin" gUnk_08124F28:: @ 08124F28 - .incbin "objectBA/gUnk_08124F28.bin" + .incbin "gyorgBossObject/gUnk_08124F28.bin" gUnk_08124F48:: @ 08124F48 - .incbin "objectBA/gUnk_08124F48.bin" + .incbin "gyorgBossObject/gUnk_08124F48.bin" gUnk_08124F68:: @ 08124F68 - .incbin "objectBA/gUnk_08124F68.bin" + .incbin "gyorgBossObject/gUnk_08124F68.bin" gUnk_08124F88:: @ 08124F88 - .incbin "objectBA/gUnk_08124F88.bin" + .incbin "gyorgBossObject/gUnk_08124F88.bin" gUnk_08124FA8:: @ 08124FA8 - .incbin "objectBA/gUnk_08124FA8.bin" + .incbin "gyorgBossObject/gUnk_08124FA8.bin" gUnk_08124FC8:: @ 08124FC8 - .incbin "objectBA/gUnk_08124FC8.bin" + .incbin "gyorgBossObject/gUnk_08124FC8.bin" gUnk_08124FDC:: @ 08124FDC - .incbin "objectBA/gUnk_08124FDC.bin" + .incbin "gyorgBossObject/gUnk_08124FDC.bin" gUnk_08124FF0:: @ 08124FF0 .4byte gUnk_08124F08 diff --git a/data/animations/object/lamp.s b/data/animations/object/lamp.s new file mode 100644 index 00000000..4fbfe695 --- /dev/null +++ b/data/animations/object/lamp.s @@ -0,0 +1,23 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2 + +gUnk_08123E80:: @ 08123E80 + .4byte sub_0809CEA8 + .4byte sub_0809CEC0 + +gSpriteAnimations_Lamp_0_0:: @ 08123E88 + .include "animations/gSpriteAnimations_Lamp_0_0.s" + +gSpriteAnimations_Lamp_0:: @ 08123E9C + .4byte gSpriteAnimations_Lamp_0_0 + .include "animations/gSpriteAnimations_Lamp_0.s" + +gSpriteAnimations_Lamp_1_0:: @ 08123EA4 + .include "animations/gSpriteAnimations_Lamp_1_0.s" + +gSpriteAnimations_Lamp_1:: @ 08123EB8 + .4byte gSpriteAnimations_Lamp_1_0 + .include "animations/gSpriteAnimations_Lamp_1.s" diff --git a/data/animations/object/minishEmoticon.s b/data/animations/object/minishEmoticon.s new file mode 100644 index 00000000..6ff92722 --- /dev/null +++ b/data/animations/object/minishEmoticon.s @@ -0,0 +1,112 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2 + +gSpriteAnimations_MinishEmoticon_2:: @ 0811EE64 + .include "animations/gSpriteAnimations_MinishEmoticon_2.s" + +gSpriteAnimations_MinishEmoticon_10:: @ 0811EE8D + .include "animations/gSpriteAnimations_MinishEmoticon_10.s" + +gSpriteAnimations_MinishEmoticon_3:: @ 0811EE91 + .include "animations/gSpriteAnimations_MinishEmoticon_3.s" + +gSpriteAnimations_MinishEmoticon_11:: @ 0811EEBA + .include "animations/gSpriteAnimations_MinishEmoticon_11.s" + +gSpriteAnimations_MinishEmoticon_0:: @ 0811EEBE + .include "animations/gSpriteAnimations_MinishEmoticon_0.s" + +gSpriteAnimations_MinishEmoticon_8:: @ 0811EEC3 + .include "animations/gSpriteAnimations_MinishEmoticon_8.s" + +gSpriteAnimations_MinishEmoticon_1:: @ 0811EEC7 + .include "animations/gSpriteAnimations_MinishEmoticon_1.s" + +gSpriteAnimations_MinishEmoticon_9:: @ 0811EEF0 + .include "animations/gSpriteAnimations_MinishEmoticon_9.s" + +gSpriteAnimations_MinishEmoticon_12:: @ 0811EEF4 + .include "animations/gSpriteAnimations_MinishEmoticon_12.s" + +gSpriteAnimations_MinishEmoticon_13:: @ 0811EEFD + .include "animations/gSpriteAnimations_MinishEmoticon_13.s" + +gSpriteAnimations_MinishEmoticon_14:: @ 0811EF06 + .include "animations/gSpriteAnimations_MinishEmoticon_14.s" + +gSpriteAnimations_MinishEmoticon_19:: @ 0811EF0F + .include "animations/gSpriteAnimations_MinishEmoticon_19.s" + +gSpriteAnimations_MinishEmoticon_15:: @ 0811EF37 + .include "animations/gSpriteAnimations_MinishEmoticon_15.s" + +gSpriteAnimations_MinishEmoticon_16:: @ 0811EF4F + .include "animations/gSpriteAnimations_MinishEmoticon_16.s" + +gSpriteAnimations_MinishEmoticon_17:: @ 0811EF67 + .include "animations/gSpriteAnimations_MinishEmoticon_17.s" + +gSpriteAnimations_MinishEmoticon_18:: @ 0811EF7F + .include "animations/gSpriteAnimations_MinishEmoticon_18.s" + +gSpriteAnimations_MinishEmoticon_22:: @ 0811EF97 + .include "animations/gSpriteAnimations_MinishEmoticon_22.s" + +gSpriteAnimations_MinishEmoticon_23:: @ 0811EFA0 + .include "animations/gSpriteAnimations_MinishEmoticon_23.s" + +gSpriteAnimations_MinishEmoticon_20:: @ 0811EFA9 + .include "animations/gSpriteAnimations_MinishEmoticon_20.s" + +gSpriteAnimations_MinishEmoticon_21:: @ 0811EFB2 + .include "animations/gSpriteAnimations_MinishEmoticon_21.s" + +gSpriteAnimations_MinishEmoticon_24:: @ 0811EFBB + .include "animations/gSpriteAnimations_MinishEmoticon_24.s" + +gSpriteAnimations_MinishEmoticon_25:: @ 0811EFC4 + .include "animations/gSpriteAnimations_MinishEmoticon_25.s" + +gSpriteAnimations_MinishEmoticon_26:: @ 0811EFD9 + .include "animations/gSpriteAnimations_MinishEmoticon_26.s" + +gSpriteAnimations_MinishEmoticon_27:: @ 0811EFEE + .include "animations/gSpriteAnimations_MinishEmoticon_27.s" + +gSpriteAnimations_MinishEmoticon_28:: @ 0811F003 + .include "animations/gSpriteAnimations_MinishEmoticon_28.s" + +gSpriteAnimations_MinishEmoticon:: @ 0811F018 + .4byte gSpriteAnimations_MinishEmoticon_0 + .4byte gSpriteAnimations_MinishEmoticon_1 + .4byte gSpriteAnimations_MinishEmoticon_2 + .4byte gSpriteAnimations_MinishEmoticon_3 + .4byte gSpriteAnimations_MinishEmoticon_0 + .4byte gSpriteAnimations_MinishEmoticon_1 + .4byte gSpriteAnimations_MinishEmoticon_2 + .4byte gSpriteAnimations_MinishEmoticon_3 + .4byte gSpriteAnimations_MinishEmoticon_8 + .4byte gSpriteAnimations_MinishEmoticon_9 + .4byte gSpriteAnimations_MinishEmoticon_10 + .4byte gSpriteAnimations_MinishEmoticon_11 + .4byte gSpriteAnimations_MinishEmoticon_12 + .4byte gSpriteAnimations_MinishEmoticon_13 + .4byte gSpriteAnimations_MinishEmoticon_14 + .4byte gSpriteAnimations_MinishEmoticon_15 + .4byte gSpriteAnimations_MinishEmoticon_16 + .4byte gSpriteAnimations_MinishEmoticon_17 + .4byte gSpriteAnimations_MinishEmoticon_18 + .4byte gSpriteAnimations_MinishEmoticon_19 + .4byte gSpriteAnimations_MinishEmoticon_20 + .4byte gSpriteAnimations_MinishEmoticon_21 + .4byte gSpriteAnimations_MinishEmoticon_22 + .4byte gSpriteAnimations_MinishEmoticon_23 + .4byte gSpriteAnimations_MinishEmoticon_24 + .4byte gSpriteAnimations_MinishEmoticon_25 + .4byte gSpriteAnimations_MinishEmoticon_26 + .4byte gSpriteAnimations_MinishEmoticon_27 + .4byte gSpriteAnimations_MinishEmoticon_28 + .4byte 00000000 diff --git a/data/animations/object/object24.s b/data/animations/object/object24.s deleted file mode 100644 index d3de774e..00000000 --- a/data/animations/object/object24.s +++ /dev/null @@ -1,27 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata -@ .align 2 - -gSpriteAnimations_Object24_0:: @ 08120BF1 - .include "animations/gSpriteAnimations_Object24_0.s" - -gSpriteAnimations_Object24_1:: @ 08120BF5 - .include "animations/gSpriteAnimations_Object24_1.s" - -gSpriteAnimations_Object24_2:: @ 08120BF9 - .include "animations/gSpriteAnimations_Object24_2.s" - -gSpriteAnimations_Object24_3:: @ 08120BFD - .include "animations/gSpriteAnimations_Object24_3.s" - -gSpriteAnimations_Object24_4:: @ 08120C01 - .include "animations/gSpriteAnimations_Object24_4.s" - -gSpriteAnimations_Object24:: @ 08120C08 - .4byte gSpriteAnimations_Object24_0 - .4byte gSpriteAnimations_Object24_1 - .4byte gSpriteAnimations_Object24_2 - .4byte gSpriteAnimations_Object24_3 - .4byte gSpriteAnimations_Object24_4 diff --git a/data/animations/object/object29.s b/data/animations/object/object29.s deleted file mode 100644 index ea360cd1..00000000 --- a/data/animations/object/object29.s +++ /dev/null @@ -1,16 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gSpriteAnimations_Object29_0:: @ 08120DA0 - .include "animations/gSpriteAnimations_Object29_0.s" - -gSpriteAnimations_Object29_1:: @ 08120DB1 - .include "animations/gSpriteAnimations_Object29_1.s" - -gSpriteAnimations_Object29:: @ 08120DC4 - .4byte gSpriteAnimations_Object29_0 - .4byte gSpriteAnimations_Object29_1 - .4byte 00000000 diff --git a/data/animations/object/object4.s b/data/animations/object/object4.s deleted file mode 100644 index 862d4626..00000000 --- a/data/animations/object/object4.s +++ /dev/null @@ -1,112 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gSpriteAnimations_Object4_2:: @ 0811EE64 - .include "animations/gSpriteAnimations_Object4_2.s" - -gSpriteAnimations_Object4_10:: @ 0811EE8D - .include "animations/gSpriteAnimations_Object4_10.s" - -gSpriteAnimations_Object4_3:: @ 0811EE91 - .include "animations/gSpriteAnimations_Object4_3.s" - -gSpriteAnimations_Object4_11:: @ 0811EEBA - .include "animations/gSpriteAnimations_Object4_11.s" - -gSpriteAnimations_Object4_0:: @ 0811EEBE - .include "animations/gSpriteAnimations_Object4_0.s" - -gSpriteAnimations_Object4_8:: @ 0811EEC3 - .include "animations/gSpriteAnimations_Object4_8.s" - -gSpriteAnimations_Object4_1:: @ 0811EEC7 - .include "animations/gSpriteAnimations_Object4_1.s" - -gSpriteAnimations_Object4_9:: @ 0811EEF0 - .include "animations/gSpriteAnimations_Object4_9.s" - -gSpriteAnimations_Object4_12:: @ 0811EEF4 - .include "animations/gSpriteAnimations_Object4_12.s" - -gSpriteAnimations_Object4_13:: @ 0811EEFD - .include "animations/gSpriteAnimations_Object4_13.s" - -gSpriteAnimations_Object4_14:: @ 0811EF06 - .include "animations/gSpriteAnimations_Object4_14.s" - -gSpriteAnimations_Object4_19:: @ 0811EF0F - .include "animations/gSpriteAnimations_Object4_19.s" - -gSpriteAnimations_Object4_15:: @ 0811EF37 - .include "animations/gSpriteAnimations_Object4_15.s" - -gSpriteAnimations_Object4_16:: @ 0811EF4F - .include "animations/gSpriteAnimations_Object4_16.s" - -gSpriteAnimations_Object4_17:: @ 0811EF67 - .include "animations/gSpriteAnimations_Object4_17.s" - -gSpriteAnimations_Object4_18:: @ 0811EF7F - .include "animations/gSpriteAnimations_Object4_18.s" - -gSpriteAnimations_Object4_22:: @ 0811EF97 - .include "animations/gSpriteAnimations_Object4_22.s" - -gSpriteAnimations_Object4_23:: @ 0811EFA0 - .include "animations/gSpriteAnimations_Object4_23.s" - -gSpriteAnimations_Object4_20:: @ 0811EFA9 - .include "animations/gSpriteAnimations_Object4_20.s" - -gSpriteAnimations_Object4_21:: @ 0811EFB2 - .include "animations/gSpriteAnimations_Object4_21.s" - -gSpriteAnimations_Object4_24:: @ 0811EFBB - .include "animations/gSpriteAnimations_Object4_24.s" - -gSpriteAnimations_Object4_25:: @ 0811EFC4 - .include "animations/gSpriteAnimations_Object4_25.s" - -gSpriteAnimations_Object4_26:: @ 0811EFD9 - .include "animations/gSpriteAnimations_Object4_26.s" - -gSpriteAnimations_Object4_27:: @ 0811EFEE - .include "animations/gSpriteAnimations_Object4_27.s" - -gSpriteAnimations_Object4_28:: @ 0811F003 - .include "animations/gSpriteAnimations_Object4_28.s" - -gSpriteAnimations_Object4:: @ 0811F018 - .4byte gSpriteAnimations_Object4_0 - .4byte gSpriteAnimations_Object4_1 - .4byte gSpriteAnimations_Object4_2 - .4byte gSpriteAnimations_Object4_3 - .4byte gSpriteAnimations_Object4_0 - .4byte gSpriteAnimations_Object4_1 - .4byte gSpriteAnimations_Object4_2 - .4byte gSpriteAnimations_Object4_3 - .4byte gSpriteAnimations_Object4_8 - .4byte gSpriteAnimations_Object4_9 - .4byte gSpriteAnimations_Object4_10 - .4byte gSpriteAnimations_Object4_11 - .4byte gSpriteAnimations_Object4_12 - .4byte gSpriteAnimations_Object4_13 - .4byte gSpriteAnimations_Object4_14 - .4byte gSpriteAnimations_Object4_15 - .4byte gSpriteAnimations_Object4_16 - .4byte gSpriteAnimations_Object4_17 - .4byte gSpriteAnimations_Object4_18 - .4byte gSpriteAnimations_Object4_19 - .4byte gSpriteAnimations_Object4_20 - .4byte gSpriteAnimations_Object4_21 - .4byte gSpriteAnimations_Object4_22 - .4byte gSpriteAnimations_Object4_23 - .4byte gSpriteAnimations_Object4_24 - .4byte gSpriteAnimations_Object4_25 - .4byte gSpriteAnimations_Object4_26 - .4byte gSpriteAnimations_Object4_27 - .4byte gSpriteAnimations_Object4_28 - .4byte 00000000 diff --git a/data/animations/object/object93.s b/data/animations/object/object93.s deleted file mode 100644 index 9fb293f2..00000000 --- a/data/animations/object/object93.s +++ /dev/null @@ -1,23 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_08123E80:: @ 08123E80 - .4byte sub_0809CEA8 - .4byte sub_0809CEC0 - -gSpriteAnimations_Object93_0_0:: @ 08123E88 - .include "animations/gSpriteAnimations_Object93_0_0.s" - -gSpriteAnimations_Object93_0:: @ 08123E9C - .4byte gSpriteAnimations_Object93_0_0 - .include "animations/gSpriteAnimations_Object93_0.s" - -gSpriteAnimations_Object93_1_0:: @ 08123EA4 - .include "animations/gSpriteAnimations_Object93_1_0.s" - -gSpriteAnimations_Object93_1:: @ 08123EB8 - .4byte gSpriteAnimations_Object93_1_0 - .include "animations/gSpriteAnimations_Object93_1.s" diff --git a/data/animations/object/objectA0.s b/data/animations/object/objectA0.s deleted file mode 100644 index bac0fa14..00000000 --- a/data/animations/object/objectA0.s +++ /dev/null @@ -1,34 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gSpriteAnimations_ObjectA0_1:: @ 0812468C - .include "animations/gSpriteAnimations_ObjectA0_1.s" - -gSpriteAnimations_ObjectA0_0:: @ 08124690 - .include "animations/gSpriteAnimations_ObjectA0_0.s" - -gSpriteAnimations_ObjectA0_3:: @ 08124694 - .include "animations/gSpriteAnimations_ObjectA0_3.s" - -gSpriteAnimations_ObjectA0_5:: @ 08124698 - .include "animations/gSpriteAnimations_ObjectA0_5.s" - -gSpriteAnimations_ObjectA0_4:: @ 081246A8 - .include "animations/gSpriteAnimations_ObjectA0_4.s" - -gSpriteAnimations_ObjectA0_7:: @ 081246B8 - .include "animations/gSpriteAnimations_ObjectA0_7.s" - -gSpriteAnimations_ObjectA0:: @ 081246C8 - .4byte gSpriteAnimations_ObjectA0_0 - .4byte gSpriteAnimations_ObjectA0_1 - .4byte gSpriteAnimations_ObjectA0_0 - .4byte gSpriteAnimations_ObjectA0_3 - .4byte gSpriteAnimations_ObjectA0_4 - .4byte gSpriteAnimations_ObjectA0_5 - .4byte gSpriteAnimations_ObjectA0_4 - .4byte gSpriteAnimations_ObjectA0_7 - .4byte 00000000 diff --git a/data/animations/object/pressurePlate.s b/data/animations/object/pressurePlate.s new file mode 100644 index 00000000..75e87fa0 --- /dev/null +++ b/data/animations/object/pressurePlate.s @@ -0,0 +1,27 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata +@ .align 2 + +gSpriteAnimations_PressurePlate_0:: @ 08120BF1 + .include "animations/gSpriteAnimations_PressurePlate_0.s" + +gSpriteAnimations_PressurePlate_1:: @ 08120BF5 + .include "animations/gSpriteAnimations_PressurePlate_1.s" + +gSpriteAnimations_PressurePlate_2:: @ 08120BF9 + .include "animations/gSpriteAnimations_PressurePlate_2.s" + +gSpriteAnimations_PressurePlate_3:: @ 08120BFD + .include "animations/gSpriteAnimations_PressurePlate_3.s" + +gSpriteAnimations_PressurePlate_4:: @ 08120C01 + .include "animations/gSpriteAnimations_PressurePlate_4.s" + +gSpriteAnimations_PressurePlate:: @ 08120C08 + .4byte gSpriteAnimations_PressurePlate_0 + .4byte gSpriteAnimations_PressurePlate_1 + .4byte gSpriteAnimations_PressurePlate_2 + .4byte gSpriteAnimations_PressurePlate_3 + .4byte gSpriteAnimations_PressurePlate_4 diff --git a/data/const/object/object29.s b/data/const/object/ambientClouds.s similarity index 100% rename from data/const/object/object29.s rename to data/const/object/ambientClouds.s diff --git a/data/const/object/objectA0.s b/data/const/object/angryStatue.s similarity index 86% rename from data/const/object/objectA0.s rename to data/const/object/angryStatue.s index d3b0f552..01589469 100644 --- a/data/const/object/objectA0.s +++ b/data/const/object/angryStatue.s @@ -12,4 +12,4 @@ gUnk_08124670:: @ 08124670 .4byte sub_0809F254 gUnk_08124684:: @ 08124684 - .incbin "objectA0/gUnk_08124684.bin" + .incbin "angryStatue/gUnk_08124684.bin" diff --git a/data/const/object/object26.s b/data/const/object/barrelInside.s similarity index 64% rename from data/const/object/object26.s rename to data/const/object/barrelInside.s index fabcda59..13e148d9 100644 --- a/data/const/object/object26.s +++ b/data/const/object/barrelInside.s @@ -5,7 +5,7 @@ .align 2 gUnk_08120C80:: @ 08120C80 - .incbin "object26/gUnk_08120C80.bin" + .incbin "barrelInside/gUnk_08120C80.bin" gUnk_08120C92:: @ 08120C92 - .incbin "object26/gUnk_08120C92.bin" + .incbin "barrelInside/gUnk_08120C92.bin" diff --git a/data/const/object/object80.s b/data/const/object/board.s similarity index 83% rename from data/const/object/object80.s rename to data/const/object/board.s index 2d5c1c1d..2f569052 100644 --- a/data/const/object/object80.s +++ b/data/const/object/board.s @@ -9,4 +9,4 @@ gUnk_08123664:: @ 08123664 .4byte sub_08098BE0 gUnk_0812366C:: @ 0812366C - .incbin "object80/gUnk_0812366C.bin" + .incbin "board/gUnk_0812366C.bin" diff --git a/data/const/object/object8A.s b/data/const/object/cabinFurniture.s similarity index 100% rename from data/const/object/object8A.s rename to data/const/object/cabinFurniture.s diff --git a/data/const/object/object8B.s b/data/const/object/doubleBookshelf.s similarity index 83% rename from data/const/object/object8B.s rename to data/const/object/doubleBookshelf.s index e450780d..9bd699f0 100644 --- a/data/const/object/object8B.s +++ b/data/const/object/doubleBookshelf.s @@ -11,4 +11,4 @@ gUnk_08123D58:: @ 08123D58 .4byte sub_0809B0A8 gUnk_08123D68:: @ 08123D68 - .incbin "object8B/gUnk_08123D68.bin" + .incbin "doubleBookshelf/gUnk_08123D68.bin" diff --git a/data/const/object/object51.s b/data/const/object/giantRock2.s similarity index 100% rename from data/const/object/object51.s rename to data/const/object/giantRock2.s diff --git a/data/const/object/objectBA.s b/data/const/object/gyorgBossObject.s similarity index 88% rename from data/const/object/objectBA.s rename to data/const/object/gyorgBossObject.s index c6ab4a1f..eb5c2617 100644 --- a/data/const/object/objectBA.s +++ b/data/const/object/gyorgBossObject.s @@ -17,4 +17,4 @@ gUnk_08124ED0:: @ 08124ED0 .4byte sub_080A1C04 gUnk_08124EF8:: @ 08124EF8 - .incbin "objectBA/gUnk_08124EF8.bin" + .incbin "gyorgBossObject/gUnk_08124EF8.bin" diff --git a/data/const/object/object89.s b/data/const/object/mazaalBossObject.s similarity index 100% rename from data/const/object/object89.s rename to data/const/object/mazaalBossObject.s diff --git a/data/const/object/object4.s b/data/const/object/minishEmoticon.s similarity index 100% rename from data/const/object/object4.s rename to data/const/object/minishEmoticon.s diff --git a/data/const/object/object5A.s b/data/const/object/paper.s similarity index 100% rename from data/const/object/object5A.s rename to data/const/object/paper.s diff --git a/data/const/object/object24.s b/data/const/object/pressurePlate.s similarity index 83% rename from data/const/object/object24.s rename to data/const/object/pressurePlate.s index f0e129bb..15f9e807 100644 --- a/data/const/object/object24.s +++ b/data/const/object/pressurePlate.s @@ -10,4 +10,4 @@ gUnk_08120BE0:: @ 08120BE0 .4byte sub_080888F4 gUnk_08120BEC:: @ 08120BEC - .incbin "object24/gUnk_08120BEC.bin" + .incbin "PressurePlate/gUnk_08120BEC.bin" diff --git a/data/const/object/object72.s b/data/const/object/stoneTablet.s similarity index 72% rename from data/const/object/object72.s rename to data/const/object/stoneTablet.s index f211569e..13bd0ece 100644 --- a/data/const/object/object72.s +++ b/data/const/object/stoneTablet.s @@ -9,7 +9,7 @@ gUnk_081232E4:: @ 081232E4 .4byte nullsub_529 gUnk_081232EC:: @ 081232EC - .incbin "object72/gUnk_081232EC.bin" + .incbin "stoneTablet/gUnk_081232EC.bin" gUnk_081232FE:: @ 081232FE - .incbin "object72/gUnk_081232FE.bin" + .incbin "stoneTablet/gUnk_081232FE.bin" diff --git a/data/gfx/sprite_frames.s b/data/gfx/sprite_frames.s index 6dc4cd56..553c2c2d 100644 --- a/data/gfx/sprite_frames.s +++ b/data/gfx/sprite_frames.s @@ -31,8 +31,8 @@ gSpriteFrames_8:: @ 08116888 gSpriteFrames_9:: @ 08116A9C .include "sprites/gSpriteFrames_9.s" -gSpriteFrames_Object4:: @ 08116D0C - .include "sprites/gSpriteFrames_Object4.s" +gSpriteFrames_MinishEmoticon:: @ 08116D0C + .include "sprites/gSpriteFrames_MinishEmoticon.s" gSpriteFrames_EzloCap:: @ 08116DD4 .include "sprites/gSpriteFrames_EzloCap.s" diff --git a/data/gfx/sprite_ptrs.s b/data/gfx/sprite_ptrs.s index 00f76d64..8cae8cca 100644 --- a/data/gfx/sprite_ptrs.s +++ b/data/gfx/sprite_ptrs.s @@ -55,8 +55,8 @@ gSpritePtrs:: @ 080029B4 .4byte gSprite_Link .4byte 00000000 - .4byte gSpriteAnimations_Object4 - .4byte gSpriteFrames_Object4 + .4byte gSpriteAnimations_MinishEmoticon + .4byte gSpriteFrames_MinishEmoticon .4byte gSprite_Link .4byte 00000000 @@ -915,7 +915,7 @@ gSpritePtrs:: @ 080029B4 .4byte 00000000 .4byte 00000000 - .4byte gSpriteAnimations_Object24 + .4byte gSpriteAnimations_PressurePlate .4byte 00000000 .4byte 00000000 .4byte 00000000 @@ -1000,7 +1000,7 @@ gSpritePtrs:: @ 080029B4 .4byte 00000000 .4byte 00000000 - .4byte gSpriteAnimations_Object29 + .4byte gSpriteAnimations_AmbientClouds .4byte 00000000 .4byte 00000000 .4byte 00000000 @@ -1335,7 +1335,7 @@ gSpritePtrs:: @ 080029B4 .4byte 00000000 .4byte 00000000 - .4byte gSpriteAnimations_Object93_0 + .4byte gSpriteAnimations_Lamp_0 .4byte 00000000 .4byte 00000000 .4byte 00000000 @@ -1375,7 +1375,7 @@ gSpritePtrs:: @ 080029B4 .4byte 00000000 .4byte 00000000 - .4byte gSpriteAnimations_Object93_1 + .4byte gSpriteAnimations_Lamp_1 .4byte 00000000 .4byte 00000000 .4byte 00000000 @@ -1457,7 +1457,7 @@ gSpritePtrs:: @ 080029B4 .4byte 00000000 .4byte 00000000 - .4byte gSpriteAnimations_ObjectA0 + .4byte gSpriteAnimations_AngryStatue .4byte 00000000 .4byte 00000000 .4byte 00000000 diff --git a/include/definitions.h b/include/definitions.h index f2d631d9..d8374ab0 100644 --- a/include/definitions.h +++ b/include/definitions.h @@ -113,7 +113,7 @@ typedef enum { SPRITE_7, SPRITE_8, SPRITE_9, - SPRITE_OBJECT4, + SPRITE_MINISHEMOTICON, SPRITE_EZLOCAP, SPRITE_12, SPRITE_13, @@ -285,7 +285,7 @@ typedef enum { SPRITE_DOORMIMIC_1, SPRITE_ROCKCHUCHU, SPRITE_SPINYCHUCHU, - SPRITE_OBJECT24, + SPRITE_PRESSUREPLATE, SPRITE_OBJECT1E, SPRITE_CHESTSPAWNER, SPRITE_BIGBARREL, @@ -302,7 +302,7 @@ typedef enum { SPRITE_PULLABLEMUSHROOM, SPRITE_BOLLARD, SPRITE_WARPPOINT, - SPRITE_OBJECT29, + SPRITE_AMBIENTCLOUDS, SPRITE_CHUCHUBOSS_1, SPRITE_CHUCHUBOSS_2, SPRITE_OBJECT9, @@ -369,7 +369,7 @@ typedef enum { SPRITE_FLYINGSKULL, SPRITE_BONEPROJECTILE, SPRITE_BAKEROVEN, - SPRITE_OBJECT93_0, + SPRITE_LAMP_0, SPRITE_LAKITULIGHTNING, SPRITE_OBJECT6A_5, SPRITE_BIRD_1, @@ -377,7 +377,7 @@ typedef enum { SPRITE_TORCHTRAPPROJECTILE_0, SPRITE_TORCHTRAPPROJECTILE_1, SPRITE_OBJECT98, - SPRITE_OBJECT93_1, + SPRITE_LAMP_1, SPRITE_FIGURINEDEVICE, SPRITE_PULLABLELEVER_1, SPRITE_VAATIPROJECTILE, @@ -395,7 +395,7 @@ typedef enum { SPRITE_OBJECTB4_1, #endif SPRITE_FAN, - SPRITE_OBJECTA0, + SPRITE_ANGRYSTATUE, SPRITE_CANNONBALLPROJECTILE, SPRITE_V1EYELASER, SPRITE_V1DARKMAGICPROJECTILE, diff --git a/include/object.h b/include/object.h index 05cdfa7c..1a219e09 100644 --- a/include/object.h +++ b/include/object.h @@ -9,7 +9,7 @@ typedef enum { DEATH_FX, SHOP_ITEM, BUTTON, - OBJECT_4, + MINISH_EMOTICON, POT, EZLO_CAP, PUSHED_BLOCK, @@ -41,12 +41,12 @@ typedef enum { OBJECT_21, FIGURINE_DEVICE, EYE_SWITCH, - OBJECT_24, + PRESSURE_PLATE, BIG_BARREL, - OBJECT_26, + BARREL_INSIDE, PUSHABLE_STATUE, OBJECT_28, - OBJECT_29, + AMBIENT_CLOUDS, OBJECT_2A, OBJECT_2B, BEANSTALK, @@ -86,7 +86,7 @@ typedef enum { MINISH_SIZED_ENTRANCE, ARCHWAY, GIANT_ROCK, - OBJECT_51, + GIANT_ROCK2, OBJECT_52, OBJECT_53, PULLABLE_LEVER, @@ -95,7 +95,7 @@ typedef enum { HIDDEN_LADDER_DOWN, GENTARI_CURTAIN, LAVA_PLATFORM, - OBJECT_5A, + PAPER, OBJECT_5B, MASK, HOUSE_DOOR_INT, @@ -119,7 +119,7 @@ typedef enum { MINISH_SIZED_ARCHWAY, OBJECT_70, PUSHABLE_GRAVE, - OBJECT_72, + STONE_TABLET, LILYPAD_SMALL, OBJECT_74, OBJECT_75, @@ -133,7 +133,7 @@ typedef enum { OBJECT_ON_BEETLE, OBJECT_7E, PICO_BLOOM, - OBJECT_80, + BOARD, OBJECT_81, BIG_VORTEX, BIG_PUSHABLE_LEVER, @@ -142,9 +142,9 @@ typedef enum { OBJECT_86, OCTOROK_BOSS_OBJECT, HUGE_BOOK, - OBJECT_89, - OBJECT_8A, - OBJECT_8B, + MAZAAL_BOSS_OBJECT, + CABIN_FURNITURE, + DOUBLE_BOOKSHELF, BOOK, FIREPLACE, OBJECT_8E, @@ -152,7 +152,7 @@ typedef enum { OBJECT_90, OBJECT_91, BAKER_OVEN, - OBJECT_93, + LAMP, WIND_TRIBE_FLAG, BIRD, OBJECT_96, @@ -163,14 +163,14 @@ typedef enum { OBJECT_9B, TREE_HIDING_PORTAL, LIGHTABLE_SWITCH, - OBJECT_9E, + TREE_THORNS, FAN, - OBJECT_A0, + ANGRY_STATUE, PALACE_ARCHWAY, OBJECT_A2, CLOUD, MINISH_LIGHT, - OBJECT_A5, + FIREBALL_CHAIN, OBJECT_A6, OBJECT_A7, OBJECT_A8, @@ -191,7 +191,7 @@ typedef enum { WELL, WIND_TRIBE_TELEPORTER, OBJECT_B9, - OBJECT_BA, + GYORG_BOSS_OBJECT, WINDCREST, LIT_AREA, OBJECT_BD, @@ -205,7 +205,7 @@ extern void ItemOnGround(Entity*); extern void DeathFx(Entity*); extern void ItemForSale(Entity*); extern void Button(Entity*); -extern void Object4(Entity*); +extern void MinishEmoticon(Entity*); extern void Pot(Entity*); extern void EzloCap(Entity*); extern void BlockPushed(Entity*); @@ -237,12 +237,12 @@ extern void Object20(Entity*); extern void Object21(Entity*); extern void FigurineDevice(Entity*); extern void EyeSwitch(Entity*); -extern void Object24(Entity*); +extern void PressurePlate(Entity*); extern void BigBarrel(Entity*); -extern void Object26(Entity*); +extern void BarrelInside(Entity*); extern void PushableStatue(Entity*); extern void Object28(Entity*); -extern void Object29(Entity*); +extern void AmbientClouds(Entity*); extern void Object2A(Entity*); extern void Object2B(Entity*); extern void Beanstalk(Entity*); @@ -282,7 +282,7 @@ extern void Furniture(Entity*); extern void MinishSizedEntrance(Entity*); extern void Archway(Entity*); extern void GiantRock(Entity*); -extern void Object51(Entity*); +extern void GiantRock2(Entity*); extern void Object52(Entity*); extern void Object53(Entity*); extern void PullableLever(Entity*); @@ -291,7 +291,7 @@ extern void ThoughtBubble(Entity*); extern void HiddenLadderDown(Entity*); extern void GentariCurtain(Entity*); extern void LavaPlatform(Entity*); -extern void Object5A(Entity*); +extern void Paper(Entity*); extern void Object5B(Entity*); extern void Mask(Entity*); extern void HouseDoorInterior(Entity*); @@ -315,7 +315,7 @@ extern void MineralWaterSource(Entity*); extern void MinishSizedArchway(Entity*); extern void Object70(Entity*); extern void PushableGrave(Entity*); -extern void Object72(Entity*); +extern void StoneTablet(Entity*); extern void LilypadSmall(Entity*); extern void Object74(Entity*); extern void Object75(Entity*); @@ -329,7 +329,7 @@ extern void MacroShoes(Entity*); extern void ObjectOnSpinyBeetle(Entity*); extern void Object7E(Entity*); extern void PicoBloom(Entity*); -extern void Object80(Entity*); +extern void Board(Entity*); extern void Object81(Entity*); extern void BigVortex(Entity*); extern void BigPushableLever(Entity*); @@ -338,9 +338,9 @@ extern void BigIceBlock(Entity*); extern void Object86(Entity*); extern void OctorokBossObject(Entity*); extern void MacroBook(Entity*); -extern void Object89(Entity*); -extern void Object8A(Entity*); -extern void Object8B(Entity*); +extern void MazaalBossObject(Entity*); +extern void CabinFurniture(Entity*); +extern void DoubleBookshelf(Entity*); extern void Book(Entity*); extern void Fireplace(Entity*); extern void Object8E(Entity*); @@ -348,7 +348,7 @@ extern void FrozenWaterElement(Entity*); extern void Object90(Entity*); extern void Object91(Entity*); extern void BakerOven(Entity*); -extern void Object93(Entity*); +extern void Lamp(Entity*); extern void WindTribeFlag(Entity*); extern void Bird(Entity*); extern void Object96(Entity*); @@ -359,14 +359,14 @@ extern void MacroAcorn(Entity*); extern void Object9B(Entity*); extern void TreeHidingPortal(Entity*); extern void LightableSwitch(Entity*); -extern void Object9E(Entity*); +extern void TreeThorns(Entity*); extern void Fan(Entity*); -extern void ObjectA0(Entity*); +extern void AngryStatue(Entity*); extern void PalaceArchway(Entity*); extern void ObjectA2(Entity*); extern void Cloud(Entity*); extern void MinishLight(Entity*); -extern void ObjectA5(Entity*); +extern void FireballChain(Entity*); extern void ObjectA6(Entity*); extern void ObjectA7(Entity*); extern void ObjectA8(Entity*); @@ -387,7 +387,7 @@ extern void ObjectB6(Entity*); extern void Well(Entity*); extern void WindTribeTeleporter(Entity*); extern void ObjectB9(Entity*); -extern void ObjectBA(Entity*); +extern void GyorgBossObject(Entity*); extern void Windcrest(Entity*); extern void LitArea(Entity*); extern void ObjectBD(Entity*); diff --git a/linker.ld b/linker.ld index 2d25fba6..ba7c1b31 100644 --- a/linker.ld +++ b/linker.ld @@ -705,7 +705,7 @@ SECTIONS { asm/deathFx.o(.text); asm/itemForSale.o(.text); src/object/button.o(.text); - asm/object4.o(.text); + asm/minishEmoticon.o(.text); src/object/pot.o(.text); asm/ezloCap.o(.text); asm/blockPushed.o(.text); @@ -738,12 +738,12 @@ SECTIONS { asm/object21.o(.text); asm/figurineDevice.o(.text); asm/eyeSwitch.o(.text); - asm/object24.o(.text); + asm/PressurePlate.o(.text); asm/bigBarrel.o(.text); - asm/object26.o(.text); + asm/barrelInside.o(.text); asm/pushableStatue.o(.text); asm/object28.o(.text); - asm/object29.o(.text); + asm/ambientClouds.o(.text); src/object/object2A.o(.text); asm/object2A.o(.text); asm/object2B.o(.text); @@ -787,7 +787,7 @@ SECTIONS { src/object/minishSizedEntrance.o(.text); src/object/archway.o(.text); asm/giantRock.o(.text); - asm/object51.o(.text); + asm/giantRock2.o(.text); asm/object52.o(.text); asm/object53.o(.text); asm/pullableLever.o(.text); @@ -797,7 +797,7 @@ SECTIONS { src/object/hiddenLadderDown.o(.text); asm/gentariCurtains.o(.text); asm/lavaPlatform.o(.text); - asm/object5A.o(.text); + asm/paper.o(.text); asm/object5B.o(.text); src/object/mask.o(.text); asm/houseDoorInterior.o(.text); @@ -821,7 +821,7 @@ SECTIONS { src/object/minishSizedArchway.o(.text); asm/object70.o(.text); asm/pushableGrave.o(.text); - asm/object72.o(.text); + asm/stoneTablet.o(.text); src/object/lilypadSmall.o(.text); asm/object74.o(.text); src/object/bell.o(.text); @@ -833,7 +833,7 @@ SECTIONS { asm/objectOnSpinyBeetle.o(.text); src/object/object7E.o(.text); asm/picoBloom.o(.text); - asm/object80.o(.text); + asm/board.o(.text); asm/object81.o(.text); src/object/bigVortex.o(.text); asm/bigPushableLever.o(.text); @@ -842,9 +842,9 @@ SECTIONS { src/object/object86.o(.text); src/object/octorokBossObject.o(.text); asm/macroBook.o(.text); - asm/object89.o(.text); - asm/object8A.o(.text); - asm/object8B.o(.text); + asm/mazaalBossObject.o(.text); + asm/cabinFurniture.o(.text); + asm/doubleBookshelf.o(.text); src/object/book.o(.text); src/object/fireplace.o(.text); asm/object8E.o(.text); @@ -852,7 +852,7 @@ SECTIONS { asm/object90.o(.text); asm/object91.o(.text); src/object/bakerOven.o(.text); - asm/object93.o(.text); + asm/lamp.o(.text); src/object/windTribeFlag.o(.text); src/object/bird.o(.text); asm/bird.o(.text); @@ -865,15 +865,15 @@ SECTIONS { src/object/treeHidingPortal.o(.text); asm/treeHidingPortal.o(.text); src/object/lightableSwitch.o(.text); - src/object/object9E.o(.text); + src/object/treeThorns.o(.text); src/object/fan.o(.text); asm/fan.o(.text); - asm/objectA0.o(.text); + asm/angryStatue.o(.text); src/object/palaceArchway.o(.text); src/object/objectA2.o(.text); src/object/cloud.o(.text); src/object/minishLight.o(.text); - asm/objectA5.o(.text); + asm/fireballChain.o(.text); asm/objectA6.o(.text); asm/objectA7.o(.text); src/object/objectA8.o(.text); @@ -895,7 +895,7 @@ SECTIONS { src/object/well.o(.text); asm/windTribeTeleporter.o(.text); asm/objectB9.o(.text); - asm/objectBA.o(.text); + asm/gyorgBossObject.o(.text); src/object/windcrest.o(.text); asm/litArea.o(.text); asm/objectBD.o(.text); @@ -1416,8 +1416,8 @@ SECTIONS { data/animations/object/deathFx.o(.rodata); data/const/object/itemForSale.o(.rodata); data/const/object/button.o(.rodata); - data/const/object/object4.o(.rodata); - data/animations/object/object4.o(.rodata); + data/const/object/minishEmoticon.o(.rodata); + data/animations/object/minishEmoticon.o(.rodata); data/const/object/pot.o(.rodata); data/animations/object/pot.o(.rodata); data/const/object/ezloCap.o(.rodata); @@ -1459,15 +1459,15 @@ SECTIONS { data/animations/object/figurineDevice.o(.rodata); data/const/object/eyeSwitch.o(.rodata); data/animations/object/eyeSwitch.o(.rodata); - data/const/object/object24.o(.rodata); - data/animations/object/object24.o(.rodata); + data/const/object/pressurePlate.o(.rodata); + data/animations/object/pressurePlate.o(.rodata); data/const/object/bigBarrel.o(.rodata); data/animations/object/bigBarrel.o(.rodata); - data/const/object/object26.o(.rodata); + data/const/object/barrelInside.o(.rodata); data/const/object/pushableStatue.o(.rodata); data/animations/object/pushableStatue.o(.rodata); - data/const/object/object29.o(.rodata); - data/animations/object/object29.o(.rodata); + data/const/object/ambientClouds.o(.rodata); + data/animations/object/ambientClouds.o(.rodata); data/const/object/object2A.o(.rodata); data/animations/object/object2A.o(.rodata); data/const/object/beanstalk.o(.rodata); @@ -1522,7 +1522,7 @@ SECTIONS { src/object/furniture.o(.rodata); data/const/object/minishSizedEntrance.o(.rodata); data/animations/object/minishSizedEntrance.o(.rodata); - data/const/object/object51.o(.rodata); + data/const/object/giantRock2.o(.rodata); data/const/object/object53.o(.rodata); data/const/object/pullableLever.o(.rodata); data/animations/object/pullableLever.o(.rodata); @@ -1535,7 +1535,7 @@ SECTIONS { data/animations/object/gentariCurtains.o(.rodata); data/const/object/lavaPlatform.o(.rodata); data/animations/object/lavaPlatform.o(.rodata); - data/const/object/object5A.o(.rodata); + data/const/object/paper.o(.rodata); data/const/object/object5B.o(.rodata); data/const/object/mask.o(.rodata); data/const/object/houseDoorInterior.o(.rodata); @@ -1560,7 +1560,7 @@ SECTIONS { data/const/object/mineralWaterSource.o(.rodata); data/const/object/object70.o(.rodata); data/const/object/pushableGrave.o(.rodata); - data/const/object/object72.o(.rodata); + data/const/object/stoneTablet.o(.rodata); data/const/object/lilypadSmall.o(.rodata); data/const/object/object74.o(.rodata); data/const/object/bell.o(.rodata); @@ -1575,7 +1575,7 @@ SECTIONS { data/const/object/objectOnSpinyBeetle.o(.rodata); data/const/object/picoBloom.o(.rodata); data/animations/object/picoBloom.o(.rodata); - data/const/object/object80.o(.rodata); + data/const/object/board.o(.rodata); data/const/object/object81.o(.rodata); data/const/object/bigVortex.o(.rodata); data/animations/object/bigVortex.o(.rodata); @@ -1590,9 +1590,9 @@ SECTIONS { src/object/octorokBossObject.o(.rodata); data/const/object/macroBook.o(.rodata); data/animations/object/macroBook.o(.rodata); - data/const/object/object89.o(.rodata); - data/const/object/object8A.o(.rodata); - data/const/object/object8B.o(.rodata); + data/const/object/mazaalBossObject.o(.rodata); + data/const/object/cabinFurniture.o(.rodata); + data/const/object/doubleBookshelf.o(.rodata); src/object/book.o(.rodata); data/const/object/fireplace.o(.rodata); data/const/object/object8E.o(.rodata); @@ -1601,7 +1601,7 @@ SECTIONS { data/const/object/object91.o(.rodata); data/const/object/bakerOven.o(.rodata); data/animations/object/bakerOven.o(.rodata); - data/animations/object/object93.o(.rodata); + data/animations/object/lamp.o(.rodata); data/const/object/bird.o(.rodata); data/animations/object/bird.o(.rodata); data/const/object/object96.o(.rodata); @@ -1615,9 +1615,10 @@ SECTIONS { data/const/object/lightableSwitch.o(.rodata); data/const/object/fan.o(.rodata); data/animations/object/fan.o(.rodata); - data/const/object/objectA0.o(.rodata); - data/animations/object/objectA0.o(.rodata); - data/const/object/palaceArchway.o(.rodata); src/object/objectA2.o(.rodata); + data/const/object/angryStatue.o(.rodata); + data/animations/object/angryStatue.o(.rodata); + data/const/object/palaceArchway.o(.rodata); + src/object/objectA2.o(.rodata); data/animations/object/objectA2.o(.rodata); data/const/object/cloud.o(.rodata); data/const/object/minishLight.o(.rodata); @@ -1643,8 +1644,8 @@ SECTIONS { data/const/object/well.o(.rodata); data/const/object/windTribeTeleporter.o(.rodata); data/const/object/objectB9.o(.rodata); - data/const/object/objectBA.o(.rodata); - data/animations/object/objectBA.o(.rodata); + data/const/object/gyorgBossObject.o(.rodata); + data/animations/object/gyorgBossObject.o(.rodata); data/const/object/windcrest.o(.rodata); data/const/object/objectBD.o(.rodata); data/const/object/pinwheel.o(.rodata); diff --git a/src/manager/manager2B.c b/src/manager/manager2B.c index 3ef01daf..f4cc8868 100644 --- a/src/manager/manager2B.c +++ b/src/manager/manager2B.c @@ -46,7 +46,7 @@ void sub_0805D02C(Manager2B* this) { objectData = GetCurrentRoomProperty(this->manager.unk_0a); counter = 0; while (counter < 4) { - object = CreateObject(OBJECT_A0, objectData[2], counter); + object = CreateObject(ANGRY_STATUE, objectData[2], counter); object->x.HALF.HI = objectData[0] + gRoomControls.roomOriginX; object->y.HALF.HI = objectData[1] + gRoomControls.roomOriginY; object->parent = (Entity*)this; diff --git a/src/object.c b/src/object.c index b7b65ad5..9a1f983e 100644 --- a/src/object.c +++ b/src/object.c @@ -8,7 +8,7 @@ void (*const gObjectFunctions[])(Entity*) = { [DEATH_FX] = DeathFx, [SHOP_ITEM] = ItemForSale, [BUTTON] = Button, - [OBJECT_4] = Object4, + [MINISH_EMOTICON] = MinishEmoticon, [POT] = Pot, [EZLO_CAP] = EzloCap, [PUSHED_BLOCK] = BlockPushed, @@ -40,12 +40,12 @@ void (*const gObjectFunctions[])(Entity*) = { [OBJECT_21] = Object21, [FIGURINE_DEVICE] = FigurineDevice, [EYE_SWITCH] = EyeSwitch, - [OBJECT_24] = Object24, + [PRESSURE_PLATE] = PressurePlate, [BIG_BARREL] = BigBarrel, - [OBJECT_26] = Object26, + [BARREL_INSIDE] = BarrelInside, [PUSHABLE_STATUE] = PushableStatue, [OBJECT_28] = Object28, - [OBJECT_29] = Object29, + [AMBIENT_CLOUDS] = AmbientClouds, [OBJECT_2A] = Object2A, [OBJECT_2B] = Object2B, [BEANSTALK] = Beanstalk, @@ -85,7 +85,7 @@ void (*const gObjectFunctions[])(Entity*) = { [MINISH_SIZED_ENTRANCE] = MinishSizedEntrance, [ARCHWAY] = Archway, [GIANT_ROCK] = GiantRock, - [OBJECT_51] = Object51, + [GIANT_ROCK2] = GiantRock2, [OBJECT_52] = Object52, [OBJECT_53] = Object53, [PULLABLE_LEVER] = PullableLever, @@ -94,7 +94,7 @@ void (*const gObjectFunctions[])(Entity*) = { [HIDDEN_LADDER_DOWN] = HiddenLadderDown, [GENTARI_CURTAIN] = GentariCurtain, [LAVA_PLATFORM] = LavaPlatform, - [OBJECT_5A] = Object5A, + [PAPER] = Paper, [OBJECT_5B] = Object5B, [MASK] = Mask, [HOUSE_DOOR_INT] = HouseDoorInterior, @@ -118,7 +118,7 @@ void (*const gObjectFunctions[])(Entity*) = { [MINISH_SIZED_ARCHWAY] = MinishSizedArchway, [OBJECT_70] = Object70, [PUSHABLE_GRAVE] = PushableGrave, - [OBJECT_72] = Object72, + [STONE_TABLET] = StoneTablet, [LILYPAD_SMALL] = LilypadSmall, [OBJECT_74] = Object74, [OBJECT_75] = Object75, @@ -132,7 +132,7 @@ void (*const gObjectFunctions[])(Entity*) = { [OBJECT_ON_BEETLE] = ObjectOnSpinyBeetle, [OBJECT_7E] = Object7E, [PICO_BLOOM] = PicoBloom, - [OBJECT_80] = Object80, + [BOARD] = Board, [OBJECT_81] = Object81, [BIG_VORTEX] = BigVortex, [BIG_PUSHABLE_LEVER] = BigPushableLever, @@ -141,9 +141,9 @@ void (*const gObjectFunctions[])(Entity*) = { [OBJECT_86] = Object86, [OCTOROK_BOSS_OBJECT] = OctorokBossObject, [HUGE_BOOK] = MacroBook, - [OBJECT_89] = Object89, - [OBJECT_8A] = Object8A, - [OBJECT_8B] = Object8B, + [MAZAAL_BOSS_OBJECT] = MazaalBossObject, + [CABIN_FURNITURE] = CabinFurniture, + [DOUBLE_BOOKSHELF] = DoubleBookshelf, [BOOK] = Book, [FIREPLACE] = Fireplace, [OBJECT_8E] = Object8E, @@ -151,7 +151,7 @@ void (*const gObjectFunctions[])(Entity*) = { [OBJECT_90] = Object90, [OBJECT_91] = Object91, [BAKER_OVEN] = BakerOven, - [OBJECT_93] = Object93, + [LAMP] = Lamp, [WIND_TRIBE_FLAG] = WindTribeFlag, [BIRD] = Bird, [OBJECT_96] = Object96, @@ -162,14 +162,14 @@ void (*const gObjectFunctions[])(Entity*) = { [OBJECT_9B] = Object9B, [TREE_HIDING_PORTAL] = TreeHidingPortal, [LIGHTABLE_SWITCH] = LightableSwitch, - [OBJECT_9E] = Object9E, + [TREE_THORNS] = TreeThorns, [FAN] = Fan, - [OBJECT_A0] = ObjectA0, + [ANGRY_STATUE] = AngryStatue, [PALACE_ARCHWAY] = PalaceArchway, [OBJECT_A2] = ObjectA2, [CLOUD] = Cloud, [MINISH_LIGHT] = MinishLight, - [OBJECT_A5] = ObjectA5, + [FIREBALL_CHAIN] = FireballChain, [OBJECT_A6] = ObjectA6, [OBJECT_A7] = ObjectA7, [OBJECT_A8] = ObjectA8, @@ -190,7 +190,7 @@ void (*const gObjectFunctions[])(Entity*) = { [WELL] = Well, [WIND_TRIBE_TELEPORTER] = WindTribeTeleporter, [OBJECT_B9] = ObjectB9, - [OBJECT_BA] = ObjectBA, + [GYORG_BOSS_OBJECT] = GyorgBossObject, [WINDCREST] = Windcrest, [LIT_AREA] = LitArea, [OBJECT_BD] = ObjectBD, diff --git a/src/object/furniture.c b/src/object/furniture.c index b313ca3f..a4d003bd 100644 --- a/src/object/furniture.c +++ b/src/object/furniture.c @@ -82,7 +82,7 @@ typedef enum { FORGE_HELPER, MINISH_UNLIT_CANDLE, MINISH_GEARS, - DOUBLE_BOOKSHELF, + DOUBLE_BOOKSHELF_STATIC, MINISH_DECOR1, MINISH_DECOR2, MINISH_JAM, diff --git a/src/object/object9E.c b/src/object/treeThorns.c similarity index 92% rename from src/object/object9E.c rename to src/object/treeThorns.c index d44adf62..5a52b9a5 100644 --- a/src/object/object9E.c +++ b/src/object/treeThorns.c @@ -7,7 +7,7 @@ extern Hitbox gHitbox_1; -void Object9E(Entity* this) { +void TreeThorns(Entity* this) { Entity* ent; u32 tilePos; u8* layer; @@ -29,7 +29,7 @@ void Object9E(Entity* this) { SetTile(0x4066, tilePos - 1, *layer); SetTile(0x4065, tilePos, *layer); UpdateSpriteForCollisionLayer(this); - ent = CreateObject(OBJECT_9E, 1, 0); + ent = CreateObject(TREE_THORNS, 1, 0); if (ent != NULL) { this->child = ent; CopyPosition(this, ent); diff --git a/src/objectDefinitions.c b/src/objectDefinitions.c index c8154dec..4a0186a1 100644 --- a/src/objectDefinitions.c +++ b/src/objectDefinitions.c @@ -118,9 +118,9 @@ const ObjectDefinition gObjectDefinition_25[] = { { { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, SPRITE_0, 0, 0 } }, }; const ObjectDefinition gObjectDefinition_24[] = { - { { 1, 0, 0, 0, 22, 0, 0 }, { 0, 0, 0, 0, SPRITE_OBJECT24, 0, 0 } }, - { { 1, 0, 0, 0, 39, 0, 0 }, { 0, 0, 0, 0, SPRITE_OBJECT24, 0, 0 } }, - { { 1, 0, 0, 0, 40, 0, 0 }, { 0, 0, 0, 0, SPRITE_OBJECT24, 0, 0 } }, + { { 1, 0, 0, 0, 22, 0, 0 }, { 0, 0, 0, 0, SPRITE_PRESSUREPLATE, 0, 0 } }, + { { 1, 0, 0, 0, 39, 0, 0 }, { 0, 0, 0, 0, SPRITE_PRESSUREPLATE, 0, 0 } }, + { { 1, 0, 0, 0, 40, 0, 0 }, { 0, 0, 0, 0, SPRITE_PRESSUREPLATE, 0, 0 } }, }; #ifdef EU const ObjectDefinition gObjectDefinition_1C[] = { From 6ab9aa99fd159334d86ebb2bff5fcd2886d338e1 Mon Sep 17 00:00:00 2001 From: theo3 Date: Fri, 17 Dec 2021 11:30:16 -0800 Subject: [PATCH 4/4] linker fix --- linker.ld | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linker.ld b/linker.ld index ba7c1b31..f20f38ab 100644 --- a/linker.ld +++ b/linker.ld @@ -738,7 +738,7 @@ SECTIONS { asm/object21.o(.text); asm/figurineDevice.o(.text); asm/eyeSwitch.o(.text); - asm/PressurePlate.o(.text); + asm/pressurePlate.o(.text); asm/bigBarrel.o(.text); asm/barrelInside.o(.text); asm/pushableStatue.o(.text);