From f316b22f96753c8580d86a8b7957ec69d7bd0c3c Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 11 Nov 2019 17:08:21 -0500 Subject: Move gText_Decimal to strings.h; dump box_party_pokemon_dropdown rodata --- baserom.ips | Bin 398989 -> 398952 bytes data/box_party_pokemon_dropdown.s | 10 +++++++++- include/strings.h | 3 +++ src/pokemon_size_record.c | 17 ++++++++--------- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/baserom.ips b/baserom.ips index 07a82d3b0..d11c55170 100644 Binary files a/baserom.ips and b/baserom.ips differ diff --git a/data/box_party_pokemon_dropdown.s b/data/box_party_pokemon_dropdown.s index 929aa6ab5..275b53db2 100644 --- a/data/box_party_pokemon_dropdown.s +++ b/data/box_party_pokemon_dropdown.s @@ -7,4 +7,12 @@ .align 2 gUnknown_841F4B4:: @ 841F4B4 - .incbin "baserom.gba", 0x41f4b4, 0x20 + .2byte 0x0100, 0x0100 + .2byte 0x0200, 0x0100 + .2byte 0x0100, 0x0200 + .2byte 0x0200, 0x0200 + + .2byte 0x0080, 0x0080 + .2byte 0x0100, 0x0100 + .2byte 0x0200, 0x0200 + .2byte 0x0400, 0x0400 diff --git a/include/strings.h b/include/strings.h index f39f4f553..983caf509 100644 --- a/include/strings.h +++ b/include/strings.h @@ -735,4 +735,7 @@ extern const u8 gText_WhichMoveShouldBeForgotten[]; extern const u8 gText_TeachMoveQues[]; extern const u8 gText_GiveUpTryingToTeachNewMove[]; +// pokemon_size_record +extern const u8 gText_DecimalPoint[]; + #endif //GUARD_STRINGS_H diff --git a/src/pokemon_size_record.c b/src/pokemon_size_record.c index 06e23618d..6eff367c5 100644 --- a/src/pokemon_size_record.c +++ b/src/pokemon_size_record.c @@ -6,6 +6,7 @@ #include "pokemon_size_record.h" #include "string_util.h" #include "text.h" +#include "strings.h" #include "constants/species.h" #define DEFAULT_MAX_SIZE 0 // was 0x8100 in Ruby/Sapphire, 0x8000 in Emerald @@ -28,13 +29,13 @@ static const struct UnknownStruct sBigMonSizeTable[] = { 800, 100, 7710 }, { 900, 150, 17710 }, { 1000, 150, 32710 }, - { 1100, 100, -17826 }, - { 1200, 50, -7826 }, - { 1300, 20, -2826 }, - { 1400, 5, -826 }, - { 1500, 2, -326 }, - { 1600, 1, -126 }, - { 1700, 1, -26 }, + { 1100, 100, 47710 }, + { 1200, 50, 57710 }, + { 1300, 20, 62710 }, + { 1400, 5, 64710 }, + { 1500, 2, 65210 }, + { 1600, 1, 65410 }, + { 1700, 1, 65510 }, }; static const u8 sGiftRibbonsMonDataIds[] = @@ -44,8 +45,6 @@ static const u8 sGiftRibbonsMonDataIds[] = MON_DATA_GIFT_RIBBON_7 }; -extern const u8 gText_DecimalPoint[]; - #define CM_PER_INCH 2.54 static u32 GetMonSizeHash(struct Pokemon * pkmn) -- cgit v1.2.3 From 734cbfdb202f366ed39b5304e030478aaa3ea090 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 11 Nov 2019 21:46:57 -0500 Subject: Decomp map_name_popup --- asm/item_menu.s | 2 +- asm/map_name_popup.s | 490 ---------------------------------------------- asm/overworld.s | 10 +- baserom.ips | Bin 398952 -> 398518 bytes data/item_use.s | 15 -- data/map_name_popup.s | 10 - include/global.fieldmap.h | 2 +- include/map_name_popup.h | 2 +- include/strings.h | 3 + include/text_window.h | 1 + ld_script.txt | 6 +- src/item_use.c | 63 +++++- src/map_name_popup.c | 216 ++++++++++++++++++++ src/quest_log.c | 2 +- 14 files changed, 294 insertions(+), 528 deletions(-) delete mode 100644 asm/map_name_popup.s delete mode 100644 data/item_use.s delete mode 100644 data/map_name_popup.s create mode 100644 src/map_name_popup.c diff --git a/asm/item_menu.s b/asm/item_menu.s index a143d2776..a8487864a 100644 --- a/asm/item_menu.s +++ b/asm/item_menu.s @@ -5826,7 +5826,7 @@ UseRegisteredKeyItemOnField: @ 810AD10 movs r0, 0 b _0810ADA0 _0810AD1E: - bl sub_80982EC + bl DismissMapNamePopup movs r0, 0 movs r1, 0 movs r2, 0 diff --git a/asm/map_name_popup.s b/asm/map_name_popup.s deleted file mode 100644 index ba64bdbe8..000000000 --- a/asm/map_name_popup.s +++ /dev/null @@ -1,490 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - thumb_func_start sub_8098110 -sub_8098110: @ 8098110 - push {r4-r6,lr} - adds r6, r0, 0 - movs r0, 0x80 - lsls r0, 7 - bl FlagGet - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - beq _080981A2 - ldr r0, _08098178 @ =gUnknown_203ADFA - ldrb r0, [r0] - subs r0, 0x2 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bls _080981A2 - ldr r5, _0809817C @ =sub_80981AC - adds r0, r5, 0 - bl FindTaskIdByFunc - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0xFF - bne _08098188 - adds r0, r5, 0 - movs r1, 0x5A - bl CreateTask - lsls r0, 24 - lsrs r4, r0, 24 - movs r0, 0 - movs r1, 0 - movs r2, 0 - bl ChangeBgX - ldr r1, _08098180 @ =0xffffef7f - movs r0, 0 - movs r2, 0 - bl ChangeBgY - ldr r1, _08098184 @ =gTasks - lsls r0, r4, 2 - adds r0, r4 - lsls r0, 3 - adds r0, r1 - movs r1, 0 - strh r1, [r0, 0x8] - strh r1, [r0, 0xC] - strh r6, [r0, 0x18] - b _080981A2 - .align 2, 0 -_08098178: .4byte gUnknown_203ADFA -_0809817C: .4byte sub_80981AC -_08098180: .4byte 0xffffef7f -_08098184: .4byte gTasks -_08098188: - ldr r0, _080981A8 @ =gTasks - lsls r1, r4, 2 - adds r1, r4 - lsls r1, 3 - adds r1, r0 - movs r2, 0x8 - ldrsh r0, [r1, r2] - cmp r0, 0x4 - beq _0809819E - movs r0, 0x4 - strh r0, [r1, 0x8] -_0809819E: - movs r0, 0x1 - strh r0, [r1, 0xE] -_080981A2: - pop {r4-r6} - pop {r0} - bx r0 - .align 2, 0 -_080981A8: .4byte gTasks - thumb_func_end sub_8098110 - - thumb_func_start sub_80981AC -sub_80981AC: @ 80981AC - push {r4,r5,lr} - lsls r0, 24 - lsrs r2, r0, 24 - lsls r0, r2, 2 - adds r0, r2 - lsls r0, 3 - ldr r1, _080981D0 @ =gTasks - adds r4, r0, r1 - movs r1, 0x8 - ldrsh r0, [r4, r1] - cmp r0, 0x8 - bls _080981C6 - b _080982DE -_080981C6: - lsls r0, 2 - ldr r1, _080981D4 @ =_080981D8 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .align 2, 0 -_080981D0: .4byte gTasks -_080981D4: .4byte _080981D8 - .align 2, 0 -_080981D8: - .4byte _080981FC - .4byte _0809820E - .4byte _08098218 - .4byte _08098234 - .4byte _0809824C - .4byte _080982DE - .4byte _0809827E - .4byte _080982A6 - .4byte _080982D6 -_080981FC: - movs r1, 0x18 - ldrsh r0, [r4, r1] - bl sub_8098340 - strh r0, [r4, 0x10] - movs r0, 0x1 - strh r0, [r4, 0x12] - strh r0, [r4, 0x8] - b _080982DE -_0809820E: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _080982DE -_08098218: - ldrh r0, [r4, 0xC] - subs r0, 0x2 - strh r0, [r4, 0xC] - lsls r0, 16 - asrs r0, 16 - movs r1, 0x18 - negs r1, r1 - cmp r0, r1 - bgt _080982DE - movs r0, 0x3 - strh r0, [r4, 0x8] - movs r0, 0 - strh r0, [r4, 0xA] - b _080982DE -_08098234: - ldrh r0, [r4, 0xA] - adds r0, 0x1 - strh r0, [r4, 0xA] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x78 - ble _080982DE - movs r0, 0 - strh r0, [r4, 0xA] - movs r0, 0x4 - strh r0, [r4, 0x8] - b _080982DE -_0809824C: - ldrh r0, [r4, 0xC] - adds r0, 0x2 - strh r0, [r4, 0xC] - lsls r0, 16 - cmp r0, 0 - blt _080982DE - movs r1, 0xE - ldrsh r0, [r4, r1] - cmp r0, 0 - beq _08098278 - ldrh r0, [r4, 0x10] - bl sub_8098400 - ldrb r0, [r4, 0x10] - movs r1, 0x2 - bl CopyWindowToVram - movs r0, 0x1 - strh r0, [r4, 0x8] - movs r0, 0 - strh r0, [r4, 0xE] - b _080982DE -_08098278: - movs r0, 0x6 - strh r0, [r4, 0x8] - b _080982E6 -_0809827E: - movs r1, 0x12 - ldrsh r0, [r4, r1] - cmp r0, 0 - beq _080982A0 - movs r1, 0x14 - ldrsh r0, [r4, r1] - cmp r0, 0 - bne _080982A0 - ldrb r0, [r4, 0x10] - bl rbox_fill_rectangle - ldrb r0, [r4, 0x10] - movs r1, 0x1 - bl CopyWindowToVram - movs r0, 0x1 - strh r0, [r4, 0x14] -_080982A0: - movs r0, 0x7 - strh r0, [r4, 0x8] - b _080982E6 -_080982A6: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, 0 - bne _080982E6 - movs r1, 0x12 - ldrsh r0, [r4, r1] - cmp r0, 0 - beq _080982C6 - ldrb r0, [r4, 0x10] - bl RemoveWindow - strh r5, [r4, 0x12] - movs r0, 0x1 - strh r0, [r4, 0x16] -_080982C6: - movs r0, 0x8 - strh r0, [r4, 0x8] - movs r0, 0 - movs r1, 0 - movs r2, 0 - bl ChangeBgY - b _080982E6 -_080982D6: - adds r0, r2, 0 - bl DestroyTask - b _080982E6 -_080982DE: - ldrh r1, [r4, 0xC] - movs r0, 0x12 - bl SetGpuReg -_080982E6: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_80981AC - - thumb_func_start sub_80982EC -sub_80982EC: @ 80982EC - push {lr} - ldr r0, _08098318 @ =sub_80981AC - bl FindTaskIdByFunc - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0xFF - beq _08098312 - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - ldr r1, _0809831C @ =gTasks+0x8 - adds r1, r0, r1 - movs r2, 0 - ldrsh r0, [r1, r2] - cmp r0, 0x5 - bgt _08098312 - movs r0, 0x6 - strh r0, [r1] -_08098312: - pop {r0} - bx r0 - .align 2, 0 -_08098318: .4byte sub_80981AC -_0809831C: .4byte gTasks+0x8 - thumb_func_end sub_80982EC - - thumb_func_start sub_8098320 -sub_8098320: @ 8098320 - push {lr} - ldr r0, _0809833C @ =sub_80981AC - bl FindTaskIdByFunc - lsls r0, 24 - lsrs r0, 24 - movs r1, 0xFF - eors r0, r1 - negs r1, r0 - orrs r1, r0 - lsrs r1, 31 - adds r0, r1, 0 - pop {r1} - bx r1 - .align 2, 0 -_0809833C: .4byte sub_80981AC - thumb_func_end sub_8098320 - - thumb_func_start sub_8098340 -sub_8098340: @ 8098340 - push {r4-r6,lr} - sub sp, 0x8 - adds r4, r0, 0 - ldr r0, _08098378 @ =gUnknown_83D4164 - ldr r1, [r0, 0x4] - ldr r0, [r0] - str r0, [sp] - str r1, [sp, 0x4] - movs r6, 0x1D - ldr r0, _0809837C @ =gMapHeader - ldrb r0, [r0, 0x1A] - lsls r0, 24 - asrs r0, 24 - cmp r0, 0 - beq _08098396 - cmp r0, 0x7F - beq _08098384 - ldr r2, [sp] - lsrs r1, r2, 24 - adds r1, 0x5 - lsls r1, 24 - ldr r0, _08098380 @ =0x00ffffff - ands r0, r2 - orrs r0, r1 - str r0, [sp] - movs r6, 0x27 - b _08098396 - .align 2, 0 -_08098378: .4byte gUnknown_83D4164 -_0809837C: .4byte gMapHeader -_08098380: .4byte 0x00ffffff -_08098384: - ldr r2, [sp] - lsrs r1, r2, 24 - adds r1, 0x8 - lsls r1, 24 - ldr r0, _080983B4 @ =0x00ffffff - ands r0, r2 - orrs r0, r1 - str r0, [sp] - movs r6, 0x2D -_08098396: - mov r0, sp - bl AddWindow - lsls r0, 16 - lsrs r5, r0, 16 - cmp r4, 0 - beq _080983B8 - movs r0, 0x3 - bl stdpal_get - movs r1, 0xD0 - movs r2, 0x20 - bl LoadPalette - b _080983C6 - .align 2, 0 -_080983B4: .4byte 0x00ffffff -_080983B8: - movs r0, 0x3 - bl stdpal_get - ldr r1, _080983FC @ =gPlttBufferUnfaded + 0x1A0 - movs r2, 0x10 - bl CpuSet -_080983C6: - lsls r4, r5, 24 - lsrs r4, 24 - adds r0, r4, 0 - adds r1, r6, 0 - bl sub_814FF6C - adds r0, r4, 0 - adds r1, r6, 0 - movs r2, 0xD - bl DrawTextBorderOuter - adds r0, r4, 0 - bl PutWindowTilemap - adds r0, r5, 0 - bl sub_8098400 - adds r0, r4, 0 - movs r1, 0x3 - bl CopyWindowToVram - adds r0, r5, 0 - add sp, 0x8 - pop {r4-r6} - pop {r1} - bx r1 - .align 2, 0 -_080983FC: .4byte gPlttBufferUnfaded + 0x1A0 - thumb_func_end sub_8098340 - - thumb_func_start sub_8098400 -sub_8098400: @ 8098400 - push {r4-r6,lr} - sub sp, 0x28 - lsls r0, 16 - lsrs r6, r0, 16 - movs r5, 0x70 - ldr r4, _08098478 @ =gMapHeader - ldrb r1, [r4, 0x14] - add r0, sp, 0xC - movs r2, 0 - bl GetMapName - adds r2, r0, 0 - movs r0, 0x1A - ldrsb r0, [r4, r0] - cmp r0, 0 - beq _08098434 - adds r1, r0, 0 - adds r0, r2, 0 - bl sub_809847C - movs r0, 0x1A - ldrsb r0, [r4, r0] - movs r5, 0xB0 - cmp r0, 0x7F - beq _08098434 - movs r5, 0x98 -_08098434: - movs r2, 0x1 - negs r2, r2 - movs r0, 0x2 - add r1, sp, 0xC - bl GetStringWidth - adds r4, r0, 0 - subs r4, r5, r4 - lsrs r4, 1 - lsls r5, r6, 24 - lsrs r5, 24 - adds r0, r5, 0 - movs r1, 0x11 - bl FillWindowPixelBuffer - lsls r4, 24 - lsrs r4, 24 - movs r0, 0x2 - str r0, [sp] - movs r0, 0xFF - str r0, [sp, 0x4] - movs r0, 0 - str r0, [sp, 0x8] - adds r0, r5, 0 - movs r1, 0x2 - add r2, sp, 0xC - adds r3, r4, 0 - bl AddTextPrinterParameterized - add sp, 0x28 - pop {r4-r6} - pop {r0} - bx r0 - .align 2, 0 -_08098478: .4byte gMapHeader - thumb_func_end sub_8098400 - - thumb_func_start sub_809847C -sub_809847C: @ 809847C - push {lr} - adds r2, r0, 0 - lsls r1, 24 - lsrs r3, r1, 24 - asrs r1, 24 - cmp r1, 0 - beq _080984D2 - movs r0, 0 - strb r0, [r2] - adds r2, 0x1 - cmp r1, 0x7F - bne _080984A4 - ldr r1, _080984A0 @ =gUnknown_841D18D - adds r0, r2, 0 - bl StringCopy - b _080984D2 - .align 2, 0 -_080984A0: .4byte gUnknown_841D18D -_080984A4: - cmp r1, 0 - bge _080984B4 - movs r0, 0xBC - strb r0, [r2] - adds r2, 0x1 - negs r0, r1 - lsls r0, 24 - lsrs r3, r0, 24 -_080984B4: - lsls r1, r3, 24 - asrs r1, 24 - adds r0, r2, 0 - movs r2, 0 - movs r3, 0x2 - bl ConvertIntToDecimalStringN - adds r2, r0, 0 - adds r1, r2, 0 - movs r0, 0xC0 - strb r0, [r2] - adds r2, 0x1 - movs r0, 0xFF - strb r0, [r1, 0x1] - adds r0, r2, 0 -_080984D2: - pop {r1} - bx r1 - thumb_func_end sub_809847C - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/overworld.s b/asm/overworld.s index 9b9fe037f..28bcd8ecb 100644 --- a/asm/overworld.s +++ b/asm/overworld.s @@ -1747,7 +1747,7 @@ _080558D4: cmp r0, r1 beq _08055914 movs r0, 0x1 - bl sub_8098110 + bl CreateMapNamePopupIfNotAlreadyRunning _08055914: add sp, 0x4 pop {r4,r5} @@ -3282,7 +3282,7 @@ sub_805644C: @ 805644C bl sub_81127F8 _0805649E: bl ScriptContext2_Enable - bl sub_80982EC + bl DismissMapNamePopup b _080564BA .align 2, 0 _080564A8: .4byte gUnknown_3005E88 @@ -3323,7 +3323,7 @@ sub_80564C8: @ 80564C8 cmp r0, 0x1 bne _0805650C bl ScriptContext2_Enable - bl sub_80982EC + bl DismissMapNamePopup b _08056522 .align 2, 0 _08056508: .4byte gUnknown_3005E90 @@ -3824,7 +3824,7 @@ sub_8056918: @ 8056918 cmp r0, 0x4 bne _0805692C movs r0, 0 - bl sub_8098110 + bl CreateMapNamePopupIfNotAlreadyRunning _0805692C: bl sub_807DF7C pop {r0} @@ -4223,7 +4223,7 @@ _08056CA8: cmp r0, 0x4 bne _08056CCA movs r0, 0 - bl sub_8098110 + bl CreateMapNamePopupIfNotAlreadyRunning b _08056CCA .align 2, 0 _08056CBC: .4byte gMapHeader diff --git a/baserom.ips b/baserom.ips index d11c55170..c7c4f9714 100644 Binary files a/baserom.ips and b/baserom.ips differ diff --git a/data/item_use.s b/data/item_use.s deleted file mode 100644 index aa78ac919..000000000 --- a/data/item_use.s +++ /dev/null @@ -1,15 +0,0 @@ -#include "constants/maps.h" -#include "constants/species.h" - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - - .incbin "baserom.gba", 0x3E27B4, 0x1A0 - -gUnknown_83E2954:: @ 83E2954 - .4byte sub_8124C8C - .4byte CB2_ReturnToField - .4byte NULL - .4byte NULL diff --git a/data/map_name_popup.s b/data/map_name_popup.s deleted file mode 100644 index 6509df895..000000000 --- a/data/map_name_popup.s +++ /dev/null @@ -1,10 +0,0 @@ -#include "constants/maps.h" -#include "constants/species.h" - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnknown_83D4164:: @ 83D4164 - .incbin "baserom.gba", 0x3D4164, 0x8 diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index c0f25fa93..70e806266 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -163,7 +163,7 @@ struct MapHeader /* 0x17 */ u8 mapType; /* 0x18 */ u8 filler_18; /* 0x19 */ u8 escapeRope; - /* 0x1A */ u8 flags; + /* 0x1A */ s8 flags; /* 0x1B */ u8 battleType; }; diff --git a/include/map_name_popup.h b/include/map_name_popup.h index cf9b005d9..6f4a6528c 100644 --- a/include/map_name_popup.h +++ b/include/map_name_popup.h @@ -9,6 +9,6 @@ // Exported ROM declarations void HideMapNamePopUpWindow(void); -void sub_8098110(u8); +void CreateMapNamePopupIfNotAlreadyRunning(u8); #endif //GUARD_MAP_NAME_POPUP_H diff --git a/include/strings.h b/include/strings.h index 983caf509..6ad76e2fa 100644 --- a/include/strings.h +++ b/include/strings.h @@ -738,4 +738,7 @@ extern const u8 gText_GiveUpTryingToTeachNewMove[]; // pokemon_size_record extern const u8 gText_DecimalPoint[]; +// map_name_popup +extern const u8 gUnknown_841D18D[]; + #endif //GUARD_STRINGS_H diff --git a/include/text_window.h b/include/text_window.h index c1463a9c7..8e8466145 100644 --- a/include/text_window.h +++ b/include/text_window.h @@ -29,5 +29,6 @@ void DrawTextBorderOuter(u8 windowId, u16 tileStart, u8 palette); void TextWindow_LoadTilesStdFrame1(u8 windowId, u16 destOffset); void sub_814FE6C(u8 windowId, u16 destOffset, u8 palIdx); void sub_814FEEC(u8 windowId, u16 destOffset, u8 palIdx); +void sub_814FF6C(u8 windowId, u16 destOffset); #endif // GUARD_TEXT_WINDOW_H diff --git a/ld_script.txt b/ld_script.txt index d40c88c0a..856155aa8 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -136,7 +136,7 @@ SECTIONS { asm/script_movement.o(.text); asm/fldeff_cut.o(.text); src/mail_data.o(.text); - asm/map_name_popup.o(.text); + src/map_name_popup.o(.text); src/item_menu_icons.o(.text); src/battle_anim_mon_movement.o(.text); src/item.o(.text); @@ -438,7 +438,7 @@ SECTIONS { data/pokemon_storage_system.o(.rodata); src/pokemon_icon.o(.rodata); data/fldeff_cut.o(.rodata); - data/map_name_popup.o(.rodata); + src/map_name_popup.o(.rodata); src/item_menu_icons.o(.rodata); src/battle_anim_mon_movement.o(.rodata); src/item.o(.rodata); @@ -447,7 +447,7 @@ SECTIONS { src/script_menu.o(.rodata); data/naming_screen.o(.rodata); src/pokemon_size_record.o(.rodata); - data/item_use.o(.rodata); + src/item_use.o(.rodata); data/battle_anim_effects_misc.o(.rodata); src/flying.o(.rodata); src/psychic.o(.rodata); diff --git a/src/item_use.c b/src/item_use.c index 873ce4ab4..db0475370 100644 --- a/src/item_use.c +++ b/src/item_use.c @@ -76,7 +76,68 @@ void sub_80A1D68(u8 taskId); void Task_BattleUse_StatBooster_DelayAndPrint(u8 taskId); void Task_BattleUse_StatBooster_WaitButton_ReturnToBattle(u8 taskId); -extern void (*const gUnknown_83E2954[])(void); +// No clue what this is +static const u8 sUnref_83E27B4[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x20, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x04, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x20, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x21, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x30, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x1f, 0x00, 0xe0, 0x03, 0x00, 0x7c, + 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +void (*const gUnknown_83E2954[])(void) = { + sub_8124C8C, + CB2_ReturnToField, + NULL, + NULL +}; void sub_80A0FBC(u8 taskId) { diff --git a/src/map_name_popup.c b/src/map_name_popup.c new file mode 100644 index 000000000..361c3a931 --- /dev/null +++ b/src/map_name_popup.c @@ -0,0 +1,216 @@ +#include "global.h" +#include "bg.h" +#include "gpu_regs.h" +#include "window.h" +#include "palette.h" +#include "task.h" +#include "event_data.h" +#include "text_window.h" +#include "quest_log.h" +#include "region_map.h" +#include "text.h" +#include "strings.h" +#include "string_util.h" +#include "constants/flags.h" + +static void Task_MapNamePopup(u8 taskId); +static u16 MapNamePopupCreateWindow(int a0); +static void MapNamePopupPrintMapNameOnWindow(u16 a0); +static u8 *MapNamePopupAppendFloorNum(u8 *dest, s8 flags); + +void CreateMapNamePopupIfNotAlreadyRunning(int a0) +{ + u8 taskId; + if (FlagGet(FLAG_SPECIAL_FLAG_0x4000) != TRUE && !(gUnknown_203ADFA == 2 || gUnknown_203ADFA == 3)) + { + taskId = FindTaskIdByFunc(Task_MapNamePopup); + if (taskId == 0xFF) + { + taskId = CreateTask(Task_MapNamePopup, 90); + ChangeBgX(0, 0x00000000, 0); + ChangeBgY(0, 0xFFFFEF7F, 0); + gTasks[taskId].data[0] = 0; + gTasks[taskId].data[2] = 0; + gTasks[taskId].data[8] = a0; + } + else + { + if (gTasks[taskId].data[0] != 4) + gTasks[taskId].data[0] = 4; + gTasks[taskId].data[3] = 1; + } + } +} + +static void Task_MapNamePopup(u8 taskId) +{ + struct Task * task = &gTasks[taskId]; + switch (task->data[0]) + { + case 0: + task->data[4] = MapNamePopupCreateWindow(task->data[8]); + task->data[5] = 1; + task->data[0] = 1; + break; + case 1: + if (IsDma3ManagerBusyWithBgCopy()) + break; + // fallthrough + case 2: + task->data[2] -= 2; + if (task->data[2] <= -24) + { + task->data[0] = 3; + task->data[1] = 0; + } + break; + case 3: + task->data[1]++; + if (task->data[1] > 120) + { + task->data[1] = 0; + task->data[0] = 4; + } + break; + case 4: + task->data[2] += 2; + if (task->data[2] >= 0) + { + if (task->data[3]) + { + MapNamePopupPrintMapNameOnWindow(task->data[4]); + CopyWindowToVram(task->data[4], 2); + task->data[0] = 1; + task->data[3] = 0; + } + else + { + task->data[0] = 6; + return; + } + } + case 5: + break; + case 6: + if (task->data[5] && !task->data[6]) + { + rbox_fill_rectangle(task->data[4]); + CopyWindowToVram(task->data[4], 1); + task->data[6] = 1; + } + task->data[0] = 7; + return; + case 7: + if (!IsDma3ManagerBusyWithBgCopy()) + { + if (task->data[5]) + { + RemoveWindow(task->data[4]); + task->data[5] = 0; + task->data[7] = 1; + } + task->data[0] = 8; + ChangeBgY(0, 0x00000000, 0); + } + return; + case 8: + DestroyTask(taskId); + return; + } + SetGpuReg(REG_OFFSET_BG0VOFS, task->data[2]); +} + +void DismissMapNamePopup(void) +{ + u8 taskId; + s16 *data; + taskId = FindTaskIdByFunc(Task_MapNamePopup); + if (taskId != 0xFF) + { + data = gTasks[taskId].data; + if (data[0] < 6) + data[0] = 6; + } +} + +bool32 IsMapNamePopupTaskActive(void) +{ + return FindTaskIdByFunc(Task_MapNamePopup) != 0xFF ? TRUE : FALSE; +} + +static u16 MapNamePopupCreateWindow(int a0) +{ + struct WindowTemplate windowTemplate = { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 29, + .width = 14, + .height = 2, + .paletteNum = 0xD, + .baseBlock = 0x001 + }; + u16 windowId; + u16 r6 = 0x01D; + if (gMapHeader.flags) + { + if (gMapHeader.flags != 0x7F) + { + windowTemplate.width += 5; + r6 = 0x027; + } + else + { + windowTemplate.width += 8; + r6 = 0x02D; + } + } + windowId = AddWindow(&windowTemplate); + if (a0) + { + LoadPalette(stdpal_get(3), 0xd0, 0x20); + } + else + { + CpuCopy16(stdpal_get(3), &gPlttBufferUnfaded[0xd0], 0x20); + } + sub_814FF6C(windowId, r6); + DrawTextBorderOuter(windowId, r6, 0xD); + PutWindowTilemap(windowId); + MapNamePopupPrintMapNameOnWindow(windowId); + CopyWindowToVram(windowId, 3); + return windowId; +} + +static void MapNamePopupPrintMapNameOnWindow(u16 windowId) +{ + u8 mapName[25]; + u32 maxWidth = 112; + u32 xpos; + u8 *ptr = GetMapName(mapName, gMapHeader.regionMapSectionId, 0); + if (gMapHeader.flags) + { + ptr = MapNamePopupAppendFloorNum(ptr, gMapHeader.flags); + maxWidth = gMapHeader.flags != 0x7F ? 152 : 176; + } + xpos = (maxWidth - GetStringWidth(2, mapName, -1)) / 2; + FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); + AddTextPrinterParameterized(windowId, 2, mapName, xpos, 2, 0xFF, NULL); +} + +static u8 *MapNamePopupAppendFloorNum(u8 *dest, s8 flags) +{ + if (flags == 0) + return dest; + *dest++ = CHAR_SPACE; + if (flags == 0x7F) + return StringCopy(dest, gUnknown_841D18D); + if (flags < 0) + { + *dest++ = CHAR_B; + flags *= -1; + } + dest = ConvertIntToDecimalStringN(dest, flags, STR_CONV_MODE_LEFT_ALIGN, 2); + *dest++ = CHAR_F; + *dest = EOS; + return dest; +} diff --git a/src/quest_log.c b/src/quest_log.c index 64d3df076..2675d3a4f 100644 --- a/src/quest_log.c +++ b/src/quest_log.c @@ -1425,7 +1425,7 @@ static void sub_81120AC(u8 taskId) break; default: if (gUnknown_203AE94.unk_0_6 == 1) - sub_8098110(1); + CreateMapNamePopupIfNotAlreadyRunning(1); CpuCopy16(gUnknown_203AE90, gPlttBufferUnfaded, 0x400); Free(gUnknown_203AE90); gUnknown_203AE94 = (struct UnkStruct_203AE94){}; -- cgit v1.2.3 From 3cbc3121304a0dfb34566a16b828dda96c474700 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 12 Nov 2019 11:21:49 -0500 Subject: Dump field_door data; start field_door decomp --- asm/field_door.s | 183 ----------- baserom.ips | Bin 398518 -> 363962 bytes data/field_door.s | 539 +++++++++++++++++++++++++++++++- data/metatile_behavior.s | 6 - graphics/door_anims/frame_8353088_1.png | Bin 0 -> 139 bytes graphics/door_anims/frame_8353088_2.png | Bin 0 -> 124 bytes graphics/door_anims/frame_8353088_3.png | Bin 0 -> 102 bytes graphics/door_anims/frame_8353228_1.png | Bin 0 -> 105 bytes graphics/door_anims/frame_8353228_2.png | Bin 0 -> 116 bytes graphics/door_anims/frame_8353228_3.png | Bin 0 -> 103 bytes graphics/door_anims/frame_83533C8_1.png | Bin 0 -> 121 bytes graphics/door_anims/frame_83533C8_2.png | Bin 0 -> 128 bytes graphics/door_anims/frame_83533C8_3.png | Bin 0 -> 103 bytes graphics/door_anims/frame_8353568_1.png | Bin 0 -> 147 bytes graphics/door_anims/frame_8353568_2.png | Bin 0 -> 130 bytes graphics/door_anims/frame_8353568_3.png | Bin 0 -> 102 bytes graphics/door_anims/frame_8353708_1.png | Bin 0 -> 144 bytes graphics/door_anims/frame_8353708_2.png | Bin 0 -> 127 bytes graphics/door_anims/frame_8353708_3.png | Bin 0 -> 102 bytes graphics/door_anims/frame_83538A8_1.png | Bin 0 -> 131 bytes graphics/door_anims/frame_83538A8_2.png | Bin 0 -> 123 bytes graphics/door_anims/frame_83538A8_3.png | Bin 0 -> 108 bytes graphics/door_anims/frame_8353A48_1.png | Bin 0 -> 146 bytes graphics/door_anims/frame_8353A48_2.png | Bin 0 -> 130 bytes graphics/door_anims/frame_8353A48_3.png | Bin 0 -> 102 bytes graphics/door_anims/frame_8353BE8_1.png | Bin 0 -> 140 bytes graphics/door_anims/frame_8353BE8_2.png | Bin 0 -> 124 bytes graphics/door_anims/frame_8353BE8_3.png | Bin 0 -> 103 bytes graphics/door_anims/frame_8353D88_1.png | Bin 0 -> 125 bytes graphics/door_anims/frame_8353D88_2.png | Bin 0 -> 130 bytes graphics/door_anims/frame_8353D88_3.png | Bin 0 -> 95 bytes graphics/door_anims/frame_8353F28_1.png | Bin 0 -> 145 bytes graphics/door_anims/frame_8353F28_2.png | Bin 0 -> 133 bytes graphics/door_anims/frame_8353F28_3.png | Bin 0 -> 103 bytes graphics/door_anims/frame_83540C8_1.png | Bin 0 -> 141 bytes graphics/door_anims/frame_83540C8_2.png | Bin 0 -> 125 bytes graphics/door_anims/frame_83540C8_3.png | Bin 0 -> 103 bytes graphics/door_anims/frame_8354268_1.png | Bin 0 -> 138 bytes graphics/door_anims/frame_8354268_2.png | Bin 0 -> 130 bytes graphics/door_anims/frame_8354268_3.png | Bin 0 -> 103 bytes graphics/door_anims/frame_8354408_1.png | Bin 0 -> 146 bytes graphics/door_anims/frame_8354408_2.png | Bin 0 -> 138 bytes graphics/door_anims/frame_8354408_3.png | Bin 0 -> 119 bytes graphics/door_anims/frame_83545A8_1.png | Bin 0 -> 122 bytes graphics/door_anims/frame_83545A8_2.png | Bin 0 -> 129 bytes graphics/door_anims/frame_83545A8_3.png | Bin 0 -> 105 bytes graphics/door_anims/frame_8354748_1.png | Bin 0 -> 151 bytes graphics/door_anims/frame_8354748_2.png | Bin 0 -> 129 bytes graphics/door_anims/frame_8354748_3.png | Bin 0 -> 103 bytes graphics/door_anims/frame_83548E8_1.png | Bin 0 -> 150 bytes graphics/door_anims/frame_83548E8_2.png | Bin 0 -> 131 bytes graphics/door_anims/frame_83548E8_3.png | Bin 0 -> 90 bytes graphics/door_anims/frame_8354A88_1.png | Bin 0 -> 140 bytes graphics/door_anims/frame_8354A88_2.png | Bin 0 -> 127 bytes graphics/door_anims/frame_8354A88_3.png | Bin 0 -> 98 bytes graphics/door_anims/frame_8354C28_1.png | Bin 0 -> 130 bytes graphics/door_anims/frame_8354C28_2.png | Bin 0 -> 127 bytes graphics/door_anims/frame_8354C28_3.png | Bin 0 -> 104 bytes graphics/door_anims/frame_8354F48_1.png | Bin 0 -> 139 bytes graphics/door_anims/frame_8354F48_2.png | Bin 0 -> 141 bytes graphics/door_anims/frame_8354F48_3.png | Bin 0 -> 130 bytes graphics/door_anims/frame_8355268_1.png | Bin 0 -> 137 bytes graphics/door_anims/frame_8355268_2.png | Bin 0 -> 137 bytes graphics/door_anims/frame_8355268_3.png | Bin 0 -> 115 bytes graphics/door_anims/frame_8355588_1.png | Bin 0 -> 177 bytes graphics/door_anims/frame_8355588_2.png | Bin 0 -> 160 bytes graphics/door_anims/frame_8355588_3.png | Bin 0 -> 123 bytes graphics/door_anims/frame_8359588_1.png | Bin 0 -> 79 bytes graphics/door_anims/frame_8359588_2.png | Bin 0 -> 79 bytes graphics/door_anims/frame_8359788_1.png | Bin 0 -> 101 bytes graphics/door_anims/frame_8359788_2.png | Bin 0 -> 100 bytes graphics/door_anims/frame_8359788_3.png | Bin 0 -> 88 bytes graphics/door_anims/frame_8359788_4.png | Bin 0 -> 80 bytes graphics/door_anims/frame_8359988_1.png | Bin 0 -> 104 bytes graphics/door_anims/frame_8359988_2.png | Bin 0 -> 112 bytes graphics/door_anims/frame_8359988_3.png | Bin 0 -> 102 bytes graphics/door_anims/frame_8359988_4.png | Bin 0 -> 90 bytes graphics/door_anims/frame_8359B88_1.png | Bin 0 -> 105 bytes graphics/door_anims/frame_8359B88_2.png | Bin 0 -> 109 bytes graphics/door_anims/frame_8359B88_3.png | Bin 0 -> 109 bytes graphics/door_anims/frame_8359B88_4.png | Bin 0 -> 89 bytes graphics/door_anims/frame_8359CA8_1.png | Bin 0 -> 139 bytes graphics/door_anims/frame_8359CA8_2.png | Bin 0 -> 139 bytes graphics/door_anims/frame_8359CA8_3.png | Bin 0 -> 117 bytes graphics/door_anims/frame_8359FC8_1.png | Bin 0 -> 132 bytes graphics/door_anims/frame_8359FC8_2.png | Bin 0 -> 125 bytes graphics/door_anims/frame_8359FC8_3.png | Bin 0 -> 103 bytes graphics/door_anims/frame_835A168_1.png | Bin 0 -> 121 bytes graphics/door_anims/frame_835A168_2.png | Bin 0 -> 127 bytes graphics/door_anims/frame_835A168_3.png | Bin 0 -> 104 bytes graphics/door_anims/frame_835A308_1.png | Bin 0 -> 128 bytes graphics/door_anims/frame_835A308_2.png | Bin 0 -> 130 bytes graphics/door_anims/frame_835A308_3.png | Bin 0 -> 104 bytes graphics/door_anims/frame_835A4A8_1.png | Bin 0 -> 132 bytes graphics/door_anims/frame_835A4A8_2.png | Bin 0 -> 125 bytes graphics/door_anims/frame_835A4A8_3.png | Bin 0 -> 103 bytes graphics/door_anims/frame_835A648_1.png | Bin 0 -> 144 bytes graphics/door_anims/frame_835A648_2.png | Bin 0 -> 130 bytes graphics/door_anims/frame_835A648_3.png | Bin 0 -> 103 bytes graphics/door_anims/frame_835A7E8_1.png | Bin 0 -> 140 bytes graphics/door_anims/frame_835A7E8_2.png | Bin 0 -> 138 bytes graphics/door_anims/frame_835A7E8_3.png | Bin 0 -> 107 bytes graphics/door_anims/frame_835A988_1.png | Bin 0 -> 132 bytes graphics/door_anims/frame_835A988_2.png | Bin 0 -> 125 bytes graphics/door_anims/frame_835A988_3.png | Bin 0 -> 103 bytes graphics/door_anims/frame_835AB28_1.png | Bin 0 -> 223 bytes graphics/door_anims/frame_835AB28_2.png | Bin 0 -> 212 bytes graphics/door_anims/frame_835AB28_3.png | Bin 0 -> 192 bytes graphics/door_anims/frame_835AE48_1.png | Bin 0 -> 141 bytes graphics/door_anims/frame_835AE48_2.png | Bin 0 -> 141 bytes graphics/door_anims/frame_835AE48_3.png | Bin 0 -> 119 bytes graphics/door_anims/frame_835B168_1.png | Bin 0 -> 137 bytes graphics/door_anims/frame_835B168_2.png | Bin 0 -> 137 bytes graphics/door_anims/frame_835B168_3.png | Bin 0 -> 115 bytes include/field_camera.h | 1 + include/metatile_behavior.h | 1 - ld_script.txt | 3 +- src/field_door.c | 102 ++++++ src/metatile_behavior.c | 37 ++- 119 files changed, 675 insertions(+), 197 deletions(-) delete mode 100644 data/metatile_behavior.s create mode 100644 graphics/door_anims/frame_8353088_1.png create mode 100644 graphics/door_anims/frame_8353088_2.png create mode 100644 graphics/door_anims/frame_8353088_3.png create mode 100644 graphics/door_anims/frame_8353228_1.png create mode 100644 graphics/door_anims/frame_8353228_2.png create mode 100644 graphics/door_anims/frame_8353228_3.png create mode 100644 graphics/door_anims/frame_83533C8_1.png create mode 100644 graphics/door_anims/frame_83533C8_2.png create mode 100644 graphics/door_anims/frame_83533C8_3.png create mode 100644 graphics/door_anims/frame_8353568_1.png create mode 100644 graphics/door_anims/frame_8353568_2.png create mode 100644 graphics/door_anims/frame_8353568_3.png create mode 100644 graphics/door_anims/frame_8353708_1.png create mode 100644 graphics/door_anims/frame_8353708_2.png create mode 100644 graphics/door_anims/frame_8353708_3.png create mode 100644 graphics/door_anims/frame_83538A8_1.png create mode 100644 graphics/door_anims/frame_83538A8_2.png create mode 100644 graphics/door_anims/frame_83538A8_3.png create mode 100644 graphics/door_anims/frame_8353A48_1.png create mode 100644 graphics/door_anims/frame_8353A48_2.png create mode 100644 graphics/door_anims/frame_8353A48_3.png create mode 100644 graphics/door_anims/frame_8353BE8_1.png create mode 100644 graphics/door_anims/frame_8353BE8_2.png create mode 100644 graphics/door_anims/frame_8353BE8_3.png create mode 100644 graphics/door_anims/frame_8353D88_1.png create mode 100644 graphics/door_anims/frame_8353D88_2.png create mode 100644 graphics/door_anims/frame_8353D88_3.png create mode 100644 graphics/door_anims/frame_8353F28_1.png create mode 100644 graphics/door_anims/frame_8353F28_2.png create mode 100644 graphics/door_anims/frame_8353F28_3.png create mode 100644 graphics/door_anims/frame_83540C8_1.png create mode 100644 graphics/door_anims/frame_83540C8_2.png create mode 100644 graphics/door_anims/frame_83540C8_3.png create mode 100644 graphics/door_anims/frame_8354268_1.png create mode 100644 graphics/door_anims/frame_8354268_2.png create mode 100644 graphics/door_anims/frame_8354268_3.png create mode 100644 graphics/door_anims/frame_8354408_1.png create mode 100644 graphics/door_anims/frame_8354408_2.png create mode 100644 graphics/door_anims/frame_8354408_3.png create mode 100644 graphics/door_anims/frame_83545A8_1.png create mode 100644 graphics/door_anims/frame_83545A8_2.png create mode 100644 graphics/door_anims/frame_83545A8_3.png create mode 100644 graphics/door_anims/frame_8354748_1.png create mode 100644 graphics/door_anims/frame_8354748_2.png create mode 100644 graphics/door_anims/frame_8354748_3.png create mode 100644 graphics/door_anims/frame_83548E8_1.png create mode 100644 graphics/door_anims/frame_83548E8_2.png create mode 100644 graphics/door_anims/frame_83548E8_3.png create mode 100644 graphics/door_anims/frame_8354A88_1.png create mode 100644 graphics/door_anims/frame_8354A88_2.png create mode 100644 graphics/door_anims/frame_8354A88_3.png create mode 100644 graphics/door_anims/frame_8354C28_1.png create mode 100644 graphics/door_anims/frame_8354C28_2.png create mode 100644 graphics/door_anims/frame_8354C28_3.png create mode 100644 graphics/door_anims/frame_8354F48_1.png create mode 100644 graphics/door_anims/frame_8354F48_2.png create mode 100644 graphics/door_anims/frame_8354F48_3.png create mode 100644 graphics/door_anims/frame_8355268_1.png create mode 100644 graphics/door_anims/frame_8355268_2.png create mode 100644 graphics/door_anims/frame_8355268_3.png create mode 100644 graphics/door_anims/frame_8355588_1.png create mode 100644 graphics/door_anims/frame_8355588_2.png create mode 100644 graphics/door_anims/frame_8355588_3.png create mode 100644 graphics/door_anims/frame_8359588_1.png create mode 100644 graphics/door_anims/frame_8359588_2.png create mode 100644 graphics/door_anims/frame_8359788_1.png create mode 100644 graphics/door_anims/frame_8359788_2.png create mode 100644 graphics/door_anims/frame_8359788_3.png create mode 100644 graphics/door_anims/frame_8359788_4.png create mode 100644 graphics/door_anims/frame_8359988_1.png create mode 100644 graphics/door_anims/frame_8359988_2.png create mode 100644 graphics/door_anims/frame_8359988_3.png create mode 100644 graphics/door_anims/frame_8359988_4.png create mode 100644 graphics/door_anims/frame_8359B88_1.png create mode 100644 graphics/door_anims/frame_8359B88_2.png create mode 100644 graphics/door_anims/frame_8359B88_3.png create mode 100644 graphics/door_anims/frame_8359B88_4.png create mode 100644 graphics/door_anims/frame_8359CA8_1.png create mode 100644 graphics/door_anims/frame_8359CA8_2.png create mode 100644 graphics/door_anims/frame_8359CA8_3.png create mode 100644 graphics/door_anims/frame_8359FC8_1.png create mode 100644 graphics/door_anims/frame_8359FC8_2.png create mode 100644 graphics/door_anims/frame_8359FC8_3.png create mode 100644 graphics/door_anims/frame_835A168_1.png create mode 100644 graphics/door_anims/frame_835A168_2.png create mode 100644 graphics/door_anims/frame_835A168_3.png create mode 100644 graphics/door_anims/frame_835A308_1.png create mode 100644 graphics/door_anims/frame_835A308_2.png create mode 100644 graphics/door_anims/frame_835A308_3.png create mode 100644 graphics/door_anims/frame_835A4A8_1.png create mode 100644 graphics/door_anims/frame_835A4A8_2.png create mode 100644 graphics/door_anims/frame_835A4A8_3.png create mode 100644 graphics/door_anims/frame_835A648_1.png create mode 100644 graphics/door_anims/frame_835A648_2.png create mode 100644 graphics/door_anims/frame_835A648_3.png create mode 100644 graphics/door_anims/frame_835A7E8_1.png create mode 100644 graphics/door_anims/frame_835A7E8_2.png create mode 100644 graphics/door_anims/frame_835A7E8_3.png create mode 100644 graphics/door_anims/frame_835A988_1.png create mode 100644 graphics/door_anims/frame_835A988_2.png create mode 100644 graphics/door_anims/frame_835A988_3.png create mode 100644 graphics/door_anims/frame_835AB28_1.png create mode 100644 graphics/door_anims/frame_835AB28_2.png create mode 100644 graphics/door_anims/frame_835AB28_3.png create mode 100644 graphics/door_anims/frame_835AE48_1.png create mode 100644 graphics/door_anims/frame_835AE48_2.png create mode 100644 graphics/door_anims/frame_835AE48_3.png create mode 100644 graphics/door_anims/frame_835B168_1.png create mode 100644 graphics/door_anims/frame_835B168_2.png create mode 100644 graphics/door_anims/frame_835B168_3.png create mode 100644 src/field_door.c diff --git a/asm/field_door.s b/asm/field_door.s index bcb8a6082..b4541ffaf 100644 --- a/asm/field_door.s +++ b/asm/field_door.s @@ -5,189 +5,6 @@ .text - thumb_func_start sub_805AF14 -sub_805AF14: @ 805AF14 - push {r4-r7,lr} - adds r4, r0, 0 - adds r5, r1, 0 - adds r6, r2, 0 - adds r7, r3, 0 - ldrh r1, [r5, 0x2] - ldr r0, _0805AF34 @ =0x0000ffff - cmp r1, r0 - bne _0805AF38 - adds r0, r4, 0 - adds r1, r6, 0 - adds r2, r7, 0 - bl sub_805AF54 - b _0805AF4E - .align 2, 0 -_0805AF34: .4byte 0x0000ffff -_0805AF38: - ldrh r1, [r5, 0x2] - ldr r0, [r4, 0x4] - adds r0, r1 - bl sub_805AF80 - ldr r3, [r4, 0x8] - adds r0, r4, 0 - adds r1, r6, 0 - adds r2, r7, 0 - bl sub_805AF94 -_0805AF4E: - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_805AF14 - - thumb_func_start sub_805AF54 -sub_805AF54: @ 805AF54 - push {r4,r5,lr} - adds r5, r1, 0 - adds r4, r2, 0 - ldrb r0, [r0, 0x3] - cmp r0, 0 - bne _0805AF6A - adds r0, r5, 0 - adds r1, r4, 0 - bl CurrentMapDrawMetatileAt - b _0805AF7A -_0805AF6A: - adds r0, r5, 0 - adds r1, r4, 0 - bl CurrentMapDrawMetatileAt - subs r1, r4, 0x1 - adds r0, r5, 0 - bl CurrentMapDrawMetatileAt -_0805AF7A: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_805AF54 - - thumb_func_start sub_805AF80 -sub_805AF80: @ 805AF80 - push {lr} - ldr r1, _0805AF90 @ =0x06007f00 - movs r2, 0x40 - bl CpuFastSet - pop {r0} - bx r0 - .align 2, 0 -_0805AF90: .4byte 0x06007f00 - thumb_func_end sub_805AF80 - - thumb_func_start sub_805AF94 -sub_805AF94: @ 805AF94 - push {r4-r6,lr} - sub sp, 0x10 - adds r5, r1, 0 - adds r6, r2, 0 - adds r4, r3, 0 - ldrb r0, [r0, 0x3] - cmp r0, 0 - bne _0805AFB2 - movs r1, 0xFE - lsls r1, 2 - mov r0, sp - adds r2, r4, 0 - bl sub_805AFE8 - b _0805AFD4 -_0805AFB2: - movs r1, 0xFE - lsls r1, 2 - mov r0, sp - adds r2, r4, 0 - bl sub_805AFE8 - subs r1, r6, 0x1 - adds r0, r5, 0 - mov r2, sp - bl sub_805A91C - movs r1, 0xFF - lsls r1, 2 - adds r2, r4, 0x4 - mov r0, sp - bl sub_805AFE8 -_0805AFD4: - adds r0, r5, 0 - adds r1, r6, 0 - mov r2, sp - bl sub_805A91C - add sp, 0x10 - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_805AF94 - - thumb_func_start sub_805AFE8 -sub_805AFE8: @ 805AFE8 - push {r4-r6,lr} - adds r6, r0, 0 - lsls r1, 16 - lsrs r5, r1, 16 - movs r4, 0 - adds r1, r6, 0 -_0805AFF4: - ldrb r0, [r2] - lsls r0, 28 - lsrs r3, r0, 16 - adds r2, 0x1 - adds r0, r5, r4 - orrs r3, r0 - strh r3, [r1] - adds r1, 0x2 - adds r4, 0x1 - cmp r4, 0x3 - ble _0805AFF4 - cmp r4, 0x7 - bgt _0805B022 - lsls r0, r4, 1 - adds r1, r0, r6 -_0805B012: - ldrb r0, [r2] - lsls r3, r0, 12 - adds r2, 0x1 - strh r3, [r1] - adds r1, 0x2 - adds r4, 0x1 - cmp r4, 0x7 - ble _0805B012 -_0805B022: - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_805AFE8 - - thumb_func_start sub_805B028 -sub_805B028: @ 805B028 - push {r4,lr} - lsls r0, 24 - lsrs r4, r0, 24 - lsls r2, r4, 2 - adds r2, r4 - lsls r2, 3 - ldr r0, _0805B05C @ =gTasks+0x8 - adds r2, r0 - ldrh r1, [r2] - lsls r1, 16 - ldrh r0, [r2, 0x2] - orrs r1, r0 - ldrh r0, [r2, 0x4] - lsls r0, 16 - ldrh r3, [r2, 0x6] - orrs r0, r3 - bl sub_805B060 - cmp r0, 0 - bne _0805B056 - adds r0, r4, 0 - bl DestroyTask -_0805B056: - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_0805B05C: .4byte gTasks+0x8 - thumb_func_end sub_805B028 - thumb_func_start sub_805B060 sub_805B060: @ 805B060 push {r4-r6,lr} diff --git a/baserom.ips b/baserom.ips index c7c4f9714..7c99bf40b 100644 Binary files a/baserom.ips and b/baserom.ips differ diff --git a/data/field_door.s b/data/field_door.s index a29cf3e24..be76e845d 100644 --- a/data/field_door.s +++ b/data/field_door.s @@ -1,17 +1,546 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" .section .rodata + .align 2, 0 + +gUnknown_8353088:: @ 8353088 + .incbin "graphics/door_anims/frame_8353088_1.4bpp" + .incbin "graphics/door_anims/frame_8353088_2.4bpp" + .incbin "graphics/door_anims/frame_8353088_3.4bpp" + .space 32 + +gUnknown_8353228:: @ 8353228 + .incbin "graphics/door_anims/frame_8353228_1.4bpp" + .incbin "graphics/door_anims/frame_8353228_2.4bpp" + .incbin "graphics/door_anims/frame_8353228_3.4bpp" + .space 32 + +gUnknown_83533C8:: @ 83533C8 + .incbin "graphics/door_anims/frame_83533C8_1.4bpp" + .incbin "graphics/door_anims/frame_83533C8_2.4bpp" + .incbin "graphics/door_anims/frame_83533C8_3.4bpp" + .space 32 + +gUnknown_8353568:: @ 8353568 + .incbin "graphics/door_anims/frame_8353568_1.4bpp" + .incbin "graphics/door_anims/frame_8353568_2.4bpp" + .incbin "graphics/door_anims/frame_8353568_3.4bpp" + .space 32 + +gUnknown_8353708:: @ 8353708 + .incbin "graphics/door_anims/frame_8353708_1.4bpp" + .incbin "graphics/door_anims/frame_8353708_2.4bpp" + .incbin "graphics/door_anims/frame_8353708_3.4bpp" + .space 32 + +gUnknown_83538A8:: @ 83538A8 + .incbin "graphics/door_anims/frame_83538A8_1.4bpp" + .incbin "graphics/door_anims/frame_83538A8_2.4bpp" + .incbin "graphics/door_anims/frame_83538A8_3.4bpp" + .space 32 + +gUnknown_8353A48:: @ 8353A48 + .incbin "graphics/door_anims/frame_8353A48_1.4bpp" + .incbin "graphics/door_anims/frame_8353A48_2.4bpp" + .incbin "graphics/door_anims/frame_8353A48_3.4bpp" + .space 32 + +gUnknown_8353BE8:: @ 8353BE8 + .incbin "graphics/door_anims/frame_8353BE8_1.4bpp" + .incbin "graphics/door_anims/frame_8353BE8_2.4bpp" + .incbin "graphics/door_anims/frame_8353BE8_3.4bpp" + .space 32 + +gUnknown_8353D88:: @ 8353D88 + .incbin "graphics/door_anims/frame_8353D88_1.4bpp" + .incbin "graphics/door_anims/frame_8353D88_2.4bpp" + .incbin "graphics/door_anims/frame_8353D88_3.4bpp" + .space 32 + +gUnknown_8353F28:: @ 8353F28 + .incbin "graphics/door_anims/frame_8353F28_1.4bpp" + .incbin "graphics/door_anims/frame_8353F28_2.4bpp" + .incbin "graphics/door_anims/frame_8353F28_3.4bpp" + .space 32 + +gUnknown_83540C8:: @ 83540C8 + .incbin "graphics/door_anims/frame_83540C8_1.4bpp" + .incbin "graphics/door_anims/frame_83540C8_2.4bpp" + .incbin "graphics/door_anims/frame_83540C8_3.4bpp" + .space 32 + +gUnknown_8354268:: @ 8354268 + .incbin "graphics/door_anims/frame_8354268_1.4bpp" + .incbin "graphics/door_anims/frame_8354268_2.4bpp" + .incbin "graphics/door_anims/frame_8354268_3.4bpp" + .space 32 + +gUnknown_8354408:: @ 8354408 + .incbin "graphics/door_anims/frame_8354408_1.4bpp" + .incbin "graphics/door_anims/frame_8354408_2.4bpp" + .incbin "graphics/door_anims/frame_8354408_3.4bpp" + .space 32 + +gUnknown_83545A8:: @ 83545A8 + .incbin "graphics/door_anims/frame_83545A8_1.4bpp" + .incbin "graphics/door_anims/frame_83545A8_2.4bpp" + .incbin "graphics/door_anims/frame_83545A8_3.4bpp" + .space 32 + +gUnknown_8354748:: @ 8354748 + .incbin "graphics/door_anims/frame_8354748_1.4bpp" + .incbin "graphics/door_anims/frame_8354748_2.4bpp" + .incbin "graphics/door_anims/frame_8354748_3.4bpp" + .space 32 + +gUnknown_83548E8:: @ 83548E8 + .incbin "graphics/door_anims/frame_83548E8_1.4bpp" + .incbin "graphics/door_anims/frame_83548E8_2.4bpp" + .incbin "graphics/door_anims/frame_83548E8_3.4bpp" + .space 32 + +gUnknown_8354A88:: @ 8354A88 + .incbin "graphics/door_anims/frame_8354A88_1.4bpp" + .incbin "graphics/door_anims/frame_8354A88_2.4bpp" + .incbin "graphics/door_anims/frame_8354A88_3.4bpp" + .space 32 + +gUnknown_8354C28:: @ 8354C28 + .incbin "graphics/door_anims/frame_8354C28_1.4bpp" + .incbin "graphics/door_anims/frame_8354C28_2.4bpp" + .incbin "graphics/door_anims/frame_8354C28_3.4bpp" + .space 32 + +gUnknown_8354F48:: @ 8354F48 + .incbin "graphics/door_anims/frame_8354F48_1.4bpp" + .incbin "graphics/door_anims/frame_8354F48_2.4bpp" + .incbin "graphics/door_anims/frame_8354F48_3.4bpp" + .space 32 + +gUnknown_8355268:: @ 8355268 + .incbin "graphics/door_anims/frame_8355268_1.4bpp" + .incbin "graphics/door_anims/frame_8355268_2.4bpp" + .incbin "graphics/door_anims/frame_8355268_3.4bpp" + .space 32 + +gUnknown_8355588:: @ 8355588 + .incbin "graphics/door_anims/frame_8355588_1.4bpp" + .incbin "graphics/door_anims/frame_8355588_2.4bpp" + .incbin "graphics/door_anims/frame_8355588_3.4bpp" + .space 32 + +gUnknown_83558A8:: + .space 0x320 + .space 0x320 + .space 0x320 + .space 0x320 + .space 0x320 + .space 0x320 + .space 0x320 + .space 0x1A0 + .space 0x1A0 + .space 0x1A0 + .space 0x1A0 + .space 0x1A0 + .space 0x1A0 + .space 0x1A0 + .space 0x1A0 + .space 0x1A0 + .space 0x1A0 + .space 0x1A0 + .space 0x1A0 + .space 0x1A0 + .space 0x1A0 + .space 0x1A0 + .space 0x1A0 + .space 0x1A0 + .space 0x1A0 + .space 0x1A0 + .space 0x1A0 + .space 0x1A0 + .space 0x1A0 + .space 0x1A0 + .space 0x1A0 + .incbin "graphics/door_anims/frame_8359588_1.4bpp" + .incbin "graphics/door_anims/frame_8359588_2.4bpp" + .space 0x100 + .incbin "graphics/door_anims/frame_8359788_1.4bpp" + .incbin "graphics/door_anims/frame_8359788_2.4bpp" + .incbin "graphics/door_anims/frame_8359788_3.4bpp" + .incbin "graphics/door_anims/frame_8359788_4.4bpp" + .space 0x100 + .incbin "graphics/door_anims/frame_8359988_1.4bpp" + .incbin "graphics/door_anims/frame_8359988_2.4bpp" + .incbin "graphics/door_anims/frame_8359988_3.4bpp" + .incbin "graphics/door_anims/frame_8359988_4.4bpp" + .space 0x100 + .incbin "graphics/door_anims/frame_8359B88_1.4bpp" + .incbin "graphics/door_anims/frame_8359B88_2.4bpp" + .incbin "graphics/door_anims/frame_8359B88_3.4bpp" + .incbin "graphics/door_anims/frame_8359B88_4.4bpp" + .space 0x20 + +gUnknown_8359CA8:: @ 8359CA8 + .incbin "graphics/door_anims/frame_8359CA8_1.4bpp" + .incbin "graphics/door_anims/frame_8359CA8_2.4bpp" + .incbin "graphics/door_anims/frame_8359CA8_3.4bpp" + .space 32 + +gUnknown_8359FC8:: @ 8359FC8 + .incbin "graphics/door_anims/frame_8359FC8_1.4bpp" + .incbin "graphics/door_anims/frame_8359FC8_2.4bpp" + .incbin "graphics/door_anims/frame_8359FC8_3.4bpp" + .space 32 + +gUnknown_835A168:: @ 835A168 + .incbin "graphics/door_anims/frame_835A168_1.4bpp" + .incbin "graphics/door_anims/frame_835A168_2.4bpp" + .incbin "graphics/door_anims/frame_835A168_3.4bpp" + .space 32 + +gUnknown_835A308:: @ 835A308 + .incbin "graphics/door_anims/frame_835A308_1.4bpp" + .incbin "graphics/door_anims/frame_835A308_2.4bpp" + .incbin "graphics/door_anims/frame_835A308_3.4bpp" + .space 32 + +gUnknown_835A4A8:: @ 835A4A8 + .incbin "graphics/door_anims/frame_835A4A8_1.4bpp" + .incbin "graphics/door_anims/frame_835A4A8_2.4bpp" + .incbin "graphics/door_anims/frame_835A4A8_3.4bpp" + .space 32 + +gUnknown_835A648:: @ 835A648 + .incbin "graphics/door_anims/frame_835A648_1.4bpp" + .incbin "graphics/door_anims/frame_835A648_2.4bpp" + .incbin "graphics/door_anims/frame_835A648_3.4bpp" + .space 32 + +gUnknown_835A7E8:: @ 835A7E8 + .incbin "graphics/door_anims/frame_835A7E8_1.4bpp" + .incbin "graphics/door_anims/frame_835A7E8_2.4bpp" + .incbin "graphics/door_anims/frame_835A7E8_3.4bpp" + .space 32 + +gUnknown_835A988:: @ 835A988 + .incbin "graphics/door_anims/frame_835A988_1.4bpp" + .incbin "graphics/door_anims/frame_835A988_2.4bpp" + .incbin "graphics/door_anims/frame_835A988_3.4bpp" + .space 32 + +gUnknown_835AB28:: @ 835AB28 + .incbin "graphics/door_anims/frame_835AB28_1.4bpp" + .incbin "graphics/door_anims/frame_835AB28_2.4bpp" + .incbin "graphics/door_anims/frame_835AB28_3.4bpp" + .space 32 + +gUnknown_835AE48:: @ 835AE48 + .incbin "graphics/door_anims/frame_835AE48_1.4bpp" + .incbin "graphics/door_anims/frame_835AE48_2.4bpp" + .incbin "graphics/door_anims/frame_835AE48_3.4bpp" + .space 32 + +gUnknown_835B168:: @ 835B168 + .incbin "graphics/door_anims/frame_835B168_1.4bpp" + .incbin "graphics/door_anims/frame_835B168_2.4bpp" + .incbin "graphics/door_anims/frame_835B168_3.4bpp" + .space 32 .align 2 gUnknown_835B488:: @ 835B488 - .incbin "baserom.gba", 0x35B488, 0x14 + .byte 0x04 + .align 1 + .2byte 0xffff + .byte 0x04 + .align 1 + .2byte 0x0000 + .byte 0x04 + .align 1 + .2byte 0x0080 + .byte 0x04 + .align 1 + .2byte 0x0100 + .byte 0x00 + .align 1 + .2byte 0x0000 gUnknown_835B49C:: @ 835B49C - .incbin "baserom.gba", 0x35B49C, 0x14 + .byte 0x04 + .align 1 + .2byte 0xffff + .byte 0x04 + .align 1 + .2byte 0x0000 + .byte 0x04 + .align 1 + .2byte 0x0100 + .byte 0x04 + .align 1 + .2byte 0x0200 + .byte 0x00 + .align 1 + .2byte 0x0000 gUnknown_835B4B0:: @ 835B4B0 - .incbin "baserom.gba", 0x35B4B0, 0x14 + .byte 0x04 + .align 1 + .2byte 0x0100 + .byte 0x04 + .align 1 + .2byte 0x0080 + .byte 0x04 + .align 1 + .2byte 0x0000 + .byte 0x04 + .align 1 + .2byte 0xffff + .byte 0x00 + .align 1 + .2byte 0x0000 gUnknown_835B4C4:: @ 835B4C4 - .incbin "baserom.gba", 0x35B4C4, 0x114 + .byte 0x04 + .align 1 + .2byte 0x0200 + .byte 0x04 + .align 1 + .2byte 0x0100 + .byte 0x04 + .align 1 + .2byte 0x0000 + .byte 0x04 + .align 1 + .2byte 0xffff + .byte 0x00 + .align 1 + .2byte 0x0000 + +gUnknown_835B4D8:: @ 835B4D8 + .byte 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2 + +gUnknown_835B4E0:: @ 835B4E0 + .byte 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3 + +gUnknown_835B4E8:: @ 835B4E8 + .byte 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3 + +gUnknown_835B4F0:: @ 835B4F0 + .byte 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8 + +gUnknown_835B4F8:: @ 835B4F8 + .byte 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa + +gUnknown_835B500:: @ 835B500 + .byte 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8 + +gUnknown_835B508:: @ 835B508 + .byte 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8 + +gUnknown_835B510:: @ 835B510 + .byte 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8 + +gUnknown_835B518:: @ 835B518 + .byte 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3 + +gUnknown_835B520:: @ 835B520 + .byte 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc + +gUnknown_835B528:: @ 835B528 + .byte 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9 + +gUnknown_835B530:: @ 835B530 + .byte 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9 + +gUnknown_835B538:: @ 835B538 + .byte 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9 + +gUnknown_835B540:: @ 835B540 + .byte 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3 + +gUnknown_835B548:: @ 835B548 + .byte 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8 + +gUnknown_835B550:: @ 835B550 + .byte 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9 + +gUnknown_835B558:: @ 835B558 + .byte 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3 + +gUnknown_835B560:: @ 835B560 + .byte 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8 + +gUnknown_835B568:: @ 835B568 + .byte 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8 + +gUnknown_835B570:: @ 835B570 + .byte 0xc, 0xc, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2 + +gUnknown_835B578:: @ 835B578 + .byte 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7 + +gUnknown_835B580:: @ 835B580 + .byte 0x8, 0x8, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2 + +gUnknown_835B588:: @ 835B588 + .byte 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5 + +gUnknown_835B590:: @ 835B590 + .byte 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3 + +gUnknown_835B598:: @ 835B598 + .byte 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3 + +gUnknown_835B5A0:: @ 835B5A0 + .byte 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5 + +gUnknown_835B5A8:: @ 835B5A8 + .byte 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3 + +gUnknown_835B5B0:: @ 835B5B0 + .byte 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa + +gUnknown_835B5B8:: @ 835B5B8 + .byte 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5 + +gUnknown_835B5C0:: @ 835B5C0 + .byte 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8 + +gUnknown_835B5C8:: @ 835B5C8 + .byte 0x8, 0x8, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2 + +gUnknown_835B5D0:: @ 835B5D0 + .byte 0xb, 0xb, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2 gUnknown_835B5D8:: @ 835B5D8 - .incbin "baserom.gba", 0x35B5D8, 0x18C + .2byte 0x003d + .byte 0x00, 0x00 + .4byte gUnknown_8353088 + .4byte gUnknown_835B4D8 + .2byte 0x0062 + .byte 0x01, 0x00 + .4byte gUnknown_8353228 + .4byte gUnknown_835B4E0 + .2byte 0x015b + .byte 0x01, 0x00 + .4byte gUnknown_83533C8 + .4byte gUnknown_835B4E8 + .2byte 0x02a3 + .byte 0x00, 0x00 + .4byte gUnknown_8353568 + .4byte gUnknown_835B4F0 + .2byte 0x02ac + .byte 0x00, 0x00 + .4byte gUnknown_8353708 + .4byte gUnknown_835B4F8 + .2byte 0x0299 + .byte 0x00, 0x00 + .4byte gUnknown_83538A8 + .4byte gUnknown_835B500 + .2byte 0x02ce + .byte 0x00, 0x00 + .4byte gUnknown_8353A48 + .4byte gUnknown_835B508 + .2byte 0x0284 + .byte 0x00, 0x00 + .4byte gUnknown_8353BE8 + .4byte gUnknown_835B510 + .2byte 0x02bc + .byte 0x01, 0x00 + .4byte gUnknown_8353D88 + .4byte gUnknown_835B518 + .2byte 0x0298 + .byte 0x00, 0x00 + .4byte gUnknown_8353F28 + .4byte gUnknown_835B520 + .2byte 0x02a2 + .byte 0x00, 0x00 + .4byte gUnknown_83540C8 + .4byte gUnknown_835B528 + .2byte 0x029e + .byte 0x00, 0x00 + .4byte gUnknown_8354268 + .4byte gUnknown_835B530 + .2byte 0x02e1 + .byte 0x00, 0x00 + .4byte gUnknown_8354408 + .4byte gUnknown_835B538 + .2byte 0x0294 + .byte 0x01, 0x00 + .4byte gUnknown_83545A8 + .4byte gUnknown_835B540 + .2byte 0x02bf + .byte 0x00, 0x00 + .4byte gUnknown_8354748 + .4byte gUnknown_835B548 + .2byte 0x02d2 + .byte 0x01, 0x00 + .4byte gUnknown_83548E8 + .4byte gUnknown_835B550 + .2byte 0x02ad + .byte 0x00, 0x00 + .4byte gUnknown_8354A88 + .4byte gUnknown_835B558 + .2byte 0x0297 + .byte 0x00, 0x00 + .4byte gUnknown_8359FC8 + .4byte gUnknown_835B588 + .2byte 0x029b + .byte 0x01, 0x00 + .4byte gUnknown_835A168 + .4byte gUnknown_835B590 + .2byte 0x02eb + .byte 0x00, 0x00 + .4byte gUnknown_835A308 + .4byte gUnknown_835B598 + .2byte 0x029a + .byte 0x00, 0x00 + .4byte gUnknown_835A4A8 + .4byte gUnknown_835B5A0 + .2byte 0x02b9 + .byte 0x00, 0x00 + .4byte gUnknown_835A648 + .4byte gUnknown_835B5A8 + .2byte 0x02af + .byte 0x00, 0x00 + .4byte gUnknown_835A7E8 + .4byte gUnknown_835B5B0 + .2byte 0x030c + .byte 0x00, 0x00 + .4byte gUnknown_835A988 + .4byte gUnknown_835B5B8 + .2byte 0x028d + .byte 0x01, 0x01 + .4byte gUnknown_8354C28 + .4byte gUnknown_835B560 + .2byte 0x02de + .byte 0x01, 0x01 + .4byte gUnknown_8354F48 + .4byte gUnknown_835B568 + .2byte 0x02ab + .byte 0x01, 0x01 + .4byte gUnknown_8355268 + .4byte gUnknown_835B570 + .2byte 0x0281 + .byte 0x00, 0x01 + .4byte gUnknown_8355588 + .4byte gUnknown_835B578 + .2byte 0x02e2 + .byte 0x01, 0x01 + .4byte gUnknown_8359CA8 + .4byte gUnknown_835B580 + .2byte 0x0296 + .byte 0x01, 0x01 + .4byte gUnknown_835AB28 + .4byte gUnknown_835B5C0 + .2byte 0x02c3 + .byte 0x01, 0x01 + .4byte gUnknown_835AE48 + .4byte gUnknown_835B5C8 + .2byte 0x0356 + .byte 0x01, 0x01 + .4byte gUnknown_835B168 + .4byte gUnknown_835B5D0 + .2byte 0x0000 + .byte 0x00, 0x00 + .4byte 0x00000000 + .4byte 0x00000000 diff --git a/data/metatile_behavior.s b/data/metatile_behavior.s deleted file mode 100644 index 64d88840d..000000000 --- a/data/metatile_behavior.s +++ /dev/null @@ -1,6 +0,0 @@ - .section .rodata - - .align 2 - -gUnknown_8353068:: @ 8353068 - .incbin "baserom.gba", 0x353068, 0x8420 diff --git a/graphics/door_anims/frame_8353088_1.png b/graphics/door_anims/frame_8353088_1.png new file mode 100644 index 000000000..e831eda38 Binary files /dev/null and b/graphics/door_anims/frame_8353088_1.png differ diff --git a/graphics/door_anims/frame_8353088_2.png b/graphics/door_anims/frame_8353088_2.png new file mode 100644 index 000000000..981aaa7fd Binary files /dev/null and b/graphics/door_anims/frame_8353088_2.png differ diff --git a/graphics/door_anims/frame_8353088_3.png b/graphics/door_anims/frame_8353088_3.png new file mode 100644 index 000000000..a4edcdc0b Binary files /dev/null and b/graphics/door_anims/frame_8353088_3.png differ diff --git a/graphics/door_anims/frame_8353228_1.png b/graphics/door_anims/frame_8353228_1.png new file mode 100644 index 000000000..2f7b80495 Binary files /dev/null and b/graphics/door_anims/frame_8353228_1.png differ diff --git a/graphics/door_anims/frame_8353228_2.png b/graphics/door_anims/frame_8353228_2.png new file mode 100644 index 000000000..d603dd800 Binary files /dev/null and b/graphics/door_anims/frame_8353228_2.png differ diff --git a/graphics/door_anims/frame_8353228_3.png b/graphics/door_anims/frame_8353228_3.png new file mode 100644 index 000000000..97a87ea4c Binary files /dev/null and b/graphics/door_anims/frame_8353228_3.png differ diff --git a/graphics/door_anims/frame_83533C8_1.png b/graphics/door_anims/frame_83533C8_1.png new file mode 100644 index 000000000..4ce6b79ed Binary files /dev/null and b/graphics/door_anims/frame_83533C8_1.png differ diff --git a/graphics/door_anims/frame_83533C8_2.png b/graphics/door_anims/frame_83533C8_2.png new file mode 100644 index 000000000..8f668959e Binary files /dev/null and b/graphics/door_anims/frame_83533C8_2.png differ diff --git a/graphics/door_anims/frame_83533C8_3.png b/graphics/door_anims/frame_83533C8_3.png new file mode 100644 index 000000000..97a87ea4c Binary files /dev/null and b/graphics/door_anims/frame_83533C8_3.png differ diff --git a/graphics/door_anims/frame_8353568_1.png b/graphics/door_anims/frame_8353568_1.png new file mode 100644 index 000000000..5fde23141 Binary files /dev/null and b/graphics/door_anims/frame_8353568_1.png differ diff --git a/graphics/door_anims/frame_8353568_2.png b/graphics/door_anims/frame_8353568_2.png new file mode 100644 index 000000000..93b6e18f5 Binary files /dev/null and b/graphics/door_anims/frame_8353568_2.png differ diff --git a/graphics/door_anims/frame_8353568_3.png b/graphics/door_anims/frame_8353568_3.png new file mode 100644 index 000000000..a4edcdc0b Binary files /dev/null and b/graphics/door_anims/frame_8353568_3.png differ diff --git a/graphics/door_anims/frame_8353708_1.png b/graphics/door_anims/frame_8353708_1.png new file mode 100644 index 000000000..e56c2f31e Binary files /dev/null and b/graphics/door_anims/frame_8353708_1.png differ diff --git a/graphics/door_anims/frame_8353708_2.png b/graphics/door_anims/frame_8353708_2.png new file mode 100644 index 000000000..e1f7d5272 Binary files /dev/null and b/graphics/door_anims/frame_8353708_2.png differ diff --git a/graphics/door_anims/frame_8353708_3.png b/graphics/door_anims/frame_8353708_3.png new file mode 100644 index 000000000..a4edcdc0b Binary files /dev/null and b/graphics/door_anims/frame_8353708_3.png differ diff --git a/graphics/door_anims/frame_83538A8_1.png b/graphics/door_anims/frame_83538A8_1.png new file mode 100644 index 000000000..117acac1d Binary files /dev/null and b/graphics/door_anims/frame_83538A8_1.png differ diff --git a/graphics/door_anims/frame_83538A8_2.png b/graphics/door_anims/frame_83538A8_2.png new file mode 100644 index 000000000..58aa0d456 Binary files /dev/null and b/graphics/door_anims/frame_83538A8_2.png differ diff --git a/graphics/door_anims/frame_83538A8_3.png b/graphics/door_anims/frame_83538A8_3.png new file mode 100644 index 000000000..a9f2c98f5 Binary files /dev/null and b/graphics/door_anims/frame_83538A8_3.png differ diff --git a/graphics/door_anims/frame_8353A48_1.png b/graphics/door_anims/frame_8353A48_1.png new file mode 100644 index 000000000..5ea623f10 Binary files /dev/null and b/graphics/door_anims/frame_8353A48_1.png differ diff --git a/graphics/door_anims/frame_8353A48_2.png b/graphics/door_anims/frame_8353A48_2.png new file mode 100644 index 000000000..dba5c1935 Binary files /dev/null and b/graphics/door_anims/frame_8353A48_2.png differ diff --git a/graphics/door_anims/frame_8353A48_3.png b/graphics/door_anims/frame_8353A48_3.png new file mode 100644 index 000000000..a4edcdc0b Binary files /dev/null and b/graphics/door_anims/frame_8353A48_3.png differ diff --git a/graphics/door_anims/frame_8353BE8_1.png b/graphics/door_anims/frame_8353BE8_1.png new file mode 100644 index 000000000..3b8a60396 Binary files /dev/null and b/graphics/door_anims/frame_8353BE8_1.png differ diff --git a/graphics/door_anims/frame_8353BE8_2.png b/graphics/door_anims/frame_8353BE8_2.png new file mode 100644 index 000000000..ac557a4ea Binary files /dev/null and b/graphics/door_anims/frame_8353BE8_2.png differ diff --git a/graphics/door_anims/frame_8353BE8_3.png b/graphics/door_anims/frame_8353BE8_3.png new file mode 100644 index 000000000..de5e8c356 Binary files /dev/null and b/graphics/door_anims/frame_8353BE8_3.png differ diff --git a/graphics/door_anims/frame_8353D88_1.png b/graphics/door_anims/frame_8353D88_1.png new file mode 100644 index 000000000..37d7e78da Binary files /dev/null and b/graphics/door_anims/frame_8353D88_1.png differ diff --git a/graphics/door_anims/frame_8353D88_2.png b/graphics/door_anims/frame_8353D88_2.png new file mode 100644 index 000000000..405f027b0 Binary files /dev/null and b/graphics/door_anims/frame_8353D88_2.png differ diff --git a/graphics/door_anims/frame_8353D88_3.png b/graphics/door_anims/frame_8353D88_3.png new file mode 100644 index 000000000..052c55606 Binary files /dev/null and b/graphics/door_anims/frame_8353D88_3.png differ diff --git a/graphics/door_anims/frame_8353F28_1.png b/graphics/door_anims/frame_8353F28_1.png new file mode 100644 index 000000000..379003d13 Binary files /dev/null and b/graphics/door_anims/frame_8353F28_1.png differ diff --git a/graphics/door_anims/frame_8353F28_2.png b/graphics/door_anims/frame_8353F28_2.png new file mode 100644 index 000000000..2337f80df Binary files /dev/null and b/graphics/door_anims/frame_8353F28_2.png differ diff --git a/graphics/door_anims/frame_8353F28_3.png b/graphics/door_anims/frame_8353F28_3.png new file mode 100644 index 000000000..97a87ea4c Binary files /dev/null and b/graphics/door_anims/frame_8353F28_3.png differ diff --git a/graphics/door_anims/frame_83540C8_1.png b/graphics/door_anims/frame_83540C8_1.png new file mode 100644 index 000000000..5c582fbf0 Binary files /dev/null and b/graphics/door_anims/frame_83540C8_1.png differ diff --git a/graphics/door_anims/frame_83540C8_2.png b/graphics/door_anims/frame_83540C8_2.png new file mode 100644 index 000000000..b23db61c5 Binary files /dev/null and b/graphics/door_anims/frame_83540C8_2.png differ diff --git a/graphics/door_anims/frame_83540C8_3.png b/graphics/door_anims/frame_83540C8_3.png new file mode 100644 index 000000000..8870077b3 Binary files /dev/null and b/graphics/door_anims/frame_83540C8_3.png differ diff --git a/graphics/door_anims/frame_8354268_1.png b/graphics/door_anims/frame_8354268_1.png new file mode 100644 index 000000000..5a09abac0 Binary files /dev/null and b/graphics/door_anims/frame_8354268_1.png differ diff --git a/graphics/door_anims/frame_8354268_2.png b/graphics/door_anims/frame_8354268_2.png new file mode 100644 index 000000000..e46d8b0af Binary files /dev/null and b/graphics/door_anims/frame_8354268_2.png differ diff --git a/graphics/door_anims/frame_8354268_3.png b/graphics/door_anims/frame_8354268_3.png new file mode 100644 index 000000000..97a87ea4c Binary files /dev/null and b/graphics/door_anims/frame_8354268_3.png differ diff --git a/graphics/door_anims/frame_8354408_1.png b/graphics/door_anims/frame_8354408_1.png new file mode 100644 index 000000000..680c715fb Binary files /dev/null and b/graphics/door_anims/frame_8354408_1.png differ diff --git a/graphics/door_anims/frame_8354408_2.png b/graphics/door_anims/frame_8354408_2.png new file mode 100644 index 000000000..a6014c89f Binary files /dev/null and b/graphics/door_anims/frame_8354408_2.png differ diff --git a/graphics/door_anims/frame_8354408_3.png b/graphics/door_anims/frame_8354408_3.png new file mode 100644 index 000000000..c3a852e27 Binary files /dev/null and b/graphics/door_anims/frame_8354408_3.png differ diff --git a/graphics/door_anims/frame_83545A8_1.png b/graphics/door_anims/frame_83545A8_1.png new file mode 100644 index 000000000..46de34aaf Binary files /dev/null and b/graphics/door_anims/frame_83545A8_1.png differ diff --git a/graphics/door_anims/frame_83545A8_2.png b/graphics/door_anims/frame_83545A8_2.png new file mode 100644 index 000000000..1ca78103b Binary files /dev/null and b/graphics/door_anims/frame_83545A8_2.png differ diff --git a/graphics/door_anims/frame_83545A8_3.png b/graphics/door_anims/frame_83545A8_3.png new file mode 100644 index 000000000..f2de21913 Binary files /dev/null and b/graphics/door_anims/frame_83545A8_3.png differ diff --git a/graphics/door_anims/frame_8354748_1.png b/graphics/door_anims/frame_8354748_1.png new file mode 100644 index 000000000..fb3d4bbcd Binary files /dev/null and b/graphics/door_anims/frame_8354748_1.png differ diff --git a/graphics/door_anims/frame_8354748_2.png b/graphics/door_anims/frame_8354748_2.png new file mode 100644 index 000000000..f6b3644b8 Binary files /dev/null and b/graphics/door_anims/frame_8354748_2.png differ diff --git a/graphics/door_anims/frame_8354748_3.png b/graphics/door_anims/frame_8354748_3.png new file mode 100644 index 000000000..eec2567a1 Binary files /dev/null and b/graphics/door_anims/frame_8354748_3.png differ diff --git a/graphics/door_anims/frame_83548E8_1.png b/graphics/door_anims/frame_83548E8_1.png new file mode 100644 index 000000000..22566a901 Binary files /dev/null and b/graphics/door_anims/frame_83548E8_1.png differ diff --git a/graphics/door_anims/frame_83548E8_2.png b/graphics/door_anims/frame_83548E8_2.png new file mode 100644 index 000000000..35f772671 Binary files /dev/null and b/graphics/door_anims/frame_83548E8_2.png differ diff --git a/graphics/door_anims/frame_83548E8_3.png b/graphics/door_anims/frame_83548E8_3.png new file mode 100644 index 000000000..226fe6bb0 Binary files /dev/null and b/graphics/door_anims/frame_83548E8_3.png differ diff --git a/graphics/door_anims/frame_8354A88_1.png b/graphics/door_anims/frame_8354A88_1.png new file mode 100644 index 000000000..157c348a8 Binary files /dev/null and b/graphics/door_anims/frame_8354A88_1.png differ diff --git a/graphics/door_anims/frame_8354A88_2.png b/graphics/door_anims/frame_8354A88_2.png new file mode 100644 index 000000000..72e919a2d Binary files /dev/null and b/graphics/door_anims/frame_8354A88_2.png differ diff --git a/graphics/door_anims/frame_8354A88_3.png b/graphics/door_anims/frame_8354A88_3.png new file mode 100644 index 000000000..e5c635d9c Binary files /dev/null and b/graphics/door_anims/frame_8354A88_3.png differ diff --git a/graphics/door_anims/frame_8354C28_1.png b/graphics/door_anims/frame_8354C28_1.png new file mode 100644 index 000000000..cd6285a64 Binary files /dev/null and b/graphics/door_anims/frame_8354C28_1.png differ diff --git a/graphics/door_anims/frame_8354C28_2.png b/graphics/door_anims/frame_8354C28_2.png new file mode 100644 index 000000000..11a1c36e0 Binary files /dev/null and b/graphics/door_anims/frame_8354C28_2.png differ diff --git a/graphics/door_anims/frame_8354C28_3.png b/graphics/door_anims/frame_8354C28_3.png new file mode 100644 index 000000000..c0d626d06 Binary files /dev/null and b/graphics/door_anims/frame_8354C28_3.png differ diff --git a/graphics/door_anims/frame_8354F48_1.png b/graphics/door_anims/frame_8354F48_1.png new file mode 100644 index 000000000..a1e6eace1 Binary files /dev/null and b/graphics/door_anims/frame_8354F48_1.png differ diff --git a/graphics/door_anims/frame_8354F48_2.png b/graphics/door_anims/frame_8354F48_2.png new file mode 100644 index 000000000..dd1e0e15c Binary files /dev/null and b/graphics/door_anims/frame_8354F48_2.png differ diff --git a/graphics/door_anims/frame_8354F48_3.png b/graphics/door_anims/frame_8354F48_3.png new file mode 100644 index 000000000..cf7978637 Binary files /dev/null and b/graphics/door_anims/frame_8354F48_3.png differ diff --git a/graphics/door_anims/frame_8355268_1.png b/graphics/door_anims/frame_8355268_1.png new file mode 100644 index 000000000..d752d94ef Binary files /dev/null and b/graphics/door_anims/frame_8355268_1.png differ diff --git a/graphics/door_anims/frame_8355268_2.png b/graphics/door_anims/frame_8355268_2.png new file mode 100644 index 000000000..237c46cb9 Binary files /dev/null and b/graphics/door_anims/frame_8355268_2.png differ diff --git a/graphics/door_anims/frame_8355268_3.png b/graphics/door_anims/frame_8355268_3.png new file mode 100644 index 000000000..19a595cd0 Binary files /dev/null and b/graphics/door_anims/frame_8355268_3.png differ diff --git a/graphics/door_anims/frame_8355588_1.png b/graphics/door_anims/frame_8355588_1.png new file mode 100644 index 000000000..b8ee1eb42 Binary files /dev/null and b/graphics/door_anims/frame_8355588_1.png differ diff --git a/graphics/door_anims/frame_8355588_2.png b/graphics/door_anims/frame_8355588_2.png new file mode 100644 index 000000000..fff93e91a Binary files /dev/null and b/graphics/door_anims/frame_8355588_2.png differ diff --git a/graphics/door_anims/frame_8355588_3.png b/graphics/door_anims/frame_8355588_3.png new file mode 100644 index 000000000..0c1b9c03c Binary files /dev/null and b/graphics/door_anims/frame_8355588_3.png differ diff --git a/graphics/door_anims/frame_8359588_1.png b/graphics/door_anims/frame_8359588_1.png new file mode 100644 index 000000000..53732f512 Binary files /dev/null and b/graphics/door_anims/frame_8359588_1.png differ diff --git a/graphics/door_anims/frame_8359588_2.png b/graphics/door_anims/frame_8359588_2.png new file mode 100644 index 000000000..53732f512 Binary files /dev/null and b/graphics/door_anims/frame_8359588_2.png differ diff --git a/graphics/door_anims/frame_8359788_1.png b/graphics/door_anims/frame_8359788_1.png new file mode 100644 index 000000000..8f1168aea Binary files /dev/null and b/graphics/door_anims/frame_8359788_1.png differ diff --git a/graphics/door_anims/frame_8359788_2.png b/graphics/door_anims/frame_8359788_2.png new file mode 100644 index 000000000..041e6293f Binary files /dev/null and b/graphics/door_anims/frame_8359788_2.png differ diff --git a/graphics/door_anims/frame_8359788_3.png b/graphics/door_anims/frame_8359788_3.png new file mode 100644 index 000000000..f103be5a1 Binary files /dev/null and b/graphics/door_anims/frame_8359788_3.png differ diff --git a/graphics/door_anims/frame_8359788_4.png b/graphics/door_anims/frame_8359788_4.png new file mode 100644 index 000000000..36f6cf135 Binary files /dev/null and b/graphics/door_anims/frame_8359788_4.png differ diff --git a/graphics/door_anims/frame_8359988_1.png b/graphics/door_anims/frame_8359988_1.png new file mode 100644 index 000000000..75a43b9fb Binary files /dev/null and b/graphics/door_anims/frame_8359988_1.png differ diff --git a/graphics/door_anims/frame_8359988_2.png b/graphics/door_anims/frame_8359988_2.png new file mode 100644 index 000000000..a1f6f806c Binary files /dev/null and b/graphics/door_anims/frame_8359988_2.png differ diff --git a/graphics/door_anims/frame_8359988_3.png b/graphics/door_anims/frame_8359988_3.png new file mode 100644 index 000000000..d7abc49ba Binary files /dev/null and b/graphics/door_anims/frame_8359988_3.png differ diff --git a/graphics/door_anims/frame_8359988_4.png b/graphics/door_anims/frame_8359988_4.png new file mode 100644 index 000000000..1af99db23 Binary files /dev/null and b/graphics/door_anims/frame_8359988_4.png differ diff --git a/graphics/door_anims/frame_8359B88_1.png b/graphics/door_anims/frame_8359B88_1.png new file mode 100644 index 000000000..a5208db18 Binary files /dev/null and b/graphics/door_anims/frame_8359B88_1.png differ diff --git a/graphics/door_anims/frame_8359B88_2.png b/graphics/door_anims/frame_8359B88_2.png new file mode 100644 index 000000000..e3ecef0fe Binary files /dev/null and b/graphics/door_anims/frame_8359B88_2.png differ diff --git a/graphics/door_anims/frame_8359B88_3.png b/graphics/door_anims/frame_8359B88_3.png new file mode 100644 index 000000000..d4be7a81f Binary files /dev/null and b/graphics/door_anims/frame_8359B88_3.png differ diff --git a/graphics/door_anims/frame_8359B88_4.png b/graphics/door_anims/frame_8359B88_4.png new file mode 100644 index 000000000..4ba80f998 Binary files /dev/null and b/graphics/door_anims/frame_8359B88_4.png differ diff --git a/graphics/door_anims/frame_8359CA8_1.png b/graphics/door_anims/frame_8359CA8_1.png new file mode 100644 index 000000000..c0913878b Binary files /dev/null and b/graphics/door_anims/frame_8359CA8_1.png differ diff --git a/graphics/door_anims/frame_8359CA8_2.png b/graphics/door_anims/frame_8359CA8_2.png new file mode 100644 index 000000000..800bb92c4 Binary files /dev/null and b/graphics/door_anims/frame_8359CA8_2.png differ diff --git a/graphics/door_anims/frame_8359CA8_3.png b/graphics/door_anims/frame_8359CA8_3.png new file mode 100644 index 000000000..e2f16ef25 Binary files /dev/null and b/graphics/door_anims/frame_8359CA8_3.png differ diff --git a/graphics/door_anims/frame_8359FC8_1.png b/graphics/door_anims/frame_8359FC8_1.png new file mode 100644 index 000000000..9428b111a Binary files /dev/null and b/graphics/door_anims/frame_8359FC8_1.png differ diff --git a/graphics/door_anims/frame_8359FC8_2.png b/graphics/door_anims/frame_8359FC8_2.png new file mode 100644 index 000000000..484eefd83 Binary files /dev/null and b/graphics/door_anims/frame_8359FC8_2.png differ diff --git a/graphics/door_anims/frame_8359FC8_3.png b/graphics/door_anims/frame_8359FC8_3.png new file mode 100644 index 000000000..467c04f7f Binary files /dev/null and b/graphics/door_anims/frame_8359FC8_3.png differ diff --git a/graphics/door_anims/frame_835A168_1.png b/graphics/door_anims/frame_835A168_1.png new file mode 100644 index 000000000..f23474512 Binary files /dev/null and b/graphics/door_anims/frame_835A168_1.png differ diff --git a/graphics/door_anims/frame_835A168_2.png b/graphics/door_anims/frame_835A168_2.png new file mode 100644 index 000000000..adcb7ce12 Binary files /dev/null and b/graphics/door_anims/frame_835A168_2.png differ diff --git a/graphics/door_anims/frame_835A168_3.png b/graphics/door_anims/frame_835A168_3.png new file mode 100644 index 000000000..e87798cd2 Binary files /dev/null and b/graphics/door_anims/frame_835A168_3.png differ diff --git a/graphics/door_anims/frame_835A308_1.png b/graphics/door_anims/frame_835A308_1.png new file mode 100644 index 000000000..c11c06156 Binary files /dev/null and b/graphics/door_anims/frame_835A308_1.png differ diff --git a/graphics/door_anims/frame_835A308_2.png b/graphics/door_anims/frame_835A308_2.png new file mode 100644 index 000000000..3d825f587 Binary files /dev/null and b/graphics/door_anims/frame_835A308_2.png differ diff --git a/graphics/door_anims/frame_835A308_3.png b/graphics/door_anims/frame_835A308_3.png new file mode 100644 index 000000000..e87798cd2 Binary files /dev/null and b/graphics/door_anims/frame_835A308_3.png differ diff --git a/graphics/door_anims/frame_835A4A8_1.png b/graphics/door_anims/frame_835A4A8_1.png new file mode 100644 index 000000000..9428b111a Binary files /dev/null and b/graphics/door_anims/frame_835A4A8_1.png differ diff --git a/graphics/door_anims/frame_835A4A8_2.png b/graphics/door_anims/frame_835A4A8_2.png new file mode 100644 index 000000000..484eefd83 Binary files /dev/null and b/graphics/door_anims/frame_835A4A8_2.png differ diff --git a/graphics/door_anims/frame_835A4A8_3.png b/graphics/door_anims/frame_835A4A8_3.png new file mode 100644 index 000000000..467c04f7f Binary files /dev/null and b/graphics/door_anims/frame_835A4A8_3.png differ diff --git a/graphics/door_anims/frame_835A648_1.png b/graphics/door_anims/frame_835A648_1.png new file mode 100644 index 000000000..7cac61ead Binary files /dev/null and b/graphics/door_anims/frame_835A648_1.png differ diff --git a/graphics/door_anims/frame_835A648_2.png b/graphics/door_anims/frame_835A648_2.png new file mode 100644 index 000000000..618b958b9 Binary files /dev/null and b/graphics/door_anims/frame_835A648_2.png differ diff --git a/graphics/door_anims/frame_835A648_3.png b/graphics/door_anims/frame_835A648_3.png new file mode 100644 index 000000000..28942389b Binary files /dev/null and b/graphics/door_anims/frame_835A648_3.png differ diff --git a/graphics/door_anims/frame_835A7E8_1.png b/graphics/door_anims/frame_835A7E8_1.png new file mode 100644 index 000000000..2b51bba5f Binary files /dev/null and b/graphics/door_anims/frame_835A7E8_1.png differ diff --git a/graphics/door_anims/frame_835A7E8_2.png b/graphics/door_anims/frame_835A7E8_2.png new file mode 100644 index 000000000..b29303c1b Binary files /dev/null and b/graphics/door_anims/frame_835A7E8_2.png differ diff --git a/graphics/door_anims/frame_835A7E8_3.png b/graphics/door_anims/frame_835A7E8_3.png new file mode 100644 index 000000000..55e1b2db9 Binary files /dev/null and b/graphics/door_anims/frame_835A7E8_3.png differ diff --git a/graphics/door_anims/frame_835A988_1.png b/graphics/door_anims/frame_835A988_1.png new file mode 100644 index 000000000..9428b111a Binary files /dev/null and b/graphics/door_anims/frame_835A988_1.png differ diff --git a/graphics/door_anims/frame_835A988_2.png b/graphics/door_anims/frame_835A988_2.png new file mode 100644 index 000000000..484eefd83 Binary files /dev/null and b/graphics/door_anims/frame_835A988_2.png differ diff --git a/graphics/door_anims/frame_835A988_3.png b/graphics/door_anims/frame_835A988_3.png new file mode 100644 index 000000000..467c04f7f Binary files /dev/null and b/graphics/door_anims/frame_835A988_3.png differ diff --git a/graphics/door_anims/frame_835AB28_1.png b/graphics/door_anims/frame_835AB28_1.png new file mode 100644 index 000000000..73f90730c Binary files /dev/null and b/graphics/door_anims/frame_835AB28_1.png differ diff --git a/graphics/door_anims/frame_835AB28_2.png b/graphics/door_anims/frame_835AB28_2.png new file mode 100644 index 000000000..6d8d9c305 Binary files /dev/null and b/graphics/door_anims/frame_835AB28_2.png differ diff --git a/graphics/door_anims/frame_835AB28_3.png b/graphics/door_anims/frame_835AB28_3.png new file mode 100644 index 000000000..b3d9eada1 Binary files /dev/null and b/graphics/door_anims/frame_835AB28_3.png differ diff --git a/graphics/door_anims/frame_835AE48_1.png b/graphics/door_anims/frame_835AE48_1.png new file mode 100644 index 000000000..6d9956306 Binary files /dev/null and b/graphics/door_anims/frame_835AE48_1.png differ diff --git a/graphics/door_anims/frame_835AE48_2.png b/graphics/door_anims/frame_835AE48_2.png new file mode 100644 index 000000000..62b93f79e Binary files /dev/null and b/graphics/door_anims/frame_835AE48_2.png differ diff --git a/graphics/door_anims/frame_835AE48_3.png b/graphics/door_anims/frame_835AE48_3.png new file mode 100644 index 000000000..a98073235 Binary files /dev/null and b/graphics/door_anims/frame_835AE48_3.png differ diff --git a/graphics/door_anims/frame_835B168_1.png b/graphics/door_anims/frame_835B168_1.png new file mode 100644 index 000000000..7c75282d6 Binary files /dev/null and b/graphics/door_anims/frame_835B168_1.png differ diff --git a/graphics/door_anims/frame_835B168_2.png b/graphics/door_anims/frame_835B168_2.png new file mode 100644 index 000000000..283aceba5 Binary files /dev/null and b/graphics/door_anims/frame_835B168_2.png differ diff --git a/graphics/door_anims/frame_835B168_3.png b/graphics/door_anims/frame_835B168_3.png new file mode 100644 index 000000000..457a26c29 Binary files /dev/null and b/graphics/door_anims/frame_835B168_3.png differ diff --git a/include/field_camera.h b/include/field_camera.h index d2165780a..2ba583a52 100644 --- a/include/field_camera.h +++ b/include/field_camera.h @@ -30,5 +30,6 @@ void sub_805A658(s16 *x, s16 *y); void SetCameraPanningCallback(void (*cb)(void)); void SetCameraPanning(s16 x, s16 y); void InstallCameraPanAheadCallback(void); +void sub_805A91C(int x, int y, const u16 *data); #endif //GUARD_FIELD_CAMERA_H diff --git a/include/metatile_behavior.h b/include/metatile_behavior.h index df03001bf..d567ab77c 100644 --- a/include/metatile_behavior.h +++ b/include/metatile_behavior.h @@ -151,6 +151,5 @@ bool8 MetatileBehavior_IsImpressiveMachine(u8 metatileBehavior); bool8 MetatileBehavior_IsVideoGame(u8 metatileBehavior); bool8 MetatileBehavior_IsBurglary(u8 metatileBehavior); bool8 MetatileBehavior_IsMBA3(u8 metatileBehavior); -extern u8 gUnknown_8353068[]; #endif // GUARD_METATILE_BEHAVIOR diff --git a/ld_script.txt b/ld_script.txt index 856155aa8..fe60a90e3 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -93,6 +93,7 @@ SECTIONS { src/fieldmap.o(.text); src/metatile_behavior.o(.text); asm/field_camera.o(.text); + src/field_door.o(.text); asm/field_door.o(.text); asm/field_player_avatar.o(.text); asm/field_map_obj.o(.text); @@ -408,7 +409,7 @@ SECTIONS { data/maps.o(.rodata); src/fieldmap.o(.rodata); src/metatile_behavior.o(.rodata); - data/metatile_behavior.o(.rodata); + src/field_door.o(.rodata); data/field_door.o(.rodata); data/field_player_avatar.o(.rodata); data/field_map_obj.o(.rodata); diff --git a/src/field_door.c b/src/field_door.c new file mode 100644 index 000000000..116cdddee --- /dev/null +++ b/src/field_door.c @@ -0,0 +1,102 @@ +#include "global.h" +#include "field_camera.h" +#include "task.h" + +struct DoorAnimFrame +{ + u8 unk_0; + u16 unk_2; +}; + +struct DoorGraphics +{ + u16 unk_0; + u8 unk_2; + u8 unk_3; + const u8 * unk_4; + const u8 * unk_8; +}; + +void sub_805AF54(const struct DoorGraphics * a0, int a1, int a2); +void sub_805AF80(const u8 *a0); +void sub_805AF94(const struct DoorGraphics * a0, int a1, int a2, const u8 *a3); +void sub_805AFE8(u16 *a0, u16 a1, const u8 *a2); +bool32 sub_805B060(const struct DoorGraphics * gfx, const struct DoorAnimFrame * frames, u16 *data); + +extern const struct DoorAnimFrame gUnknown_835B488[]; +extern const struct DoorAnimFrame gUnknown_835B49C[]; +extern const struct DoorAnimFrame gUnknown_835B4B0[]; +extern const struct DoorAnimFrame gUnknown_835B4C4[]; +extern const struct DoorGraphics gUnknown_835B5D8[]; + +void sub_805AF14(const struct DoorGraphics * a0, const struct DoorAnimFrame * a1, int a2, int a3) +{ + if (a1->unk_2 == 0xFFFF) + { + sub_805AF54(a0, a2, a3); + } + else + { + sub_805AF80(&a0->unk_4[a1->unk_2]); + sub_805AF94(a0, a2, a3, a0->unk_8); + } +} + +void sub_805AF54(const struct DoorGraphics * a0, int a1, int a2) +{ + if (a0->unk_3 == 0) + { + CurrentMapDrawMetatileAt(a1, a2); + } + else + { + CurrentMapDrawMetatileAt(a1, a2); + CurrentMapDrawMetatileAt(a1, a2 - 1); + } +} + +void sub_805AF80(const u8 *a0) +{ + CpuFastCopy(a0, (void *)(BG_VRAM + 0x7F00), 0x100); +} + +void sub_805AF94(const struct DoorGraphics * a0, int a1, int a2, const u8 *a3) +{ + u16 sp00[8]; + if (a0->unk_3 == 0) + { + sub_805AFE8(sp00, 0x3F8, a3); + } + else + { + sub_805AFE8(sp00, 0x3F8, a3); + sub_805A91C(a1, a2 - 1, sp00); + sub_805AFE8(sp00, 0x3FC, a3 + 4); + } + sub_805A91C(a1, a2, sp00); +} + +void sub_805AFE8(u16 *a0, u16 a1, const u8 *a2) +{ + int i; + u16 tile; + for (i = 0; i < 4; i++) + { + tile = *(a2++) << 12; + a0[i] = tile | (a1 + i); + } + for (; i < 8; i++) + { + tile = *(a2++) << 12; + a0[i] = tile; + } +} + +void sub_805B028(u8 taskId) +{ + u16 *data = (void *)gTasks[taskId].data; + const struct DoorAnimFrame * frames = (const void *)((data[0] << 16) | data[1]); + const struct DoorGraphics * gfx = (const void *)((data[2] << 16) | data[3]); + if (!sub_805B060(gfx, frames, data)) + DestroyTask(taskId); +} diff --git a/src/metatile_behavior.c b/src/metatile_behavior.c index bca99d38f..8e07c1c97 100644 --- a/src/metatile_behavior.c +++ b/src/metatile_behavior.c @@ -16,6 +16,41 @@ static const bool8 sTileSurfable[METATILE_COUNT] = { [MB_SOUTHWARD_CURRENT] = TRUE }; +static const u8 sTileBitAttributes[] = { + 0x00, + 0x01, + 0x02, + 0x04, + 0x08, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00 +}; + bool8 MetatileBehavior_UnusedReturnTrue(u8 metatileBehavior) { return TRUE; @@ -736,7 +771,7 @@ bool8 MetatileBehavior_UnusedReturnFalse_13(u8 metatileBehavior) { return FALSE; bool8 sub_805A2BC(u8 arg1, u8 arg2) { - if(gUnknown_8353068[arg1] & arg2) + if(sTileBitAttributes[arg1] & arg2) return TRUE; else return FALSE; -- cgit v1.2.3 From 4c61bead05968e0404ea074bed4da5edb2645b90 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 12 Nov 2019 13:53:47 -0500 Subject: Document field_door code --- asm/field_camera.s | 6 +- asm/field_door.s | 484 ------------------------------------------------- data/field_door.s | 10 +- include/field_camera.h | 2 +- include/field_door.h | 10 +- ld_script.txt | 1 - src/field_door.c | 225 ++++++++++++++++++----- 7 files changed, 198 insertions(+), 540 deletions(-) delete mode 100644 asm/field_door.s diff --git a/asm/field_camera.s b/asm/field_camera.s index f6cbbd0ef..0016e6381 100644 --- a/asm/field_camera.s +++ b/asm/field_camera.s @@ -490,8 +490,8 @@ _0805A914: .4byte gUnknown_3000E90 _0805A918: .4byte gMapHeader thumb_func_end CurrentMapDrawMetatileAt - thumb_func_start sub_805A91C -sub_805A91C: @ 805A91C + thumb_func_start DrawDoorMetatileAt +DrawDoorMetatileAt: @ 805A91C push {r4,r5,lr} adds r3, r0, 0 adds r4, r1, 0 @@ -513,7 +513,7 @@ _0805A93E: bx r0 .align 2, 0 _0805A944: .4byte gUnknown_3000E90 - thumb_func_end sub_805A91C + thumb_func_end DrawDoorMetatileAt thumb_func_start sub_805A948 sub_805A948: @ 805A948 diff --git a/asm/field_door.s b/asm/field_door.s deleted file mode 100644 index b4541ffaf..000000000 --- a/asm/field_door.s +++ /dev/null @@ -1,484 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - thumb_func_start sub_805B060 -sub_805B060: @ 805B060 - push {r4-r6,lr} - adds r6, r0, 0 - adds r5, r1, 0 - adds r4, r2, 0 - movs r1, 0xA - ldrsh r0, [r4, r1] - cmp r0, 0 - bne _0805B086 - movs r2, 0x8 - ldrsh r1, [r4, r2] - lsls r1, 2 - adds r1, r5, r1 - movs r0, 0xC - ldrsh r2, [r4, r0] - movs r0, 0xE - ldrsh r3, [r4, r0] - adds r0, r6, 0 - bl sub_805AF14 -_0805B086: - movs r2, 0xA - ldrsh r1, [r4, r2] - movs r2, 0x8 - ldrsh r0, [r4, r2] - lsls r0, 2 - adds r0, r5 - ldrb r0, [r0] - cmp r1, r0 - bne _0805B0B4 - movs r0, 0 - strh r0, [r4, 0xA] - ldrh r0, [r4, 0x8] - adds r0, 0x1 - strh r0, [r4, 0x8] - movs r1, 0x8 - ldrsh r0, [r4, r1] - lsls r0, 2 - adds r0, r5 - ldrb r0, [r0] - cmp r0, 0 - bne _0805B0BA - movs r0, 0 - b _0805B0BC -_0805B0B4: - ldrh r0, [r4, 0xA] - adds r0, 0x1 - strh r0, [r4, 0xA] -_0805B0BA: - movs r0, 0x1 -_0805B0BC: - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_805B060 - - thumb_func_start door_find -door_find: @ 805B0C4 - push {lr} - adds r2, r0, 0 - lsls r1, 16 - lsrs r1, 16 - b _0805B0DA -_0805B0CE: - ldrh r0, [r2] - cmp r0, r1 - bne _0805B0D8 - adds r0, r2, 0 - b _0805B0E2 -_0805B0D8: - adds r2, 0xC -_0805B0DA: - ldr r0, [r2, 0x4] - cmp r0, 0 - bne _0805B0CE - movs r0, 0 -_0805B0E2: - pop {r1} - bx r1 - thumb_func_end door_find - - thumb_func_start task_overworld_door_add_if_inactive -task_overworld_door_add_if_inactive: @ 805B0E8 - push {r4-r7,lr} - mov r7, r8 - push {r7} - adds r6, r0, 0 - adds r5, r1, 0 - adds r7, r2, 0 - mov r8, r3 - ldr r4, _0805B134 @ =sub_805B028 - adds r0, r4, 0 - bl FuncIsActiveTask - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - beq _0805B13C - adds r0, r4, 0 - movs r1, 0x50 - bl CreateTask - lsls r0, 24 - lsrs r0, 24 - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - ldr r2, _0805B138 @ =gTasks+0x8 - adds r1, r2 - strh r7, [r1, 0xC] - mov r2, r8 - strh r2, [r1, 0xE] - strh r5, [r1, 0x2] - lsrs r2, r5, 16 - strh r2, [r1] - strh r6, [r1, 0x6] - lsrs r2, r6, 16 - strh r2, [r1, 0x4] - lsls r0, 24 - asrs r0, 24 - b _0805B140 - .align 2, 0 -_0805B134: .4byte sub_805B028 -_0805B138: .4byte gTasks+0x8 -_0805B13C: - movs r0, 0x1 - negs r0, r0 -_0805B140: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end task_overworld_door_add_if_inactive - - thumb_func_start DrawClosedDoor -DrawClosedDoor: @ 805B14C - push {lr} - bl sub_805AF54 - pop {r0} - bx r0 - thumb_func_end DrawClosedDoor - - thumb_func_start sub_805B158 -sub_805B158: @ 805B158 - push {r4-r6,lr} - adds r4, r0, 0 - adds r5, r1, 0 - adds r6, r2, 0 - adds r0, r5, 0 - adds r1, r6, 0 - bl MapGridGetMetatileIdAt - adds r1, r0, 0 - lsls r1, 16 - lsrs r1, 16 - adds r0, r4, 0 - bl door_find - adds r4, r0, 0 - cmp r0, 0 - beq _0805B196 - ldrb r0, [r0, 0x3] - ldr r1, _0805B19C @ =gUnknown_835B49C - cmp r0, 0 - bne _0805B184 - ldr r1, _0805B1A0 @ =gUnknown_835B488 -_0805B184: - adds r0, r1, 0 - bl sub_805B1A4 - adds r1, r0, 0 - adds r0, r4, 0 - adds r2, r5, 0 - adds r3, r6, 0 - bl sub_805AF14 -_0805B196: - pop {r4-r6} - pop {r0} - bx r0 - .align 2, 0 -_0805B19C: .4byte gUnknown_835B49C -_0805B1A0: .4byte gUnknown_835B488 - thumb_func_end sub_805B158 - - thumb_func_start sub_805B1A4 -sub_805B1A4: @ 805B1A4 - push {lr} - adds r1, r0, 0 - b _0805B1AC -_0805B1AA: - adds r1, 0x4 -_0805B1AC: - ldrb r0, [r1] - cmp r0, 0 - bne _0805B1AA - subs r0, r1, 0x4 - pop {r1} - bx r1 - thumb_func_end sub_805B1A4 - - thumb_func_start sub_805B1B8 -sub_805B1B8: @ 805B1B8 - push {r4-r6,lr} - adds r4, r0, 0 - adds r5, r1, 0 - adds r6, r2, 0 - adds r0, r5, 0 - adds r1, r6, 0 - bl MapGridGetMetatileIdAt - adds r1, r0, 0 - lsls r1, 16 - lsrs r1, 16 - adds r0, r4, 0 - bl door_find - adds r2, r0, 0 - adds r4, r2, 0 - cmp r2, 0 - bne _0805B1E2 - movs r0, 0x1 - negs r0, r0 - b _0805B204 -_0805B1E2: - ldrb r0, [r2, 0x3] - cmp r0, 0 - beq _0805B1F4 - ldr r1, _0805B1F0 @ =gUnknown_835B49C - adds r0, r2, 0 - b _0805B1F8 - .align 2, 0 -_0805B1F0: .4byte gUnknown_835B49C -_0805B1F4: - ldr r1, _0805B20C @ =gUnknown_835B488 - adds r0, r4, 0 -_0805B1F8: - adds r2, r5, 0 - adds r3, r6, 0 - bl task_overworld_door_add_if_inactive - lsls r0, 24 - asrs r0, 24 -_0805B204: - pop {r4-r6} - pop {r1} - bx r1 - .align 2, 0 -_0805B20C: .4byte gUnknown_835B488 - thumb_func_end sub_805B1B8 - - thumb_func_start sub_805B210 -sub_805B210: @ 805B210 - push {r4-r6,lr} - adds r4, r0, 0 - adds r5, r1, 0 - adds r6, r2, 0 - adds r0, r5, 0 - adds r1, r6, 0 - bl MapGridGetMetatileIdAt - adds r1, r0, 0 - lsls r1, 16 - lsrs r1, 16 - adds r0, r4, 0 - bl door_find - adds r2, r0, 0 - adds r4, r2, 0 - cmp r2, 0 - bne _0805B23A - movs r0, 0x1 - negs r0, r0 - b _0805B25C -_0805B23A: - ldrb r0, [r2, 0x3] - cmp r0, 0 - beq _0805B24C - ldr r1, _0805B248 @ =gUnknown_835B4C4 - adds r0, r2, 0 - b _0805B250 - .align 2, 0 -_0805B248: .4byte gUnknown_835B4C4 -_0805B24C: - ldr r1, _0805B264 @ =gUnknown_835B4B0 - adds r0, r4, 0 -_0805B250: - adds r2, r5, 0 - adds r3, r6, 0 - bl task_overworld_door_add_if_inactive - lsls r0, 24 - asrs r0, 24 -_0805B25C: - pop {r4-r6} - pop {r1} - bx r1 - .align 2, 0 -_0805B264: .4byte gUnknown_835B4B0 - thumb_func_end sub_805B210 - - thumb_func_start FieldSetDoorOpened -FieldSetDoorOpened: @ 805B268 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - lsls r0, r4, 16 - asrs r0, 16 - lsls r1, r5, 16 - asrs r1, 16 - bl MapGridGetMetatileBehaviorAt - lsls r0, 24 - lsrs r0, 24 - bl MetatileBehavior_IsWarpDoor_2 - lsls r0, 24 - cmp r0, 0 - beq _0805B292 - ldr r0, _0805B298 @ =gUnknown_835B5D8 - adds r1, r4, 0 - adds r2, r5, 0 - bl sub_805B158 -_0805B292: - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_0805B298: .4byte gUnknown_835B5D8 - thumb_func_end FieldSetDoorOpened - - thumb_func_start FieldSetDoorClosed -FieldSetDoorClosed: @ 805B29C - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - lsls r0, r4, 16 - asrs r0, 16 - lsls r1, r5, 16 - asrs r1, 16 - bl MapGridGetMetatileBehaviorAt - lsls r0, 24 - lsrs r0, 24 - bl MetatileBehavior_IsWarpDoor_2 - lsls r0, 24 - cmp r0, 0 - beq _0805B2C6 - ldr r0, _0805B2CC @ =gUnknown_835B5D8 - adds r1, r4, 0 - adds r2, r5, 0 - bl DrawClosedDoor -_0805B2C6: - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_0805B2CC: .4byte gUnknown_835B5D8 - thumb_func_end FieldSetDoorClosed - - thumb_func_start FieldAnimateDoorClose -FieldAnimateDoorClose: @ 805B2D0 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - lsls r0, r4, 16 - asrs r0, 16 - lsls r1, r5, 16 - asrs r1, 16 - bl MapGridGetMetatileBehaviorAt - lsls r0, 24 - lsrs r0, 24 - bl MetatileBehavior_IsWarpDoor_2 - lsls r0, 24 - cmp r0, 0 - beq _0805B304 - ldr r0, _0805B300 @ =gUnknown_835B5D8 - adds r1, r4, 0 - adds r2, r5, 0 - bl sub_805B210 - lsls r0, 24 - asrs r0, 24 - b _0805B308 - .align 2, 0 -_0805B300: .4byte gUnknown_835B5D8 -_0805B304: - movs r0, 0x1 - negs r0, r0 -_0805B308: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end FieldAnimateDoorClose - - thumb_func_start FieldAnimateDoorOpen -FieldAnimateDoorOpen: @ 805B310 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - lsls r0, r4, 16 - asrs r0, 16 - lsls r1, r5, 16 - asrs r1, 16 - bl MapGridGetMetatileBehaviorAt - lsls r0, 24 - lsrs r0, 24 - bl MetatileBehavior_IsWarpDoor_2 - lsls r0, 24 - cmp r0, 0 - beq _0805B344 - ldr r0, _0805B340 @ =gUnknown_835B5D8 - adds r1, r4, 0 - adds r2, r5, 0 - bl sub_805B1B8 - lsls r0, 24 - asrs r0, 24 - b _0805B348 - .align 2, 0 -_0805B340: .4byte gUnknown_835B5D8 -_0805B344: - movs r0, 0x1 - negs r0, r0 -_0805B348: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end FieldAnimateDoorOpen - - thumb_func_start FieldIsDoorAnimationRunning -FieldIsDoorAnimationRunning: @ 805B350 - push {lr} - ldr r0, _0805B360 @ =sub_805B028 - bl FuncIsActiveTask - lsls r0, 24 - lsrs r0, 24 - pop {r1} - bx r1 - .align 2, 0 -_0805B360: .4byte sub_805B028 - thumb_func_end FieldIsDoorAnimationRunning - - thumb_func_start GetDoorSoundEffect -GetDoorSoundEffect: @ 805B364 - push {lr} - adds r3, r0, 0 - adds r2, r1, 0 - ldr r0, _0805B37C @ =gUnknown_835B5D8 - adds r1, r3, 0 - bl sub_805B388 - lsls r0, 24 - cmp r0, 0 - beq _0805B380 - movs r0, 0x12 - b _0805B382 - .align 2, 0 -_0805B37C: .4byte gUnknown_835B5D8 -_0805B380: - movs r0, 0xF1 -_0805B382: - pop {r1} - bx r1 - thumb_func_end GetDoorSoundEffect - - thumb_func_start sub_805B388 -sub_805B388: @ 805B388 - push {r4,lr} - adds r4, r0, 0 - adds r0, r1, 0 - adds r1, r2, 0 - bl MapGridGetMetatileIdAt - adds r1, r0, 0 - lsls r1, 16 - lsrs r1, 16 - adds r0, r4, 0 - bl door_find - cmp r0, 0 - beq _0805B3AC - ldrb r0, [r0, 0x2] - lsls r0, 24 - asrs r0, 24 - b _0805B3B0 -_0805B3AC: - movs r0, 0x1 - negs r0, r0 -_0805B3B0: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_805B388 - - .align 2, 0 @ Don't pad with nop. diff --git a/data/field_door.s b/data/field_door.s index be76e845d..c26398742 100644 --- a/data/field_door.s +++ b/data/field_door.s @@ -247,7 +247,7 @@ gUnknown_835B168:: @ 835B168 .space 32 .align 2 -gUnknown_835B488:: @ 835B488 +sDoorAnimFrames_OpenSmall:: @ 835B488 .byte 0x04 .align 1 .2byte 0xffff @@ -264,7 +264,7 @@ gUnknown_835B488:: @ 835B488 .align 1 .2byte 0x0000 -gUnknown_835B49C:: @ 835B49C +sDoorAnimFrames_OpenLarge:: @ 835B49C .byte 0x04 .align 1 .2byte 0xffff @@ -281,7 +281,7 @@ gUnknown_835B49C:: @ 835B49C .align 1 .2byte 0x0000 -gUnknown_835B4B0:: @ 835B4B0 +sDoorAnimFrames_CloseSmall:: @ 835B4B0 .byte 0x04 .align 1 .2byte 0x0100 @@ -298,7 +298,7 @@ gUnknown_835B4B0:: @ 835B4B0 .align 1 .2byte 0x0000 -gUnknown_835B4C4:: @ 835B4C4 +sDoorAnimFrames_CloseLarge:: @ 835B4C4 .byte 0x04 .align 1 .2byte 0x0200 @@ -411,7 +411,7 @@ gUnknown_835B5C8:: @ 835B5C8 gUnknown_835B5D0:: @ 835B5D0 .byte 0xb, 0xb, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2 -gUnknown_835B5D8:: @ 835B5D8 +sDoorGraphics:: @ 835B5D8 .2byte 0x003d .byte 0x00, 0x00 .4byte gUnknown_8353088 diff --git a/include/field_camera.h b/include/field_camera.h index 2ba583a52..fb9861014 100644 --- a/include/field_camera.h +++ b/include/field_camera.h @@ -30,6 +30,6 @@ void sub_805A658(s16 *x, s16 *y); void SetCameraPanningCallback(void (*cb)(void)); void SetCameraPanning(s16 x, s16 y); void InstallCameraPanAheadCallback(void); -void sub_805A91C(int x, int y, const u16 *data); +void DrawDoorMetatileAt(int x, int y, const u16 *data); #endif //GUARD_FIELD_CAMERA_H diff --git a/include/field_door.h b/include/field_door.h index 0059cbe1a..777afffce 100644 --- a/include/field_door.h +++ b/include/field_door.h @@ -3,11 +3,11 @@ #include "global.h" -void FieldSetDoorOpened(u32, u32); -void FieldSetDoorClosed(u32, u32); -s8 FieldAnimateDoorClose(u32, u32); -s8 FieldAnimateDoorOpen(u32, u32); +void FieldSetDoorOpened(int x, int y); +void FieldSetDoorClosed(int x, int y); +s8 FieldAnimateDoorClose(int x, int y); +s8 FieldAnimateDoorOpen(int x, int y); bool8 FieldIsDoorAnimationRunning(void); -u32 GetDoorSoundEffect(u32 x, u32 y); +u16 GetDoorSoundEffect(int x, int y); #endif diff --git a/ld_script.txt b/ld_script.txt index fe60a90e3..9066a11de 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -94,7 +94,6 @@ SECTIONS { src/metatile_behavior.o(.text); asm/field_camera.o(.text); src/field_door.o(.text); - asm/field_door.o(.text); asm/field_player_avatar.o(.text); asm/field_map_obj.o(.text); asm/field_ground_effect.o(.text); diff --git a/src/field_door.c b/src/field_door.c index 116cdddee..a0b470c58 100644 --- a/src/field_door.c +++ b/src/field_door.c @@ -1,82 +1,87 @@ #include "global.h" #include "field_camera.h" #include "task.h" +#include "fieldmap.h" +#include "metatile_behavior.h" +#include "constants/songs.h" struct DoorAnimFrame { - u8 unk_0; - u16 unk_2; + u8 duration; + u16 tile; }; struct DoorGraphics { - u16 unk_0; - u8 unk_2; - u8 unk_3; - const u8 * unk_4; - const u8 * unk_8; + u16 metatileId; + s8 sliding; + u8 size; + const u8 * tiles; + const u8 * palettes; }; -void sub_805AF54(const struct DoorGraphics * a0, int a1, int a2); -void sub_805AF80(const u8 *a0); -void sub_805AF94(const struct DoorGraphics * a0, int a1, int a2, const u8 *a3); -void sub_805AFE8(u16 *a0, u16 a1, const u8 *a2); -bool32 sub_805B060(const struct DoorGraphics * gfx, const struct DoorAnimFrame * frames, u16 *data); +static void DrawDoorDefaultImage(const struct DoorGraphics * gfx, int x, int y); +static void LoadDoorFrameTiles(const u8 *a0); +static void SetDoorFramePalettes(const struct DoorGraphics * gfx, int x, int y, const u8 *a3); +static void BufferDoorFrameTilesWithPalettes(u16 *a0, u16 a1, const u8 *a2); +static bool32 PlayDoorAnimationFrame(const struct DoorGraphics * gfx, const struct DoorAnimFrame * frames, s16 *data); +static const struct DoorAnimFrame * SeekToEndOfDoorAnim(const struct DoorAnimFrame * frames); +static s8 GetDoorOpenType(const struct DoorGraphics * gfx, int x, int y); -extern const struct DoorAnimFrame gUnknown_835B488[]; -extern const struct DoorAnimFrame gUnknown_835B49C[]; -extern const struct DoorAnimFrame gUnknown_835B4B0[]; -extern const struct DoorAnimFrame gUnknown_835B4C4[]; -extern const struct DoorGraphics gUnknown_835B5D8[]; +extern const struct DoorAnimFrame sDoorAnimFrames_OpenSmall[]; +extern const struct DoorAnimFrame sDoorAnimFrames_OpenLarge[]; +extern const struct DoorAnimFrame sDoorAnimFrames_CloseSmall[]; +extern const struct DoorAnimFrame sDoorAnimFrames_CloseLarge[]; +extern const struct DoorGraphics sDoorGraphics[]; -void sub_805AF14(const struct DoorGraphics * a0, const struct DoorAnimFrame * a1, int a2, int a3) +static void UpdateDrawDoorFrame(const struct DoorGraphics * gfx, const struct DoorAnimFrame * frames, int x, int y) { - if (a1->unk_2 == 0xFFFF) + if (frames->tile == 0xFFFF) { - sub_805AF54(a0, a2, a3); + DrawDoorDefaultImage(gfx, x, y); } else { - sub_805AF80(&a0->unk_4[a1->unk_2]); - sub_805AF94(a0, a2, a3, a0->unk_8); + LoadDoorFrameTiles(&gfx->tiles[frames->tile]); + SetDoorFramePalettes(gfx, x, y, gfx->palettes); } } -void sub_805AF54(const struct DoorGraphics * a0, int a1, int a2) +static void DrawDoorDefaultImage(const struct DoorGraphics * gfx, int x, int y) { - if (a0->unk_3 == 0) + if (gfx->size == 0) { - CurrentMapDrawMetatileAt(a1, a2); + CurrentMapDrawMetatileAt(x, y); } else { - CurrentMapDrawMetatileAt(a1, a2); - CurrentMapDrawMetatileAt(a1, a2 - 1); + CurrentMapDrawMetatileAt(x, y); + CurrentMapDrawMetatileAt(x, y - 1); } } -void sub_805AF80(const u8 *a0) +static void LoadDoorFrameTiles(const u8 *a0) { CpuFastCopy(a0, (void *)(BG_VRAM + 0x7F00), 0x100); } -void sub_805AF94(const struct DoorGraphics * a0, int a1, int a2, const u8 *a3) +static void SetDoorFramePalettes(const struct DoorGraphics * gfx, int x, int y, const u8 *a3) { u16 sp00[8]; - if (a0->unk_3 == 0) + if (gfx->size == 0) { - sub_805AFE8(sp00, 0x3F8, a3); + BufferDoorFrameTilesWithPalettes(sp00, 0x3F8, a3); } else { - sub_805AFE8(sp00, 0x3F8, a3); - sub_805A91C(a1, a2 - 1, sp00); - sub_805AFE8(sp00, 0x3FC, a3 + 4); + BufferDoorFrameTilesWithPalettes(sp00, 0x3F8, a3); + DrawDoorMetatileAt(x, y - 1, sp00); + BufferDoorFrameTilesWithPalettes(sp00, 0x3FC, a3 + 4); } - sub_805A91C(a1, a2, sp00); + DrawDoorMetatileAt(x, y, sp00); } -void sub_805AFE8(u16 *a0, u16 a1, const u8 *a2) +static void BufferDoorFrameTilesWithPalettes(u16 *a0, u16 a1, const u8 *a2) { int i; u16 tile; @@ -92,11 +97,149 @@ void sub_805AFE8(u16 *a0, u16 a1, const u8 *a2) } } -void sub_805B028(u8 taskId) +static void Task_AnimateDoor(u8 taskId) { - u16 *data = (void *)gTasks[taskId].data; - const struct DoorAnimFrame * frames = (const void *)((data[0] << 16) | data[1]); - const struct DoorGraphics * gfx = (const void *)((data[2] << 16) | data[3]); - if (!sub_805B060(gfx, frames, data)) + s16 *data = (void *)gTasks[taskId].data; + const struct DoorAnimFrame * frames = (const void *)(((u16)data[0] << 16) | (u16)data[1]); + const struct DoorGraphics * gfx = (const void *)(((u16)data[2] << 16) | (u16)data[3]); + if (!PlayDoorAnimationFrame(gfx, frames, data)) DestroyTask(taskId); } + +static bool32 PlayDoorAnimationFrame(const struct DoorGraphics * gfx, const struct DoorAnimFrame * frames, s16 *data) +{ + if (data[5] == 0) + { + UpdateDrawDoorFrame(gfx, &frames[data[4]], data[6], data[7]); + } + if (data[5] == frames[data[4]].duration) + { + data[5] = 0; + data[4]++; + if (frames[data[4]].duration == 0) + return FALSE; + } + else + { + data[5]++; + } + return TRUE; +} + +static const struct DoorGraphics * door_find(const struct DoorGraphics * gfx, u16 id) +{ + while (gfx->tiles != NULL) + { + if (gfx->metatileId == id) + return gfx; + gfx++; + } + return NULL; +} + +static s8 task_overworld_door_add_if_inactive(const struct DoorGraphics * gfx, const struct DoorAnimFrame * frames, int a2, int a3) +{ + u8 taskId; + s16 *data; + if (FuncIsActiveTask(Task_AnimateDoor) == TRUE) + return -1; + taskId = CreateTask(Task_AnimateDoor, 80); + data = gTasks[taskId].data; + data[6] = a2; + data[7] = a3; + data[1] = (uintptr_t)frames; + data[0] = (uintptr_t)frames >> 16; + data[3] = (uintptr_t)gfx; + data[2] = (uintptr_t)gfx >> 16; + return taskId; +} + +static void DrawClosedDoor(const struct DoorGraphics * gfx, int a1, int a2) +{ + DrawDoorDefaultImage(gfx, a1, a2); +} + +static void DrawOpenedDoor(const struct DoorGraphics * gfx, int x, int y) +{ + gfx = door_find(gfx, MapGridGetMetatileIdAt(x, y)); + if (gfx != NULL) + { + UpdateDrawDoorFrame(gfx, SeekToEndOfDoorAnim(gfx->size == 0 ? sDoorAnimFrames_OpenSmall : sDoorAnimFrames_OpenLarge), x, y); + } +} + +static const struct DoorAnimFrame * SeekToEndOfDoorAnim(const struct DoorAnimFrame * frames) +{ + while (frames->duration != 0) + frames++; + return frames - 1; +} + +static s8 AnimateDoorOpenInternal(const struct DoorGraphics * gfx, int x, int y) +{ + gfx = door_find(gfx, MapGridGetMetatileIdAt(x, y)); + if (gfx == NULL) + return -1; + else if (gfx->size == 0) + return task_overworld_door_add_if_inactive(gfx, sDoorAnimFrames_OpenSmall, x, y); + else + return task_overworld_door_add_if_inactive(gfx, sDoorAnimFrames_OpenLarge, x, y); +} + +static s8 AnimateDoorCloseInternal(const struct DoorGraphics * gfx, int x, int y) +{ + gfx = door_find(gfx, MapGridGetMetatileIdAt(x, y)); + if (gfx == NULL) + return -1; + else if (gfx->size == 0) + return task_overworld_door_add_if_inactive(gfx, sDoorAnimFrames_CloseSmall, x, y); + else + return task_overworld_door_add_if_inactive(gfx, sDoorAnimFrames_CloseLarge, x, y); +} + +void FieldSetDoorOpened(int x, int y) +{ + if (MetatileBehavior_IsWarpDoor_2(MapGridGetMetatileBehaviorAt((s16)x, (s16)y))) + DrawOpenedDoor(sDoorGraphics, x, y); +} + +void FieldSetDoorClosed(int x, int y) +{ + if (MetatileBehavior_IsWarpDoor_2(MapGridGetMetatileBehaviorAt((s16)x, (s16)y))) + DrawClosedDoor(sDoorGraphics, x, y); +} + +s8 FieldAnimateDoorClose(int x, int y) +{ + if (!MetatileBehavior_IsWarpDoor_2(MapGridGetMetatileBehaviorAt((s16)x, (s16)y))) + return -1; + return AnimateDoorCloseInternal(sDoorGraphics, x, y); +} + +s8 FieldAnimateDoorOpen(int x, int y) +{ + if (!MetatileBehavior_IsWarpDoor_2(MapGridGetMetatileBehaviorAt((s16)x, (s16)y))) + return -1; + return AnimateDoorOpenInternal(sDoorGraphics, x, y); +} + +bool8 FieldIsDoorAnimationRunning(void) +{ + return FuncIsActiveTask(Task_AnimateDoor); +} + +u16 GetDoorSoundEffect(x, y) +{ + if (!GetDoorOpenType(sDoorGraphics, x, y)) + return MUS_W_DOOR; + else + return SE_JIDO_DOA; +} + +static s8 GetDoorOpenType(const struct DoorGraphics * gfx, int x, int y) +{ + gfx = door_find(gfx, MapGridGetMetatileIdAt(x, y)); + if (gfx == NULL) + return -1; + return gfx->sliding; +} -- cgit v1.2.3 From e2005e194dee022b422e07c0f8efeeea490e55e0 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 12 Nov 2019 14:34:14 -0500 Subject: Port field_door data to C --- data/field_door.s | 546 ------------------------------------------------------ ld_script.txt | 1 - src/field_door.c | 302 +++++++++++++++++++++++++++++- 3 files changed, 297 insertions(+), 552 deletions(-) delete mode 100644 data/field_door.s diff --git a/data/field_door.s b/data/field_door.s deleted file mode 100644 index c26398742..000000000 --- a/data/field_door.s +++ /dev/null @@ -1,546 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - .section .rodata - .align 2, 0 - -gUnknown_8353088:: @ 8353088 - .incbin "graphics/door_anims/frame_8353088_1.4bpp" - .incbin "graphics/door_anims/frame_8353088_2.4bpp" - .incbin "graphics/door_anims/frame_8353088_3.4bpp" - .space 32 - -gUnknown_8353228:: @ 8353228 - .incbin "graphics/door_anims/frame_8353228_1.4bpp" - .incbin "graphics/door_anims/frame_8353228_2.4bpp" - .incbin "graphics/door_anims/frame_8353228_3.4bpp" - .space 32 - -gUnknown_83533C8:: @ 83533C8 - .incbin "graphics/door_anims/frame_83533C8_1.4bpp" - .incbin "graphics/door_anims/frame_83533C8_2.4bpp" - .incbin "graphics/door_anims/frame_83533C8_3.4bpp" - .space 32 - -gUnknown_8353568:: @ 8353568 - .incbin "graphics/door_anims/frame_8353568_1.4bpp" - .incbin "graphics/door_anims/frame_8353568_2.4bpp" - .incbin "graphics/door_anims/frame_8353568_3.4bpp" - .space 32 - -gUnknown_8353708:: @ 8353708 - .incbin "graphics/door_anims/frame_8353708_1.4bpp" - .incbin "graphics/door_anims/frame_8353708_2.4bpp" - .incbin "graphics/door_anims/frame_8353708_3.4bpp" - .space 32 - -gUnknown_83538A8:: @ 83538A8 - .incbin "graphics/door_anims/frame_83538A8_1.4bpp" - .incbin "graphics/door_anims/frame_83538A8_2.4bpp" - .incbin "graphics/door_anims/frame_83538A8_3.4bpp" - .space 32 - -gUnknown_8353A48:: @ 8353A48 - .incbin "graphics/door_anims/frame_8353A48_1.4bpp" - .incbin "graphics/door_anims/frame_8353A48_2.4bpp" - .incbin "graphics/door_anims/frame_8353A48_3.4bpp" - .space 32 - -gUnknown_8353BE8:: @ 8353BE8 - .incbin "graphics/door_anims/frame_8353BE8_1.4bpp" - .incbin "graphics/door_anims/frame_8353BE8_2.4bpp" - .incbin "graphics/door_anims/frame_8353BE8_3.4bpp" - .space 32 - -gUnknown_8353D88:: @ 8353D88 - .incbin "graphics/door_anims/frame_8353D88_1.4bpp" - .incbin "graphics/door_anims/frame_8353D88_2.4bpp" - .incbin "graphics/door_anims/frame_8353D88_3.4bpp" - .space 32 - -gUnknown_8353F28:: @ 8353F28 - .incbin "graphics/door_anims/frame_8353F28_1.4bpp" - .incbin "graphics/door_anims/frame_8353F28_2.4bpp" - .incbin "graphics/door_anims/frame_8353F28_3.4bpp" - .space 32 - -gUnknown_83540C8:: @ 83540C8 - .incbin "graphics/door_anims/frame_83540C8_1.4bpp" - .incbin "graphics/door_anims/frame_83540C8_2.4bpp" - .incbin "graphics/door_anims/frame_83540C8_3.4bpp" - .space 32 - -gUnknown_8354268:: @ 8354268 - .incbin "graphics/door_anims/frame_8354268_1.4bpp" - .incbin "graphics/door_anims/frame_8354268_2.4bpp" - .incbin "graphics/door_anims/frame_8354268_3.4bpp" - .space 32 - -gUnknown_8354408:: @ 8354408 - .incbin "graphics/door_anims/frame_8354408_1.4bpp" - .incbin "graphics/door_anims/frame_8354408_2.4bpp" - .incbin "graphics/door_anims/frame_8354408_3.4bpp" - .space 32 - -gUnknown_83545A8:: @ 83545A8 - .incbin "graphics/door_anims/frame_83545A8_1.4bpp" - .incbin "graphics/door_anims/frame_83545A8_2.4bpp" - .incbin "graphics/door_anims/frame_83545A8_3.4bpp" - .space 32 - -gUnknown_8354748:: @ 8354748 - .incbin "graphics/door_anims/frame_8354748_1.4bpp" - .incbin "graphics/door_anims/frame_8354748_2.4bpp" - .incbin "graphics/door_anims/frame_8354748_3.4bpp" - .space 32 - -gUnknown_83548E8:: @ 83548E8 - .incbin "graphics/door_anims/frame_83548E8_1.4bpp" - .incbin "graphics/door_anims/frame_83548E8_2.4bpp" - .incbin "graphics/door_anims/frame_83548E8_3.4bpp" - .space 32 - -gUnknown_8354A88:: @ 8354A88 - .incbin "graphics/door_anims/frame_8354A88_1.4bpp" - .incbin "graphics/door_anims/frame_8354A88_2.4bpp" - .incbin "graphics/door_anims/frame_8354A88_3.4bpp" - .space 32 - -gUnknown_8354C28:: @ 8354C28 - .incbin "graphics/door_anims/frame_8354C28_1.4bpp" - .incbin "graphics/door_anims/frame_8354C28_2.4bpp" - .incbin "graphics/door_anims/frame_8354C28_3.4bpp" - .space 32 - -gUnknown_8354F48:: @ 8354F48 - .incbin "graphics/door_anims/frame_8354F48_1.4bpp" - .incbin "graphics/door_anims/frame_8354F48_2.4bpp" - .incbin "graphics/door_anims/frame_8354F48_3.4bpp" - .space 32 - -gUnknown_8355268:: @ 8355268 - .incbin "graphics/door_anims/frame_8355268_1.4bpp" - .incbin "graphics/door_anims/frame_8355268_2.4bpp" - .incbin "graphics/door_anims/frame_8355268_3.4bpp" - .space 32 - -gUnknown_8355588:: @ 8355588 - .incbin "graphics/door_anims/frame_8355588_1.4bpp" - .incbin "graphics/door_anims/frame_8355588_2.4bpp" - .incbin "graphics/door_anims/frame_8355588_3.4bpp" - .space 32 - -gUnknown_83558A8:: - .space 0x320 - .space 0x320 - .space 0x320 - .space 0x320 - .space 0x320 - .space 0x320 - .space 0x320 - .space 0x1A0 - .space 0x1A0 - .space 0x1A0 - .space 0x1A0 - .space 0x1A0 - .space 0x1A0 - .space 0x1A0 - .space 0x1A0 - .space 0x1A0 - .space 0x1A0 - .space 0x1A0 - .space 0x1A0 - .space 0x1A0 - .space 0x1A0 - .space 0x1A0 - .space 0x1A0 - .space 0x1A0 - .space 0x1A0 - .space 0x1A0 - .space 0x1A0 - .space 0x1A0 - .space 0x1A0 - .space 0x1A0 - .space 0x1A0 - .incbin "graphics/door_anims/frame_8359588_1.4bpp" - .incbin "graphics/door_anims/frame_8359588_2.4bpp" - .space 0x100 - .incbin "graphics/door_anims/frame_8359788_1.4bpp" - .incbin "graphics/door_anims/frame_8359788_2.4bpp" - .incbin "graphics/door_anims/frame_8359788_3.4bpp" - .incbin "graphics/door_anims/frame_8359788_4.4bpp" - .space 0x100 - .incbin "graphics/door_anims/frame_8359988_1.4bpp" - .incbin "graphics/door_anims/frame_8359988_2.4bpp" - .incbin "graphics/door_anims/frame_8359988_3.4bpp" - .incbin "graphics/door_anims/frame_8359988_4.4bpp" - .space 0x100 - .incbin "graphics/door_anims/frame_8359B88_1.4bpp" - .incbin "graphics/door_anims/frame_8359B88_2.4bpp" - .incbin "graphics/door_anims/frame_8359B88_3.4bpp" - .incbin "graphics/door_anims/frame_8359B88_4.4bpp" - .space 0x20 - -gUnknown_8359CA8:: @ 8359CA8 - .incbin "graphics/door_anims/frame_8359CA8_1.4bpp" - .incbin "graphics/door_anims/frame_8359CA8_2.4bpp" - .incbin "graphics/door_anims/frame_8359CA8_3.4bpp" - .space 32 - -gUnknown_8359FC8:: @ 8359FC8 - .incbin "graphics/door_anims/frame_8359FC8_1.4bpp" - .incbin "graphics/door_anims/frame_8359FC8_2.4bpp" - .incbin "graphics/door_anims/frame_8359FC8_3.4bpp" - .space 32 - -gUnknown_835A168:: @ 835A168 - .incbin "graphics/door_anims/frame_835A168_1.4bpp" - .incbin "graphics/door_anims/frame_835A168_2.4bpp" - .incbin "graphics/door_anims/frame_835A168_3.4bpp" - .space 32 - -gUnknown_835A308:: @ 835A308 - .incbin "graphics/door_anims/frame_835A308_1.4bpp" - .incbin "graphics/door_anims/frame_835A308_2.4bpp" - .incbin "graphics/door_anims/frame_835A308_3.4bpp" - .space 32 - -gUnknown_835A4A8:: @ 835A4A8 - .incbin "graphics/door_anims/frame_835A4A8_1.4bpp" - .incbin "graphics/door_anims/frame_835A4A8_2.4bpp" - .incbin "graphics/door_anims/frame_835A4A8_3.4bpp" - .space 32 - -gUnknown_835A648:: @ 835A648 - .incbin "graphics/door_anims/frame_835A648_1.4bpp" - .incbin "graphics/door_anims/frame_835A648_2.4bpp" - .incbin "graphics/door_anims/frame_835A648_3.4bpp" - .space 32 - -gUnknown_835A7E8:: @ 835A7E8 - .incbin "graphics/door_anims/frame_835A7E8_1.4bpp" - .incbin "graphics/door_anims/frame_835A7E8_2.4bpp" - .incbin "graphics/door_anims/frame_835A7E8_3.4bpp" - .space 32 - -gUnknown_835A988:: @ 835A988 - .incbin "graphics/door_anims/frame_835A988_1.4bpp" - .incbin "graphics/door_anims/frame_835A988_2.4bpp" - .incbin "graphics/door_anims/frame_835A988_3.4bpp" - .space 32 - -gUnknown_835AB28:: @ 835AB28 - .incbin "graphics/door_anims/frame_835AB28_1.4bpp" - .incbin "graphics/door_anims/frame_835AB28_2.4bpp" - .incbin "graphics/door_anims/frame_835AB28_3.4bpp" - .space 32 - -gUnknown_835AE48:: @ 835AE48 - .incbin "graphics/door_anims/frame_835AE48_1.4bpp" - .incbin "graphics/door_anims/frame_835AE48_2.4bpp" - .incbin "graphics/door_anims/frame_835AE48_3.4bpp" - .space 32 - -gUnknown_835B168:: @ 835B168 - .incbin "graphics/door_anims/frame_835B168_1.4bpp" - .incbin "graphics/door_anims/frame_835B168_2.4bpp" - .incbin "graphics/door_anims/frame_835B168_3.4bpp" - .space 32 - - .align 2 -sDoorAnimFrames_OpenSmall:: @ 835B488 - .byte 0x04 - .align 1 - .2byte 0xffff - .byte 0x04 - .align 1 - .2byte 0x0000 - .byte 0x04 - .align 1 - .2byte 0x0080 - .byte 0x04 - .align 1 - .2byte 0x0100 - .byte 0x00 - .align 1 - .2byte 0x0000 - -sDoorAnimFrames_OpenLarge:: @ 835B49C - .byte 0x04 - .align 1 - .2byte 0xffff - .byte 0x04 - .align 1 - .2byte 0x0000 - .byte 0x04 - .align 1 - .2byte 0x0100 - .byte 0x04 - .align 1 - .2byte 0x0200 - .byte 0x00 - .align 1 - .2byte 0x0000 - -sDoorAnimFrames_CloseSmall:: @ 835B4B0 - .byte 0x04 - .align 1 - .2byte 0x0100 - .byte 0x04 - .align 1 - .2byte 0x0080 - .byte 0x04 - .align 1 - .2byte 0x0000 - .byte 0x04 - .align 1 - .2byte 0xffff - .byte 0x00 - .align 1 - .2byte 0x0000 - -sDoorAnimFrames_CloseLarge:: @ 835B4C4 - .byte 0x04 - .align 1 - .2byte 0x0200 - .byte 0x04 - .align 1 - .2byte 0x0100 - .byte 0x04 - .align 1 - .2byte 0x0000 - .byte 0x04 - .align 1 - .2byte 0xffff - .byte 0x00 - .align 1 - .2byte 0x0000 - -gUnknown_835B4D8:: @ 835B4D8 - .byte 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2 - -gUnknown_835B4E0:: @ 835B4E0 - .byte 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3 - -gUnknown_835B4E8:: @ 835B4E8 - .byte 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3 - -gUnknown_835B4F0:: @ 835B4F0 - .byte 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8 - -gUnknown_835B4F8:: @ 835B4F8 - .byte 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa - -gUnknown_835B500:: @ 835B500 - .byte 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8 - -gUnknown_835B508:: @ 835B508 - .byte 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8 - -gUnknown_835B510:: @ 835B510 - .byte 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8 - -gUnknown_835B518:: @ 835B518 - .byte 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3 - -gUnknown_835B520:: @ 835B520 - .byte 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc - -gUnknown_835B528:: @ 835B528 - .byte 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9 - -gUnknown_835B530:: @ 835B530 - .byte 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9 - -gUnknown_835B538:: @ 835B538 - .byte 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9 - -gUnknown_835B540:: @ 835B540 - .byte 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3 - -gUnknown_835B548:: @ 835B548 - .byte 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8 - -gUnknown_835B550:: @ 835B550 - .byte 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9 - -gUnknown_835B558:: @ 835B558 - .byte 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3 - -gUnknown_835B560:: @ 835B560 - .byte 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8 - -gUnknown_835B568:: @ 835B568 - .byte 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8 - -gUnknown_835B570:: @ 835B570 - .byte 0xc, 0xc, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2 - -gUnknown_835B578:: @ 835B578 - .byte 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7 - -gUnknown_835B580:: @ 835B580 - .byte 0x8, 0x8, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2 - -gUnknown_835B588:: @ 835B588 - .byte 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5 - -gUnknown_835B590:: @ 835B590 - .byte 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3 - -gUnknown_835B598:: @ 835B598 - .byte 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3 - -gUnknown_835B5A0:: @ 835B5A0 - .byte 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5 - -gUnknown_835B5A8:: @ 835B5A8 - .byte 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3 - -gUnknown_835B5B0:: @ 835B5B0 - .byte 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa - -gUnknown_835B5B8:: @ 835B5B8 - .byte 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5 - -gUnknown_835B5C0:: @ 835B5C0 - .byte 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8 - -gUnknown_835B5C8:: @ 835B5C8 - .byte 0x8, 0x8, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2 - -gUnknown_835B5D0:: @ 835B5D0 - .byte 0xb, 0xb, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2 - -sDoorGraphics:: @ 835B5D8 - .2byte 0x003d - .byte 0x00, 0x00 - .4byte gUnknown_8353088 - .4byte gUnknown_835B4D8 - .2byte 0x0062 - .byte 0x01, 0x00 - .4byte gUnknown_8353228 - .4byte gUnknown_835B4E0 - .2byte 0x015b - .byte 0x01, 0x00 - .4byte gUnknown_83533C8 - .4byte gUnknown_835B4E8 - .2byte 0x02a3 - .byte 0x00, 0x00 - .4byte gUnknown_8353568 - .4byte gUnknown_835B4F0 - .2byte 0x02ac - .byte 0x00, 0x00 - .4byte gUnknown_8353708 - .4byte gUnknown_835B4F8 - .2byte 0x0299 - .byte 0x00, 0x00 - .4byte gUnknown_83538A8 - .4byte gUnknown_835B500 - .2byte 0x02ce - .byte 0x00, 0x00 - .4byte gUnknown_8353A48 - .4byte gUnknown_835B508 - .2byte 0x0284 - .byte 0x00, 0x00 - .4byte gUnknown_8353BE8 - .4byte gUnknown_835B510 - .2byte 0x02bc - .byte 0x01, 0x00 - .4byte gUnknown_8353D88 - .4byte gUnknown_835B518 - .2byte 0x0298 - .byte 0x00, 0x00 - .4byte gUnknown_8353F28 - .4byte gUnknown_835B520 - .2byte 0x02a2 - .byte 0x00, 0x00 - .4byte gUnknown_83540C8 - .4byte gUnknown_835B528 - .2byte 0x029e - .byte 0x00, 0x00 - .4byte gUnknown_8354268 - .4byte gUnknown_835B530 - .2byte 0x02e1 - .byte 0x00, 0x00 - .4byte gUnknown_8354408 - .4byte gUnknown_835B538 - .2byte 0x0294 - .byte 0x01, 0x00 - .4byte gUnknown_83545A8 - .4byte gUnknown_835B540 - .2byte 0x02bf - .byte 0x00, 0x00 - .4byte gUnknown_8354748 - .4byte gUnknown_835B548 - .2byte 0x02d2 - .byte 0x01, 0x00 - .4byte gUnknown_83548E8 - .4byte gUnknown_835B550 - .2byte 0x02ad - .byte 0x00, 0x00 - .4byte gUnknown_8354A88 - .4byte gUnknown_835B558 - .2byte 0x0297 - .byte 0x00, 0x00 - .4byte gUnknown_8359FC8 - .4byte gUnknown_835B588 - .2byte 0x029b - .byte 0x01, 0x00 - .4byte gUnknown_835A168 - .4byte gUnknown_835B590 - .2byte 0x02eb - .byte 0x00, 0x00 - .4byte gUnknown_835A308 - .4byte gUnknown_835B598 - .2byte 0x029a - .byte 0x00, 0x00 - .4byte gUnknown_835A4A8 - .4byte gUnknown_835B5A0 - .2byte 0x02b9 - .byte 0x00, 0x00 - .4byte gUnknown_835A648 - .4byte gUnknown_835B5A8 - .2byte 0x02af - .byte 0x00, 0x00 - .4byte gUnknown_835A7E8 - .4byte gUnknown_835B5B0 - .2byte 0x030c - .byte 0x00, 0x00 - .4byte gUnknown_835A988 - .4byte gUnknown_835B5B8 - .2byte 0x028d - .byte 0x01, 0x01 - .4byte gUnknown_8354C28 - .4byte gUnknown_835B560 - .2byte 0x02de - .byte 0x01, 0x01 - .4byte gUnknown_8354F48 - .4byte gUnknown_835B568 - .2byte 0x02ab - .byte 0x01, 0x01 - .4byte gUnknown_8355268 - .4byte gUnknown_835B570 - .2byte 0x0281 - .byte 0x00, 0x01 - .4byte gUnknown_8355588 - .4byte gUnknown_835B578 - .2byte 0x02e2 - .byte 0x01, 0x01 - .4byte gUnknown_8359CA8 - .4byte gUnknown_835B580 - .2byte 0x0296 - .byte 0x01, 0x01 - .4byte gUnknown_835AB28 - .4byte gUnknown_835B5C0 - .2byte 0x02c3 - .byte 0x01, 0x01 - .4byte gUnknown_835AE48 - .4byte gUnknown_835B5C8 - .2byte 0x0356 - .byte 0x01, 0x01 - .4byte gUnknown_835B168 - .4byte gUnknown_835B5D0 - .2byte 0x0000 - .byte 0x00, 0x00 - .4byte 0x00000000 - .4byte 0x00000000 diff --git a/ld_script.txt b/ld_script.txt index 9066a11de..d84a70c7a 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -409,7 +409,6 @@ SECTIONS { src/fieldmap.o(.rodata); src/metatile_behavior.o(.rodata); src/field_door.o(.rodata); - data/field_door.o(.rodata); data/field_player_avatar.o(.rodata); data/field_map_obj.o(.rodata); data/field_ground_effect.o(.rodata); diff --git a/src/field_door.c b/src/field_door.c index a0b470c58..a06781834 100644 --- a/src/field_door.c +++ b/src/field_door.c @@ -28,11 +28,303 @@ static bool32 PlayDoorAnimationFrame(const struct DoorGraphics * gfx, const stru static const struct DoorAnimFrame * SeekToEndOfDoorAnim(const struct DoorAnimFrame * frames); static s8 GetDoorOpenType(const struct DoorGraphics * gfx, int x, int y); -extern const struct DoorAnimFrame sDoorAnimFrames_OpenSmall[]; -extern const struct DoorAnimFrame sDoorAnimFrames_OpenLarge[]; -extern const struct DoorAnimFrame sDoorAnimFrames_CloseSmall[]; -extern const struct DoorAnimFrame sDoorAnimFrames_CloseLarge[]; -extern const struct DoorGraphics sDoorGraphics[]; +const u8 gUnknown_8353088[] = INCBIN_U8("graphics/door_anims/frame_8353088_1.4bpp", "graphics/door_anims/frame_8353088_2.4bpp", "graphics/door_anims/frame_8353088_3.4bpp"); +const u8 gUnknown_8353208[32] = {}; +const u8 gUnknown_8353228[] = INCBIN_U8("graphics/door_anims/frame_8353228_1.4bpp", "graphics/door_anims/frame_8353228_2.4bpp", "graphics/door_anims/frame_8353228_3.4bpp"); +const u8 gUnknown_83533A8[32] = {}; +const u8 gUnknown_83533C8[] = INCBIN_U8("graphics/door_anims/frame_83533C8_1.4bpp", "graphics/door_anims/frame_83533C8_2.4bpp", "graphics/door_anims/frame_83533C8_3.4bpp"); +const u8 gUnknown_8353548[32] = {}; +const u8 gUnknown_8353568[] = INCBIN_U8("graphics/door_anims/frame_8353568_1.4bpp", "graphics/door_anims/frame_8353568_2.4bpp", "graphics/door_anims/frame_8353568_3.4bpp"); +const u8 gUnknown_83536E8[32] = {}; +const u8 gUnknown_8353708[] = INCBIN_U8("graphics/door_anims/frame_8353708_1.4bpp", "graphics/door_anims/frame_8353708_2.4bpp", "graphics/door_anims/frame_8353708_3.4bpp"); +const u8 gUnknown_8353888[32] = {}; +const u8 gUnknown_83538A8[] = INCBIN_U8("graphics/door_anims/frame_83538A8_1.4bpp", "graphics/door_anims/frame_83538A8_2.4bpp", "graphics/door_anims/frame_83538A8_3.4bpp"); +const u8 gUnknown_8353A28[32] = {}; +const u8 gUnknown_8353A48[] = INCBIN_U8("graphics/door_anims/frame_8353A48_1.4bpp", "graphics/door_anims/frame_8353A48_2.4bpp", "graphics/door_anims/frame_8353A48_3.4bpp"); +const u8 gUnknown_8353BC8[32] = {}; +const u8 gUnknown_8353BE8[] = INCBIN_U8("graphics/door_anims/frame_8353BE8_1.4bpp", "graphics/door_anims/frame_8353BE8_2.4bpp", "graphics/door_anims/frame_8353BE8_3.4bpp"); +const u8 gUnknown_8353D68[32] = {}; +const u8 gUnknown_8353D88[] = INCBIN_U8("graphics/door_anims/frame_8353D88_1.4bpp", "graphics/door_anims/frame_8353D88_2.4bpp", "graphics/door_anims/frame_8353D88_3.4bpp"); +const u8 gUnknown_8353F08[32] = {}; +const u8 gUnknown_8353F28[] = INCBIN_U8("graphics/door_anims/frame_8353F28_1.4bpp", "graphics/door_anims/frame_8353F28_2.4bpp", "graphics/door_anims/frame_8353F28_3.4bpp"); +const u8 gUnknown_83540A8[32] = {}; +const u8 gUnknown_83540C8[] = INCBIN_U8("graphics/door_anims/frame_83540C8_1.4bpp", "graphics/door_anims/frame_83540C8_2.4bpp", "graphics/door_anims/frame_83540C8_3.4bpp"); +const u8 gUnknown_8354248[32] = {}; +const u8 gUnknown_8354268[] = INCBIN_U8("graphics/door_anims/frame_8354268_1.4bpp", "graphics/door_anims/frame_8354268_2.4bpp", "graphics/door_anims/frame_8354268_3.4bpp"); +const u8 gUnknown_83543E8[32] = {}; +const u8 gUnknown_8354408[] = INCBIN_U8("graphics/door_anims/frame_8354408_1.4bpp", "graphics/door_anims/frame_8354408_2.4bpp", "graphics/door_anims/frame_8354408_3.4bpp"); +const u8 gUnknown_8354588[32] = {}; +const u8 gUnknown_83545A8[] = INCBIN_U8("graphics/door_anims/frame_83545A8_1.4bpp", "graphics/door_anims/frame_83545A8_2.4bpp", "graphics/door_anims/frame_83545A8_3.4bpp"); +const u8 gUnknown_8354728[32] = {}; +const u8 gUnknown_8354748[] = INCBIN_U8("graphics/door_anims/frame_8354748_1.4bpp", "graphics/door_anims/frame_8354748_2.4bpp", "graphics/door_anims/frame_8354748_3.4bpp"); +const u8 gUnknown_83548C8[32] = {}; +const u8 gUnknown_83548E8[] = INCBIN_U8("graphics/door_anims/frame_83548E8_1.4bpp", "graphics/door_anims/frame_83548E8_2.4bpp", "graphics/door_anims/frame_83548E8_3.4bpp"); +const u8 gUnknown_8354A68[32] = {}; +const u8 gUnknown_8354A88[] = INCBIN_U8("graphics/door_anims/frame_8354A88_1.4bpp", "graphics/door_anims/frame_8354A88_2.4bpp", "graphics/door_anims/frame_8354A88_3.4bpp"); +const u8 gUnknown_8354C08[32] = {}; +const u8 gUnknown_8354C28[] = INCBIN_U8("graphics/door_anims/frame_8354C28_1.4bpp", "graphics/door_anims/frame_8354C28_2.4bpp", "graphics/door_anims/frame_8354C28_3.4bpp"); +const u8 gUnknown_8354F28[32] = {}; +const u8 gUnknown_8354F48[] = INCBIN_U8("graphics/door_anims/frame_8354F48_1.4bpp", "graphics/door_anims/frame_8354F48_2.4bpp", "graphics/door_anims/frame_8354F48_3.4bpp"); +const u8 gUnknown_8355248[32] = {}; +const u8 gUnknown_8355268[] = INCBIN_U8("graphics/door_anims/frame_8355268_1.4bpp", "graphics/door_anims/frame_8355268_2.4bpp", "graphics/door_anims/frame_8355268_3.4bpp"); +const u8 gUnknown_8355568[32] = {}; +const u8 gUnknown_8355588[] = INCBIN_U8("graphics/door_anims/frame_8355588_1.4bpp", "graphics/door_anims/frame_8355588_2.4bpp", "graphics/door_anims/frame_8355588_3.4bpp"); +const u8 gUnknown_8355888[32] = {}; +const u8 gUnknown_83558A8[256] = {}; +const u8 gUnknown_83559A8[256] = {}; +const u8 gUnknown_8355AA8[256] = {}; +const u8 gUnknown_8355BA8[32] = {}; +const u8 gUnknown_8355BC8[256] = {}; +const u8 gUnknown_8355CC8[256] = {}; +const u8 gUnknown_8355DC8[256] = {}; +const u8 gUnknown_8355EC8[32] = {}; +const u8 gUnknown_8355EE8[256] = {}; +const u8 gUnknown_8355FE8[256] = {}; +const u8 gUnknown_83560E8[256] = {}; +const u8 gUnknown_83561E8[32] = {}; +const u8 gUnknown_8356208[256] = {}; +const u8 gUnknown_8356308[256] = {}; +const u8 gUnknown_8356408[256] = {}; +const u8 gUnknown_8356508[32] = {}; +const u8 gUnknown_8356528[256] = {}; +const u8 gUnknown_8356628[256] = {}; +const u8 gUnknown_8356728[256] = {}; +const u8 gUnknown_8356828[32] = {}; +const u8 gUnknown_8356848[256] = {}; +const u8 gUnknown_8356948[256] = {}; +const u8 gUnknown_8356A48[256] = {}; +const u8 gUnknown_8356B48[32] = {}; +const u8 gUnknown_8356B68[256] = {}; +const u8 gUnknown_8356C68[256] = {}; +const u8 gUnknown_8356D68[256] = {}; +const u8 gUnknown_8356E68[32] = {}; +const u8 gUnknown_8356E88[128] = {}; +const u8 gUnknown_8356F08[128] = {}; +const u8 gUnknown_8356F88[128] = {}; +const u8 gUnknown_8357008[32] = {}; +const u8 gUnknown_8357028[128] = {}; +const u8 gUnknown_83570A8[128] = {}; +const u8 gUnknown_8357128[128] = {}; +const u8 gUnknown_83571A8[32] = {}; +const u8 gUnknown_83571C8[128] = {}; +const u8 gUnknown_8357248[128] = {}; +const u8 gUnknown_83572C8[128] = {}; +const u8 gUnknown_8357348[32] = {}; +const u8 gUnknown_8357368[128] = {}; +const u8 gUnknown_83573E8[128] = {}; +const u8 gUnknown_8357468[128] = {}; +const u8 gUnknown_83574E8[32] = {}; +const u8 gUnknown_8357508[128] = {}; +const u8 gUnknown_8357588[128] = {}; +const u8 gUnknown_8357608[128] = {}; +const u8 gUnknown_8357688[32] = {}; +const u8 gUnknown_83576A8[128] = {}; +const u8 gUnknown_8357728[128] = {}; +const u8 gUnknown_83577A8[128] = {}; +const u8 gUnknown_8357828[32] = {}; +const u8 gUnknown_8357848[128] = {}; +const u8 gUnknown_83578C8[128] = {}; +const u8 gUnknown_8357948[128] = {}; +const u8 gUnknown_83579C8[32] = {}; +const u8 gUnknown_83579E8[128] = {}; +const u8 gUnknown_8357A68[128] = {}; +const u8 gUnknown_8357AE8[128] = {}; +const u8 gUnknown_8357B68[32] = {}; +const u8 gUnknown_8357B88[128] = {}; +const u8 gUnknown_8357C08[128] = {}; +const u8 gUnknown_8357C88[128] = {}; +const u8 gUnknown_8357D08[32] = {}; +const u8 gUnknown_8357D28[128] = {}; +const u8 gUnknown_8357DA8[128] = {}; +const u8 gUnknown_8357E28[128] = {}; +const u8 gUnknown_8357EA8[32] = {}; +const u8 gUnknown_8357EC8[128] = {}; +const u8 gUnknown_8357F48[128] = {}; +const u8 gUnknown_8357FC8[128] = {}; +const u8 gUnknown_8358048[32] = {}; +const u8 gUnknown_8358068[128] = {}; +const u8 gUnknown_83580E8[128] = {}; +const u8 gUnknown_8358168[128] = {}; +const u8 gUnknown_83581E8[32] = {}; +const u8 gUnknown_8358208[128] = {}; +const u8 gUnknown_8358288[128] = {}; +const u8 gUnknown_8358308[128] = {}; +const u8 gUnknown_8358388[32] = {}; +const u8 gUnknown_83583A8[128] = {}; +const u8 gUnknown_8358428[128] = {}; +const u8 gUnknown_83584A8[128] = {}; +const u8 gUnknown_8358528[32] = {}; +const u8 gUnknown_8358548[128] = {}; +const u8 gUnknown_83585C8[128] = {}; +const u8 gUnknown_8358648[128] = {}; +const u8 gUnknown_83586C8[32] = {}; +const u8 gUnknown_83586E8[128] = {}; +const u8 gUnknown_8358768[128] = {}; +const u8 gUnknown_83587E8[128] = {}; +const u8 gUnknown_8358868[32] = {}; +const u8 gUnknown_8358888[128] = {}; +const u8 gUnknown_8358908[128] = {}; +const u8 gUnknown_8358988[128] = {}; +const u8 gUnknown_8358A08[32] = {}; +const u8 gUnknown_8358A28[128] = {}; +const u8 gUnknown_8358AA8[128] = {}; +const u8 gUnknown_8358B28[128] = {}; +const u8 gUnknown_8358BA8[32] = {}; +const u8 gUnknown_8358BC8[128] = {}; +const u8 gUnknown_8358C48[128] = {}; +const u8 gUnknown_8358CC8[128] = {}; +const u8 gUnknown_8358D48[32] = {}; +const u8 gUnknown_8358D68[128] = {}; +const u8 gUnknown_8358DE8[128] = {}; +const u8 gUnknown_8358E68[128] = {}; +const u8 gUnknown_8358EE8[32] = {}; +const u8 gUnknown_8358F08[128] = {}; +const u8 gUnknown_8358F88[128] = {}; +const u8 gUnknown_8359008[128] = {}; +const u8 gUnknown_8359088[32] = {}; +const u8 gUnknown_83590A8[128] = {}; +const u8 gUnknown_8359128[128] = {}; +const u8 gUnknown_83591A8[128] = {}; +const u8 gUnknown_8359228[32] = {}; +const u8 gUnknown_8359248[128] = {}; +const u8 gUnknown_83592C8[128] = {}; +const u8 gUnknown_8359348[128] = {}; +const u8 gUnknown_83593C8[32] = {}; +const u8 gUnknown_83593E8[128] = {}; +const u8 gUnknown_8359468[128] = {}; +const u8 gUnknown_83594E8[128] = {}; +const u8 gUnknown_8359568[32] = {}; +const u8 gUnknown_8359588[] = INCBIN_U8("graphics/door_anims/frame_8359588_1.4bpp", "graphics/door_anims/frame_8359588_2.4bpp"); +const u8 gUnknown_8359688[256] = {}; +const u8 gUnknown_8359788[] = INCBIN_U8("graphics/door_anims/frame_8359788_1.4bpp", "graphics/door_anims/frame_8359788_2.4bpp", "graphics/door_anims/frame_8359788_3.4bpp", "graphics/door_anims/frame_8359788_4.4bpp"); +const u8 gUnknown_8359888[256] = {}; +const u8 gUnknown_8359988[] = INCBIN_U8("graphics/door_anims/frame_8359988_1.4bpp", "graphics/door_anims/frame_8359988_2.4bpp", "graphics/door_anims/frame_8359988_3.4bpp", "graphics/door_anims/frame_8359988_4.4bpp"); +const u8 gUnknown_8359A88[256] = {}; +const u8 gUnknown_8359B88[] = INCBIN_U8("graphics/door_anims/frame_8359B88_1.4bpp", "graphics/door_anims/frame_8359B88_2.4bpp", "graphics/door_anims/frame_8359B88_3.4bpp", "graphics/door_anims/frame_8359B88_4.4bpp"); +const u8 gUnknown_8359C88[32] = {}; +const u8 gUnknown_8359CA8[] = INCBIN_U8("graphics/door_anims/frame_8359CA8_1.4bpp", "graphics/door_anims/frame_8359CA8_2.4bpp", "graphics/door_anims/frame_8359CA8_3.4bpp"); +const u8 gUnknown_8359FA8[32] = {}; +const u8 gUnknown_8359FC8[] = INCBIN_U8("graphics/door_anims/frame_8359FC8_1.4bpp", "graphics/door_anims/frame_8359FC8_2.4bpp", "graphics/door_anims/frame_8359FC8_3.4bpp"); +const u8 gUnknown_835A148[32] = {}; +const u8 gUnknown_835A168[] = INCBIN_U8("graphics/door_anims/frame_835A168_1.4bpp", "graphics/door_anims/frame_835A168_2.4bpp", "graphics/door_anims/frame_835A168_3.4bpp"); +const u8 gUnknown_835A2E8[32] = {}; +const u8 gUnknown_835A308[] = INCBIN_U8("graphics/door_anims/frame_835A308_1.4bpp", "graphics/door_anims/frame_835A308_2.4bpp", "graphics/door_anims/frame_835A308_3.4bpp"); +const u8 gUnknown_835A488[32] = {}; +const u8 gUnknown_835A4A8[] = INCBIN_U8("graphics/door_anims/frame_835A4A8_1.4bpp", "graphics/door_anims/frame_835A4A8_2.4bpp", "graphics/door_anims/frame_835A4A8_3.4bpp"); +const u8 gUnknown_835A628[32] = {}; +const u8 gUnknown_835A648[] = INCBIN_U8("graphics/door_anims/frame_835A648_1.4bpp", "graphics/door_anims/frame_835A648_2.4bpp", "graphics/door_anims/frame_835A648_3.4bpp"); +const u8 gUnknown_835A7C8[32] = {}; +const u8 gUnknown_835A7E8[] = INCBIN_U8("graphics/door_anims/frame_835A7E8_1.4bpp", "graphics/door_anims/frame_835A7E8_2.4bpp", "graphics/door_anims/frame_835A7E8_3.4bpp"); +const u8 gUnknown_835A968[32] = {}; +const u8 gUnknown_835A988[] = INCBIN_U8("graphics/door_anims/frame_835A988_1.4bpp", "graphics/door_anims/frame_835A988_2.4bpp", "graphics/door_anims/frame_835A988_3.4bpp"); +const u8 gUnknown_835AB08[32] = {}; +const u8 gUnknown_835AB28[] = INCBIN_U8("graphics/door_anims/frame_835AB28_1.4bpp", "graphics/door_anims/frame_835AB28_2.4bpp", "graphics/door_anims/frame_835AB28_3.4bpp"); +const u8 gUnknown_835AE28[32] = {}; +const u8 gUnknown_835AE48[] = INCBIN_U8("graphics/door_anims/frame_835AE48_1.4bpp", "graphics/door_anims/frame_835AE48_2.4bpp", "graphics/door_anims/frame_835AE48_3.4bpp"); +const u8 gUnknown_835B148[32] = {}; +const u8 gUnknown_835B168[] = INCBIN_U8("graphics/door_anims/frame_835B168_1.4bpp", "graphics/door_anims/frame_835B168_2.4bpp", "graphics/door_anims/frame_835B168_3.4bpp"); +const u8 gUnknown_835B468[32] = {}; + +const struct DoorAnimFrame sDoorAnimFrames_OpenSmall[] = { + {4, 0xFFFF}, + {4, 0x0000}, + {4, 0x0080}, + {4, 0x0100}, + {} +}; + +const struct DoorAnimFrame sDoorAnimFrames_OpenLarge[] = { + {4, 0xFFFF}, + {4, 0x0000}, + {4, 0x0100}, + {4, 0x0200}, + {} +}; + +const struct DoorAnimFrame sDoorAnimFrames_CloseSmall[] = { + {4, 0x0100}, + {4, 0x0080}, + {4, 0x0000}, + {4, 0xFFFF}, + {} +}; + +const struct DoorAnimFrame sDoorAnimFrames_CloseLarge[] = { + {4, 0x0200}, + {4, 0x0100}, + {4, 0x0000}, + {4, 0xFFFF}, + {} +}; + +const u8 gUnknown_835B4D8[] = {0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2}; +const u8 gUnknown_835B4E0[] = {0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3}; +const u8 gUnknown_835B4E8[] = {0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3}; +const u8 gUnknown_835B4F0[] = {0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8}; +const u8 gUnknown_835B4F8[] = {0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa}; +const u8 gUnknown_835B500[] = {0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8}; +const u8 gUnknown_835B508[] = {0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8}; +const u8 gUnknown_835B510[] = {0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8}; +const u8 gUnknown_835B518[] = {0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3}; +const u8 gUnknown_835B520[] = {0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc}; +const u8 gUnknown_835B528[] = {0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9}; +const u8 gUnknown_835B530[] = {0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9}; +const u8 gUnknown_835B538[] = {0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9}; +const u8 gUnknown_835B540[] = {0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3}; +const u8 gUnknown_835B548[] = {0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8}; +const u8 gUnknown_835B550[] = {0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9}; +const u8 gUnknown_835B558[] = {0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3}; +const u8 gUnknown_835B560[] = {0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8}; +const u8 gUnknown_835B568[] = {0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8}; +const u8 gUnknown_835B570[] = {0xc, 0xc, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2}; +const u8 gUnknown_835B578[] = {0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7}; +const u8 gUnknown_835B580[] = {0x8, 0x8, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2}; +const u8 gUnknown_835B588[] = {0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5}; +const u8 gUnknown_835B590[] = {0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3}; +const u8 gUnknown_835B598[] = {0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3}; +const u8 gUnknown_835B5A0[] = {0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5}; +const u8 gUnknown_835B5A8[] = {0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3}; +const u8 gUnknown_835B5B0[] = {0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa}; +const u8 gUnknown_835B5B8[] = {0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5}; +const u8 gUnknown_835B5C0[] = {0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8}; +const u8 gUnknown_835B5C8[] = {0x8, 0x8, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2}; +const u8 gUnknown_835B5D0[] = {0xb, 0xb, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2}; + +const struct DoorGraphics sDoorGraphics[] = { + {0x03d, 0, 0, gUnknown_8353088, gUnknown_835B4D8}, + {0x062, 1, 0, gUnknown_8353228, gUnknown_835B4E0}, + {0x15b, 1, 0, gUnknown_83533C8, gUnknown_835B4E8}, + {0x2a3, 0, 0, gUnknown_8353568, gUnknown_835B4F0}, + {0x2ac, 0, 0, gUnknown_8353708, gUnknown_835B4F8}, + {0x299, 0, 0, gUnknown_83538A8, gUnknown_835B500}, + {0x2ce, 0, 0, gUnknown_8353A48, gUnknown_835B508}, + {0x284, 0, 0, gUnknown_8353BE8, gUnknown_835B510}, + {0x2bc, 1, 0, gUnknown_8353D88, gUnknown_835B518}, + {0x298, 0, 0, gUnknown_8353F28, gUnknown_835B520}, + {0x2a2, 0, 0, gUnknown_83540C8, gUnknown_835B528}, + {0x29e, 0, 0, gUnknown_8354268, gUnknown_835B530}, + {0x2e1, 0, 0, gUnknown_8354408, gUnknown_835B538}, + {0x294, 1, 0, gUnknown_83545A8, gUnknown_835B540}, + {0x2bf, 0, 0, gUnknown_8354748, gUnknown_835B548}, + {0x2d2, 1, 0, gUnknown_83548E8, gUnknown_835B550}, + {0x2ad, 0, 0, gUnknown_8354A88, gUnknown_835B558}, + {0x297, 0, 0, gUnknown_8359FC8, gUnknown_835B588}, + {0x29b, 1, 0, gUnknown_835A168, gUnknown_835B590}, + {0x2eb, 0, 0, gUnknown_835A308, gUnknown_835B598}, + {0x29a, 0, 0, gUnknown_835A4A8, gUnknown_835B5A0}, + {0x2b9, 0, 0, gUnknown_835A648, gUnknown_835B5A8}, + {0x2af, 0, 0, gUnknown_835A7E8, gUnknown_835B5B0}, + {0x30c, 0, 0, gUnknown_835A988, gUnknown_835B5B8}, + {0x28d, 1, 1, gUnknown_8354C28, gUnknown_835B560}, + {0x2de, 1, 1, gUnknown_8354F48, gUnknown_835B568}, + {0x2ab, 1, 1, gUnknown_8355268, gUnknown_835B570}, + {0x281, 0, 1, gUnknown_8355588, gUnknown_835B578}, + {0x2e2, 1, 1, gUnknown_8359CA8, gUnknown_835B580}, + {0x296, 1, 1, gUnknown_835AB28, gUnknown_835B5C0}, + {0x2c3, 1, 1, gUnknown_835AE48, gUnknown_835B5C8}, + {0x356, 1, 1, gUnknown_835B168, gUnknown_835B5D0}, + {} +}; static void UpdateDrawDoorFrame(const struct DoorGraphics * gfx, const struct DoorAnimFrame * frames, int x, int y) { -- cgit v1.2.3 From 9c27830791ba648ce0c470eac53a100e508247b9 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 12 Nov 2019 14:36:06 -0500 Subject: static rodata --- src/field_door.c | 466 +++++++++++++++++++++++++++---------------------------- 1 file changed, 233 insertions(+), 233 deletions(-) diff --git a/src/field_door.c b/src/field_door.c index a06781834..cbf7a79ea 100644 --- a/src/field_door.c +++ b/src/field_door.c @@ -28,204 +28,204 @@ static bool32 PlayDoorAnimationFrame(const struct DoorGraphics * gfx, const stru static const struct DoorAnimFrame * SeekToEndOfDoorAnim(const struct DoorAnimFrame * frames); static s8 GetDoorOpenType(const struct DoorGraphics * gfx, int x, int y); -const u8 gUnknown_8353088[] = INCBIN_U8("graphics/door_anims/frame_8353088_1.4bpp", "graphics/door_anims/frame_8353088_2.4bpp", "graphics/door_anims/frame_8353088_3.4bpp"); -const u8 gUnknown_8353208[32] = {}; -const u8 gUnknown_8353228[] = INCBIN_U8("graphics/door_anims/frame_8353228_1.4bpp", "graphics/door_anims/frame_8353228_2.4bpp", "graphics/door_anims/frame_8353228_3.4bpp"); -const u8 gUnknown_83533A8[32] = {}; -const u8 gUnknown_83533C8[] = INCBIN_U8("graphics/door_anims/frame_83533C8_1.4bpp", "graphics/door_anims/frame_83533C8_2.4bpp", "graphics/door_anims/frame_83533C8_3.4bpp"); -const u8 gUnknown_8353548[32] = {}; -const u8 gUnknown_8353568[] = INCBIN_U8("graphics/door_anims/frame_8353568_1.4bpp", "graphics/door_anims/frame_8353568_2.4bpp", "graphics/door_anims/frame_8353568_3.4bpp"); -const u8 gUnknown_83536E8[32] = {}; -const u8 gUnknown_8353708[] = INCBIN_U8("graphics/door_anims/frame_8353708_1.4bpp", "graphics/door_anims/frame_8353708_2.4bpp", "graphics/door_anims/frame_8353708_3.4bpp"); -const u8 gUnknown_8353888[32] = {}; -const u8 gUnknown_83538A8[] = INCBIN_U8("graphics/door_anims/frame_83538A8_1.4bpp", "graphics/door_anims/frame_83538A8_2.4bpp", "graphics/door_anims/frame_83538A8_3.4bpp"); -const u8 gUnknown_8353A28[32] = {}; -const u8 gUnknown_8353A48[] = INCBIN_U8("graphics/door_anims/frame_8353A48_1.4bpp", "graphics/door_anims/frame_8353A48_2.4bpp", "graphics/door_anims/frame_8353A48_3.4bpp"); -const u8 gUnknown_8353BC8[32] = {}; -const u8 gUnknown_8353BE8[] = INCBIN_U8("graphics/door_anims/frame_8353BE8_1.4bpp", "graphics/door_anims/frame_8353BE8_2.4bpp", "graphics/door_anims/frame_8353BE8_3.4bpp"); -const u8 gUnknown_8353D68[32] = {}; -const u8 gUnknown_8353D88[] = INCBIN_U8("graphics/door_anims/frame_8353D88_1.4bpp", "graphics/door_anims/frame_8353D88_2.4bpp", "graphics/door_anims/frame_8353D88_3.4bpp"); -const u8 gUnknown_8353F08[32] = {}; -const u8 gUnknown_8353F28[] = INCBIN_U8("graphics/door_anims/frame_8353F28_1.4bpp", "graphics/door_anims/frame_8353F28_2.4bpp", "graphics/door_anims/frame_8353F28_3.4bpp"); -const u8 gUnknown_83540A8[32] = {}; -const u8 gUnknown_83540C8[] = INCBIN_U8("graphics/door_anims/frame_83540C8_1.4bpp", "graphics/door_anims/frame_83540C8_2.4bpp", "graphics/door_anims/frame_83540C8_3.4bpp"); -const u8 gUnknown_8354248[32] = {}; -const u8 gUnknown_8354268[] = INCBIN_U8("graphics/door_anims/frame_8354268_1.4bpp", "graphics/door_anims/frame_8354268_2.4bpp", "graphics/door_anims/frame_8354268_3.4bpp"); -const u8 gUnknown_83543E8[32] = {}; -const u8 gUnknown_8354408[] = INCBIN_U8("graphics/door_anims/frame_8354408_1.4bpp", "graphics/door_anims/frame_8354408_2.4bpp", "graphics/door_anims/frame_8354408_3.4bpp"); -const u8 gUnknown_8354588[32] = {}; -const u8 gUnknown_83545A8[] = INCBIN_U8("graphics/door_anims/frame_83545A8_1.4bpp", "graphics/door_anims/frame_83545A8_2.4bpp", "graphics/door_anims/frame_83545A8_3.4bpp"); -const u8 gUnknown_8354728[32] = {}; -const u8 gUnknown_8354748[] = INCBIN_U8("graphics/door_anims/frame_8354748_1.4bpp", "graphics/door_anims/frame_8354748_2.4bpp", "graphics/door_anims/frame_8354748_3.4bpp"); -const u8 gUnknown_83548C8[32] = {}; -const u8 gUnknown_83548E8[] = INCBIN_U8("graphics/door_anims/frame_83548E8_1.4bpp", "graphics/door_anims/frame_83548E8_2.4bpp", "graphics/door_anims/frame_83548E8_3.4bpp"); -const u8 gUnknown_8354A68[32] = {}; -const u8 gUnknown_8354A88[] = INCBIN_U8("graphics/door_anims/frame_8354A88_1.4bpp", "graphics/door_anims/frame_8354A88_2.4bpp", "graphics/door_anims/frame_8354A88_3.4bpp"); -const u8 gUnknown_8354C08[32] = {}; -const u8 gUnknown_8354C28[] = INCBIN_U8("graphics/door_anims/frame_8354C28_1.4bpp", "graphics/door_anims/frame_8354C28_2.4bpp", "graphics/door_anims/frame_8354C28_3.4bpp"); -const u8 gUnknown_8354F28[32] = {}; -const u8 gUnknown_8354F48[] = INCBIN_U8("graphics/door_anims/frame_8354F48_1.4bpp", "graphics/door_anims/frame_8354F48_2.4bpp", "graphics/door_anims/frame_8354F48_3.4bpp"); -const u8 gUnknown_8355248[32] = {}; -const u8 gUnknown_8355268[] = INCBIN_U8("graphics/door_anims/frame_8355268_1.4bpp", "graphics/door_anims/frame_8355268_2.4bpp", "graphics/door_anims/frame_8355268_3.4bpp"); -const u8 gUnknown_8355568[32] = {}; -const u8 gUnknown_8355588[] = INCBIN_U8("graphics/door_anims/frame_8355588_1.4bpp", "graphics/door_anims/frame_8355588_2.4bpp", "graphics/door_anims/frame_8355588_3.4bpp"); -const u8 gUnknown_8355888[32] = {}; -const u8 gUnknown_83558A8[256] = {}; -const u8 gUnknown_83559A8[256] = {}; -const u8 gUnknown_8355AA8[256] = {}; -const u8 gUnknown_8355BA8[32] = {}; -const u8 gUnknown_8355BC8[256] = {}; -const u8 gUnknown_8355CC8[256] = {}; -const u8 gUnknown_8355DC8[256] = {}; -const u8 gUnknown_8355EC8[32] = {}; -const u8 gUnknown_8355EE8[256] = {}; -const u8 gUnknown_8355FE8[256] = {}; -const u8 gUnknown_83560E8[256] = {}; -const u8 gUnknown_83561E8[32] = {}; -const u8 gUnknown_8356208[256] = {}; -const u8 gUnknown_8356308[256] = {}; -const u8 gUnknown_8356408[256] = {}; -const u8 gUnknown_8356508[32] = {}; -const u8 gUnknown_8356528[256] = {}; -const u8 gUnknown_8356628[256] = {}; -const u8 gUnknown_8356728[256] = {}; -const u8 gUnknown_8356828[32] = {}; -const u8 gUnknown_8356848[256] = {}; -const u8 gUnknown_8356948[256] = {}; -const u8 gUnknown_8356A48[256] = {}; -const u8 gUnknown_8356B48[32] = {}; -const u8 gUnknown_8356B68[256] = {}; -const u8 gUnknown_8356C68[256] = {}; -const u8 gUnknown_8356D68[256] = {}; -const u8 gUnknown_8356E68[32] = {}; -const u8 gUnknown_8356E88[128] = {}; -const u8 gUnknown_8356F08[128] = {}; -const u8 gUnknown_8356F88[128] = {}; -const u8 gUnknown_8357008[32] = {}; -const u8 gUnknown_8357028[128] = {}; -const u8 gUnknown_83570A8[128] = {}; -const u8 gUnknown_8357128[128] = {}; -const u8 gUnknown_83571A8[32] = {}; -const u8 gUnknown_83571C8[128] = {}; -const u8 gUnknown_8357248[128] = {}; -const u8 gUnknown_83572C8[128] = {}; -const u8 gUnknown_8357348[32] = {}; -const u8 gUnknown_8357368[128] = {}; -const u8 gUnknown_83573E8[128] = {}; -const u8 gUnknown_8357468[128] = {}; -const u8 gUnknown_83574E8[32] = {}; -const u8 gUnknown_8357508[128] = {}; -const u8 gUnknown_8357588[128] = {}; -const u8 gUnknown_8357608[128] = {}; -const u8 gUnknown_8357688[32] = {}; -const u8 gUnknown_83576A8[128] = {}; -const u8 gUnknown_8357728[128] = {}; -const u8 gUnknown_83577A8[128] = {}; -const u8 gUnknown_8357828[32] = {}; -const u8 gUnknown_8357848[128] = {}; -const u8 gUnknown_83578C8[128] = {}; -const u8 gUnknown_8357948[128] = {}; -const u8 gUnknown_83579C8[32] = {}; -const u8 gUnknown_83579E8[128] = {}; -const u8 gUnknown_8357A68[128] = {}; -const u8 gUnknown_8357AE8[128] = {}; -const u8 gUnknown_8357B68[32] = {}; -const u8 gUnknown_8357B88[128] = {}; -const u8 gUnknown_8357C08[128] = {}; -const u8 gUnknown_8357C88[128] = {}; -const u8 gUnknown_8357D08[32] = {}; -const u8 gUnknown_8357D28[128] = {}; -const u8 gUnknown_8357DA8[128] = {}; -const u8 gUnknown_8357E28[128] = {}; -const u8 gUnknown_8357EA8[32] = {}; -const u8 gUnknown_8357EC8[128] = {}; -const u8 gUnknown_8357F48[128] = {}; -const u8 gUnknown_8357FC8[128] = {}; -const u8 gUnknown_8358048[32] = {}; -const u8 gUnknown_8358068[128] = {}; -const u8 gUnknown_83580E8[128] = {}; -const u8 gUnknown_8358168[128] = {}; -const u8 gUnknown_83581E8[32] = {}; -const u8 gUnknown_8358208[128] = {}; -const u8 gUnknown_8358288[128] = {}; -const u8 gUnknown_8358308[128] = {}; -const u8 gUnknown_8358388[32] = {}; -const u8 gUnknown_83583A8[128] = {}; -const u8 gUnknown_8358428[128] = {}; -const u8 gUnknown_83584A8[128] = {}; -const u8 gUnknown_8358528[32] = {}; -const u8 gUnknown_8358548[128] = {}; -const u8 gUnknown_83585C8[128] = {}; -const u8 gUnknown_8358648[128] = {}; -const u8 gUnknown_83586C8[32] = {}; -const u8 gUnknown_83586E8[128] = {}; -const u8 gUnknown_8358768[128] = {}; -const u8 gUnknown_83587E8[128] = {}; -const u8 gUnknown_8358868[32] = {}; -const u8 gUnknown_8358888[128] = {}; -const u8 gUnknown_8358908[128] = {}; -const u8 gUnknown_8358988[128] = {}; -const u8 gUnknown_8358A08[32] = {}; -const u8 gUnknown_8358A28[128] = {}; -const u8 gUnknown_8358AA8[128] = {}; -const u8 gUnknown_8358B28[128] = {}; -const u8 gUnknown_8358BA8[32] = {}; -const u8 gUnknown_8358BC8[128] = {}; -const u8 gUnknown_8358C48[128] = {}; -const u8 gUnknown_8358CC8[128] = {}; -const u8 gUnknown_8358D48[32] = {}; -const u8 gUnknown_8358D68[128] = {}; -const u8 gUnknown_8358DE8[128] = {}; -const u8 gUnknown_8358E68[128] = {}; -const u8 gUnknown_8358EE8[32] = {}; -const u8 gUnknown_8358F08[128] = {}; -const u8 gUnknown_8358F88[128] = {}; -const u8 gUnknown_8359008[128] = {}; -const u8 gUnknown_8359088[32] = {}; -const u8 gUnknown_83590A8[128] = {}; -const u8 gUnknown_8359128[128] = {}; -const u8 gUnknown_83591A8[128] = {}; -const u8 gUnknown_8359228[32] = {}; -const u8 gUnknown_8359248[128] = {}; -const u8 gUnknown_83592C8[128] = {}; -const u8 gUnknown_8359348[128] = {}; -const u8 gUnknown_83593C8[32] = {}; -const u8 gUnknown_83593E8[128] = {}; -const u8 gUnknown_8359468[128] = {}; -const u8 gUnknown_83594E8[128] = {}; -const u8 gUnknown_8359568[32] = {}; -const u8 gUnknown_8359588[] = INCBIN_U8("graphics/door_anims/frame_8359588_1.4bpp", "graphics/door_anims/frame_8359588_2.4bpp"); -const u8 gUnknown_8359688[256] = {}; -const u8 gUnknown_8359788[] = INCBIN_U8("graphics/door_anims/frame_8359788_1.4bpp", "graphics/door_anims/frame_8359788_2.4bpp", "graphics/door_anims/frame_8359788_3.4bpp", "graphics/door_anims/frame_8359788_4.4bpp"); -const u8 gUnknown_8359888[256] = {}; -const u8 gUnknown_8359988[] = INCBIN_U8("graphics/door_anims/frame_8359988_1.4bpp", "graphics/door_anims/frame_8359988_2.4bpp", "graphics/door_anims/frame_8359988_3.4bpp", "graphics/door_anims/frame_8359988_4.4bpp"); -const u8 gUnknown_8359A88[256] = {}; -const u8 gUnknown_8359B88[] = INCBIN_U8("graphics/door_anims/frame_8359B88_1.4bpp", "graphics/door_anims/frame_8359B88_2.4bpp", "graphics/door_anims/frame_8359B88_3.4bpp", "graphics/door_anims/frame_8359B88_4.4bpp"); -const u8 gUnknown_8359C88[32] = {}; -const u8 gUnknown_8359CA8[] = INCBIN_U8("graphics/door_anims/frame_8359CA8_1.4bpp", "graphics/door_anims/frame_8359CA8_2.4bpp", "graphics/door_anims/frame_8359CA8_3.4bpp"); -const u8 gUnknown_8359FA8[32] = {}; -const u8 gUnknown_8359FC8[] = INCBIN_U8("graphics/door_anims/frame_8359FC8_1.4bpp", "graphics/door_anims/frame_8359FC8_2.4bpp", "graphics/door_anims/frame_8359FC8_3.4bpp"); -const u8 gUnknown_835A148[32] = {}; -const u8 gUnknown_835A168[] = INCBIN_U8("graphics/door_anims/frame_835A168_1.4bpp", "graphics/door_anims/frame_835A168_2.4bpp", "graphics/door_anims/frame_835A168_3.4bpp"); -const u8 gUnknown_835A2E8[32] = {}; -const u8 gUnknown_835A308[] = INCBIN_U8("graphics/door_anims/frame_835A308_1.4bpp", "graphics/door_anims/frame_835A308_2.4bpp", "graphics/door_anims/frame_835A308_3.4bpp"); -const u8 gUnknown_835A488[32] = {}; -const u8 gUnknown_835A4A8[] = INCBIN_U8("graphics/door_anims/frame_835A4A8_1.4bpp", "graphics/door_anims/frame_835A4A8_2.4bpp", "graphics/door_anims/frame_835A4A8_3.4bpp"); -const u8 gUnknown_835A628[32] = {}; -const u8 gUnknown_835A648[] = INCBIN_U8("graphics/door_anims/frame_835A648_1.4bpp", "graphics/door_anims/frame_835A648_2.4bpp", "graphics/door_anims/frame_835A648_3.4bpp"); -const u8 gUnknown_835A7C8[32] = {}; -const u8 gUnknown_835A7E8[] = INCBIN_U8("graphics/door_anims/frame_835A7E8_1.4bpp", "graphics/door_anims/frame_835A7E8_2.4bpp", "graphics/door_anims/frame_835A7E8_3.4bpp"); -const u8 gUnknown_835A968[32] = {}; -const u8 gUnknown_835A988[] = INCBIN_U8("graphics/door_anims/frame_835A988_1.4bpp", "graphics/door_anims/frame_835A988_2.4bpp", "graphics/door_anims/frame_835A988_3.4bpp"); -const u8 gUnknown_835AB08[32] = {}; -const u8 gUnknown_835AB28[] = INCBIN_U8("graphics/door_anims/frame_835AB28_1.4bpp", "graphics/door_anims/frame_835AB28_2.4bpp", "graphics/door_anims/frame_835AB28_3.4bpp"); -const u8 gUnknown_835AE28[32] = {}; -const u8 gUnknown_835AE48[] = INCBIN_U8("graphics/door_anims/frame_835AE48_1.4bpp", "graphics/door_anims/frame_835AE48_2.4bpp", "graphics/door_anims/frame_835AE48_3.4bpp"); -const u8 gUnknown_835B148[32] = {}; -const u8 gUnknown_835B168[] = INCBIN_U8("graphics/door_anims/frame_835B168_1.4bpp", "graphics/door_anims/frame_835B168_2.4bpp", "graphics/door_anims/frame_835B168_3.4bpp"); -const u8 gUnknown_835B468[32] = {}; +static const u8 gUnknown_8353088[] = INCBIN_U8("graphics/door_anims/frame_8353088_1.4bpp", "graphics/door_anims/frame_8353088_2.4bpp", "graphics/door_anims/frame_8353088_3.4bpp"); +static const u8 gUnknown_8353208[32] = {}; +static const u8 gUnknown_8353228[] = INCBIN_U8("graphics/door_anims/frame_8353228_1.4bpp", "graphics/door_anims/frame_8353228_2.4bpp", "graphics/door_anims/frame_8353228_3.4bpp"); +static const u8 gUnknown_83533A8[32] = {}; +static const u8 gUnknown_83533C8[] = INCBIN_U8("graphics/door_anims/frame_83533C8_1.4bpp", "graphics/door_anims/frame_83533C8_2.4bpp", "graphics/door_anims/frame_83533C8_3.4bpp"); +static const u8 gUnknown_8353548[32] = {}; +static const u8 gUnknown_8353568[] = INCBIN_U8("graphics/door_anims/frame_8353568_1.4bpp", "graphics/door_anims/frame_8353568_2.4bpp", "graphics/door_anims/frame_8353568_3.4bpp"); +static const u8 gUnknown_83536E8[32] = {}; +static const u8 gUnknown_8353708[] = INCBIN_U8("graphics/door_anims/frame_8353708_1.4bpp", "graphics/door_anims/frame_8353708_2.4bpp", "graphics/door_anims/frame_8353708_3.4bpp"); +static const u8 gUnknown_8353888[32] = {}; +static const u8 gUnknown_83538A8[] = INCBIN_U8("graphics/door_anims/frame_83538A8_1.4bpp", "graphics/door_anims/frame_83538A8_2.4bpp", "graphics/door_anims/frame_83538A8_3.4bpp"); +static const u8 gUnknown_8353A28[32] = {}; +static const u8 gUnknown_8353A48[] = INCBIN_U8("graphics/door_anims/frame_8353A48_1.4bpp", "graphics/door_anims/frame_8353A48_2.4bpp", "graphics/door_anims/frame_8353A48_3.4bpp"); +static const u8 gUnknown_8353BC8[32] = {}; +static const u8 gUnknown_8353BE8[] = INCBIN_U8("graphics/door_anims/frame_8353BE8_1.4bpp", "graphics/door_anims/frame_8353BE8_2.4bpp", "graphics/door_anims/frame_8353BE8_3.4bpp"); +static const u8 gUnknown_8353D68[32] = {}; +static const u8 gUnknown_8353D88[] = INCBIN_U8("graphics/door_anims/frame_8353D88_1.4bpp", "graphics/door_anims/frame_8353D88_2.4bpp", "graphics/door_anims/frame_8353D88_3.4bpp"); +static const u8 gUnknown_8353F08[32] = {}; +static const u8 gUnknown_8353F28[] = INCBIN_U8("graphics/door_anims/frame_8353F28_1.4bpp", "graphics/door_anims/frame_8353F28_2.4bpp", "graphics/door_anims/frame_8353F28_3.4bpp"); +static const u8 gUnknown_83540A8[32] = {}; +static const u8 gUnknown_83540C8[] = INCBIN_U8("graphics/door_anims/frame_83540C8_1.4bpp", "graphics/door_anims/frame_83540C8_2.4bpp", "graphics/door_anims/frame_83540C8_3.4bpp"); +static const u8 gUnknown_8354248[32] = {}; +static const u8 gUnknown_8354268[] = INCBIN_U8("graphics/door_anims/frame_8354268_1.4bpp", "graphics/door_anims/frame_8354268_2.4bpp", "graphics/door_anims/frame_8354268_3.4bpp"); +static const u8 gUnknown_83543E8[32] = {}; +static const u8 gUnknown_8354408[] = INCBIN_U8("graphics/door_anims/frame_8354408_1.4bpp", "graphics/door_anims/frame_8354408_2.4bpp", "graphics/door_anims/frame_8354408_3.4bpp"); +static const u8 gUnknown_8354588[32] = {}; +static const u8 gUnknown_83545A8[] = INCBIN_U8("graphics/door_anims/frame_83545A8_1.4bpp", "graphics/door_anims/frame_83545A8_2.4bpp", "graphics/door_anims/frame_83545A8_3.4bpp"); +static const u8 gUnknown_8354728[32] = {}; +static const u8 gUnknown_8354748[] = INCBIN_U8("graphics/door_anims/frame_8354748_1.4bpp", "graphics/door_anims/frame_8354748_2.4bpp", "graphics/door_anims/frame_8354748_3.4bpp"); +static const u8 gUnknown_83548C8[32] = {}; +static const u8 gUnknown_83548E8[] = INCBIN_U8("graphics/door_anims/frame_83548E8_1.4bpp", "graphics/door_anims/frame_83548E8_2.4bpp", "graphics/door_anims/frame_83548E8_3.4bpp"); +static const u8 gUnknown_8354A68[32] = {}; +static const u8 gUnknown_8354A88[] = INCBIN_U8("graphics/door_anims/frame_8354A88_1.4bpp", "graphics/door_anims/frame_8354A88_2.4bpp", "graphics/door_anims/frame_8354A88_3.4bpp"); +static const u8 gUnknown_8354C08[32] = {}; +static const u8 gUnknown_8354C28[] = INCBIN_U8("graphics/door_anims/frame_8354C28_1.4bpp", "graphics/door_anims/frame_8354C28_2.4bpp", "graphics/door_anims/frame_8354C28_3.4bpp"); +static const u8 gUnknown_8354F28[32] = {}; +static const u8 gUnknown_8354F48[] = INCBIN_U8("graphics/door_anims/frame_8354F48_1.4bpp", "graphics/door_anims/frame_8354F48_2.4bpp", "graphics/door_anims/frame_8354F48_3.4bpp"); +static const u8 gUnknown_8355248[32] = {}; +static const u8 gUnknown_8355268[] = INCBIN_U8("graphics/door_anims/frame_8355268_1.4bpp", "graphics/door_anims/frame_8355268_2.4bpp", "graphics/door_anims/frame_8355268_3.4bpp"); +static const u8 gUnknown_8355568[32] = {}; +static const u8 gUnknown_8355588[] = INCBIN_U8("graphics/door_anims/frame_8355588_1.4bpp", "graphics/door_anims/frame_8355588_2.4bpp", "graphics/door_anims/frame_8355588_3.4bpp"); +static const u8 gUnknown_8355888[32] = {}; +static const u8 gUnknown_83558A8[256] = {}; +static const u8 gUnknown_83559A8[256] = {}; +static const u8 gUnknown_8355AA8[256] = {}; +static const u8 gUnknown_8355BA8[32] = {}; +static const u8 gUnknown_8355BC8[256] = {}; +static const u8 gUnknown_8355CC8[256] = {}; +static const u8 gUnknown_8355DC8[256] = {}; +static const u8 gUnknown_8355EC8[32] = {}; +static const u8 gUnknown_8355EE8[256] = {}; +static const u8 gUnknown_8355FE8[256] = {}; +static const u8 gUnknown_83560E8[256] = {}; +static const u8 gUnknown_83561E8[32] = {}; +static const u8 gUnknown_8356208[256] = {}; +static const u8 gUnknown_8356308[256] = {}; +static const u8 gUnknown_8356408[256] = {}; +static const u8 gUnknown_8356508[32] = {}; +static const u8 gUnknown_8356528[256] = {}; +static const u8 gUnknown_8356628[256] = {}; +static const u8 gUnknown_8356728[256] = {}; +static const u8 gUnknown_8356828[32] = {}; +static const u8 gUnknown_8356848[256] = {}; +static const u8 gUnknown_8356948[256] = {}; +static const u8 gUnknown_8356A48[256] = {}; +static const u8 gUnknown_8356B48[32] = {}; +static const u8 gUnknown_8356B68[256] = {}; +static const u8 gUnknown_8356C68[256] = {}; +static const u8 gUnknown_8356D68[256] = {}; +static const u8 gUnknown_8356E68[32] = {}; +static const u8 gUnknown_8356E88[128] = {}; +static const u8 gUnknown_8356F08[128] = {}; +static const u8 gUnknown_8356F88[128] = {}; +static const u8 gUnknown_8357008[32] = {}; +static const u8 gUnknown_8357028[128] = {}; +static const u8 gUnknown_83570A8[128] = {}; +static const u8 gUnknown_8357128[128] = {}; +static const u8 gUnknown_83571A8[32] = {}; +static const u8 gUnknown_83571C8[128] = {}; +static const u8 gUnknown_8357248[128] = {}; +static const u8 gUnknown_83572C8[128] = {}; +static const u8 gUnknown_8357348[32] = {}; +static const u8 gUnknown_8357368[128] = {}; +static const u8 gUnknown_83573E8[128] = {}; +static const u8 gUnknown_8357468[128] = {}; +static const u8 gUnknown_83574E8[32] = {}; +static const u8 gUnknown_8357508[128] = {}; +static const u8 gUnknown_8357588[128] = {}; +static const u8 gUnknown_8357608[128] = {}; +static const u8 gUnknown_8357688[32] = {}; +static const u8 gUnknown_83576A8[128] = {}; +static const u8 gUnknown_8357728[128] = {}; +static const u8 gUnknown_83577A8[128] = {}; +static const u8 gUnknown_8357828[32] = {}; +static const u8 gUnknown_8357848[128] = {}; +static const u8 gUnknown_83578C8[128] = {}; +static const u8 gUnknown_8357948[128] = {}; +static const u8 gUnknown_83579C8[32] = {}; +static const u8 gUnknown_83579E8[128] = {}; +static const u8 gUnknown_8357A68[128] = {}; +static const u8 gUnknown_8357AE8[128] = {}; +static const u8 gUnknown_8357B68[32] = {}; +static const u8 gUnknown_8357B88[128] = {}; +static const u8 gUnknown_8357C08[128] = {}; +static const u8 gUnknown_8357C88[128] = {}; +static const u8 gUnknown_8357D08[32] = {}; +static const u8 gUnknown_8357D28[128] = {}; +static const u8 gUnknown_8357DA8[128] = {}; +static const u8 gUnknown_8357E28[128] = {}; +static const u8 gUnknown_8357EA8[32] = {}; +static const u8 gUnknown_8357EC8[128] = {}; +static const u8 gUnknown_8357F48[128] = {}; +static const u8 gUnknown_8357FC8[128] = {}; +static const u8 gUnknown_8358048[32] = {}; +static const u8 gUnknown_8358068[128] = {}; +static const u8 gUnknown_83580E8[128] = {}; +static const u8 gUnknown_8358168[128] = {}; +static const u8 gUnknown_83581E8[32] = {}; +static const u8 gUnknown_8358208[128] = {}; +static const u8 gUnknown_8358288[128] = {}; +static const u8 gUnknown_8358308[128] = {}; +static const u8 gUnknown_8358388[32] = {}; +static const u8 gUnknown_83583A8[128] = {}; +static const u8 gUnknown_8358428[128] = {}; +static const u8 gUnknown_83584A8[128] = {}; +static const u8 gUnknown_8358528[32] = {}; +static const u8 gUnknown_8358548[128] = {}; +static const u8 gUnknown_83585C8[128] = {}; +static const u8 gUnknown_8358648[128] = {}; +static const u8 gUnknown_83586C8[32] = {}; +static const u8 gUnknown_83586E8[128] = {}; +static const u8 gUnknown_8358768[128] = {}; +static const u8 gUnknown_83587E8[128] = {}; +static const u8 gUnknown_8358868[32] = {}; +static const u8 gUnknown_8358888[128] = {}; +static const u8 gUnknown_8358908[128] = {}; +static const u8 gUnknown_8358988[128] = {}; +static const u8 gUnknown_8358A08[32] = {}; +static const u8 gUnknown_8358A28[128] = {}; +static const u8 gUnknown_8358AA8[128] = {}; +static const u8 gUnknown_8358B28[128] = {}; +static const u8 gUnknown_8358BA8[32] = {}; +static const u8 gUnknown_8358BC8[128] = {}; +static const u8 gUnknown_8358C48[128] = {}; +static const u8 gUnknown_8358CC8[128] = {}; +static const u8 gUnknown_8358D48[32] = {}; +static const u8 gUnknown_8358D68[128] = {}; +static const u8 gUnknown_8358DE8[128] = {}; +static const u8 gUnknown_8358E68[128] = {}; +static const u8 gUnknown_8358EE8[32] = {}; +static const u8 gUnknown_8358F08[128] = {}; +static const u8 gUnknown_8358F88[128] = {}; +static const u8 gUnknown_8359008[128] = {}; +static const u8 gUnknown_8359088[32] = {}; +static const u8 gUnknown_83590A8[128] = {}; +static const u8 gUnknown_8359128[128] = {}; +static const u8 gUnknown_83591A8[128] = {}; +static const u8 gUnknown_8359228[32] = {}; +static const u8 gUnknown_8359248[128] = {}; +static const u8 gUnknown_83592C8[128] = {}; +static const u8 gUnknown_8359348[128] = {}; +static const u8 gUnknown_83593C8[32] = {}; +static const u8 gUnknown_83593E8[128] = {}; +static const u8 gUnknown_8359468[128] = {}; +static const u8 gUnknown_83594E8[128] = {}; +static const u8 gUnknown_8359568[32] = {}; +static const u8 gUnknown_8359588[] = INCBIN_U8("graphics/door_anims/frame_8359588_1.4bpp", "graphics/door_anims/frame_8359588_2.4bpp"); +static const u8 gUnknown_8359688[256] = {}; +static const u8 gUnknown_8359788[] = INCBIN_U8("graphics/door_anims/frame_8359788_1.4bpp", "graphics/door_anims/frame_8359788_2.4bpp", "graphics/door_anims/frame_8359788_3.4bpp", "graphics/door_anims/frame_8359788_4.4bpp"); +static const u8 gUnknown_8359888[256] = {}; +static const u8 gUnknown_8359988[] = INCBIN_U8("graphics/door_anims/frame_8359988_1.4bpp", "graphics/door_anims/frame_8359988_2.4bpp", "graphics/door_anims/frame_8359988_3.4bpp", "graphics/door_anims/frame_8359988_4.4bpp"); +static const u8 gUnknown_8359A88[256] = {}; +static const u8 gUnknown_8359B88[] = INCBIN_U8("graphics/door_anims/frame_8359B88_1.4bpp", "graphics/door_anims/frame_8359B88_2.4bpp", "graphics/door_anims/frame_8359B88_3.4bpp", "graphics/door_anims/frame_8359B88_4.4bpp"); +static const u8 gUnknown_8359C88[32] = {}; +static const u8 gUnknown_8359CA8[] = INCBIN_U8("graphics/door_anims/frame_8359CA8_1.4bpp", "graphics/door_anims/frame_8359CA8_2.4bpp", "graphics/door_anims/frame_8359CA8_3.4bpp"); +static const u8 gUnknown_8359FA8[32] = {}; +static const u8 gUnknown_8359FC8[] = INCBIN_U8("graphics/door_anims/frame_8359FC8_1.4bpp", "graphics/door_anims/frame_8359FC8_2.4bpp", "graphics/door_anims/frame_8359FC8_3.4bpp"); +static const u8 gUnknown_835A148[32] = {}; +static const u8 gUnknown_835A168[] = INCBIN_U8("graphics/door_anims/frame_835A168_1.4bpp", "graphics/door_anims/frame_835A168_2.4bpp", "graphics/door_anims/frame_835A168_3.4bpp"); +static const u8 gUnknown_835A2E8[32] = {}; +static const u8 gUnknown_835A308[] = INCBIN_U8("graphics/door_anims/frame_835A308_1.4bpp", "graphics/door_anims/frame_835A308_2.4bpp", "graphics/door_anims/frame_835A308_3.4bpp"); +static const u8 gUnknown_835A488[32] = {}; +static const u8 gUnknown_835A4A8[] = INCBIN_U8("graphics/door_anims/frame_835A4A8_1.4bpp", "graphics/door_anims/frame_835A4A8_2.4bpp", "graphics/door_anims/frame_835A4A8_3.4bpp"); +static const u8 gUnknown_835A628[32] = {}; +static const u8 gUnknown_835A648[] = INCBIN_U8("graphics/door_anims/frame_835A648_1.4bpp", "graphics/door_anims/frame_835A648_2.4bpp", "graphics/door_anims/frame_835A648_3.4bpp"); +static const u8 gUnknown_835A7C8[32] = {}; +static const u8 gUnknown_835A7E8[] = INCBIN_U8("graphics/door_anims/frame_835A7E8_1.4bpp", "graphics/door_anims/frame_835A7E8_2.4bpp", "graphics/door_anims/frame_835A7E8_3.4bpp"); +static const u8 gUnknown_835A968[32] = {}; +static const u8 gUnknown_835A988[] = INCBIN_U8("graphics/door_anims/frame_835A988_1.4bpp", "graphics/door_anims/frame_835A988_2.4bpp", "graphics/door_anims/frame_835A988_3.4bpp"); +static const u8 gUnknown_835AB08[32] = {}; +static const u8 gUnknown_835AB28[] = INCBIN_U8("graphics/door_anims/frame_835AB28_1.4bpp", "graphics/door_anims/frame_835AB28_2.4bpp", "graphics/door_anims/frame_835AB28_3.4bpp"); +static const u8 gUnknown_835AE28[32] = {}; +static const u8 gUnknown_835AE48[] = INCBIN_U8("graphics/door_anims/frame_835AE48_1.4bpp", "graphics/door_anims/frame_835AE48_2.4bpp", "graphics/door_anims/frame_835AE48_3.4bpp"); +static const u8 gUnknown_835B148[32] = {}; +static const u8 gUnknown_835B168[] = INCBIN_U8("graphics/door_anims/frame_835B168_1.4bpp", "graphics/door_anims/frame_835B168_2.4bpp", "graphics/door_anims/frame_835B168_3.4bpp"); +static const u8 gUnknown_835B468[32] = {}; -const struct DoorAnimFrame sDoorAnimFrames_OpenSmall[] = { +static const struct DoorAnimFrame sDoorAnimFrames_OpenSmall[] = { {4, 0xFFFF}, {4, 0x0000}, {4, 0x0080}, @@ -233,7 +233,7 @@ const struct DoorAnimFrame sDoorAnimFrames_OpenSmall[] = { {} }; -const struct DoorAnimFrame sDoorAnimFrames_OpenLarge[] = { +static const struct DoorAnimFrame sDoorAnimFrames_OpenLarge[] = { {4, 0xFFFF}, {4, 0x0000}, {4, 0x0100}, @@ -241,7 +241,7 @@ const struct DoorAnimFrame sDoorAnimFrames_OpenLarge[] = { {} }; -const struct DoorAnimFrame sDoorAnimFrames_CloseSmall[] = { +static const struct DoorAnimFrame sDoorAnimFrames_CloseSmall[] = { {4, 0x0100}, {4, 0x0080}, {4, 0x0000}, @@ -249,7 +249,7 @@ const struct DoorAnimFrame sDoorAnimFrames_CloseSmall[] = { {} }; -const struct DoorAnimFrame sDoorAnimFrames_CloseLarge[] = { +static const struct DoorAnimFrame sDoorAnimFrames_CloseLarge[] = { {4, 0x0200}, {4, 0x0100}, {4, 0x0000}, @@ -257,40 +257,40 @@ const struct DoorAnimFrame sDoorAnimFrames_CloseLarge[] = { {} }; -const u8 gUnknown_835B4D8[] = {0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2}; -const u8 gUnknown_835B4E0[] = {0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3}; -const u8 gUnknown_835B4E8[] = {0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3}; -const u8 gUnknown_835B4F0[] = {0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8}; -const u8 gUnknown_835B4F8[] = {0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa}; -const u8 gUnknown_835B500[] = {0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8}; -const u8 gUnknown_835B508[] = {0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8}; -const u8 gUnknown_835B510[] = {0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8}; -const u8 gUnknown_835B518[] = {0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3}; -const u8 gUnknown_835B520[] = {0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc}; -const u8 gUnknown_835B528[] = {0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9}; -const u8 gUnknown_835B530[] = {0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9}; -const u8 gUnknown_835B538[] = {0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9}; -const u8 gUnknown_835B540[] = {0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3}; -const u8 gUnknown_835B548[] = {0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8}; -const u8 gUnknown_835B550[] = {0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9}; -const u8 gUnknown_835B558[] = {0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3}; -const u8 gUnknown_835B560[] = {0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8}; -const u8 gUnknown_835B568[] = {0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8}; -const u8 gUnknown_835B570[] = {0xc, 0xc, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2}; -const u8 gUnknown_835B578[] = {0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7}; -const u8 gUnknown_835B580[] = {0x8, 0x8, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2}; -const u8 gUnknown_835B588[] = {0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5}; -const u8 gUnknown_835B590[] = {0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3}; -const u8 gUnknown_835B598[] = {0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3}; -const u8 gUnknown_835B5A0[] = {0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5}; -const u8 gUnknown_835B5A8[] = {0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3}; -const u8 gUnknown_835B5B0[] = {0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa}; -const u8 gUnknown_835B5B8[] = {0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5}; -const u8 gUnknown_835B5C0[] = {0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8}; -const u8 gUnknown_835B5C8[] = {0x8, 0x8, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2}; -const u8 gUnknown_835B5D0[] = {0xb, 0xb, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2}; +static const u8 gUnknown_835B4D8[] = {0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2}; +static const u8 gUnknown_835B4E0[] = {0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3}; +static const u8 gUnknown_835B4E8[] = {0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3}; +static const u8 gUnknown_835B4F0[] = {0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8}; +static const u8 gUnknown_835B4F8[] = {0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa}; +static const u8 gUnknown_835B500[] = {0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8}; +static const u8 gUnknown_835B508[] = {0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8}; +static const u8 gUnknown_835B510[] = {0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8}; +static const u8 gUnknown_835B518[] = {0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3}; +static const u8 gUnknown_835B520[] = {0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc}; +static const u8 gUnknown_835B528[] = {0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9}; +static const u8 gUnknown_835B530[] = {0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9}; +static const u8 gUnknown_835B538[] = {0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9}; +static const u8 gUnknown_835B540[] = {0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3}; +static const u8 gUnknown_835B548[] = {0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8}; +static const u8 gUnknown_835B550[] = {0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9}; +static const u8 gUnknown_835B558[] = {0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3}; +static const u8 gUnknown_835B560[] = {0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8}; +static const u8 gUnknown_835B568[] = {0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8}; +static const u8 gUnknown_835B570[] = {0xc, 0xc, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2}; +static const u8 gUnknown_835B578[] = {0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7}; +static const u8 gUnknown_835B580[] = {0x8, 0x8, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2}; +static const u8 gUnknown_835B588[] = {0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5}; +static const u8 gUnknown_835B590[] = {0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3}; +static const u8 gUnknown_835B598[] = {0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3}; +static const u8 gUnknown_835B5A0[] = {0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5}; +static const u8 gUnknown_835B5A8[] = {0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3}; +static const u8 gUnknown_835B5B0[] = {0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa}; +static const u8 gUnknown_835B5B8[] = {0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5}; +static const u8 gUnknown_835B5C0[] = {0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8}; +static const u8 gUnknown_835B5C8[] = {0x8, 0x8, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2}; +static const u8 gUnknown_835B5D0[] = {0xb, 0xb, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2}; -const struct DoorGraphics sDoorGraphics[] = { +static const struct DoorGraphics sDoorGraphics[] = { {0x03d, 0, 0, gUnknown_8353088, gUnknown_835B4D8}, {0x062, 1, 0, gUnknown_8353228, gUnknown_835B4E0}, {0x15b, 1, 0, gUnknown_83533C8, gUnknown_835B4E8}, -- cgit v1.2.3 From 5cc2701e4721bd885da7d9f01943d396775e51d9 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 12 Nov 2019 15:20:54 -0500 Subject: Knock out a few more incbins --- baserom.ips | Bin 363962 -> 363841 bytes data/clear_save_data_screen.s | 20 +++++++++++++++++--- data/evolution_graphics.s | 3 +++ data/field_tasks.s | 19 +++++++++++++++++-- data/save_failed_screen.s | 2 +- graphics/interface/save_failed_screen.pal | 19 +++++++++++++++++++ 6 files changed, 57 insertions(+), 6 deletions(-) create mode 100644 graphics/interface/save_failed_screen.pal diff --git a/baserom.ips b/baserom.ips index 7c99bf40b..9bea735dd 100644 Binary files a/baserom.ips and b/baserom.ips differ diff --git a/data/clear_save_data_screen.s b/data/clear_save_data_screen.s index 51149a021..32a2d422a 100644 --- a/data/clear_save_data_screen.s +++ b/data/clear_save_data_screen.s @@ -7,10 +7,24 @@ .align 2 gUnknown_841EE64:: @ 841EE64 - .incbin "baserom.gba", 0x41EE64, 0x4 + .4byte 0x000001f0 + @ { + @ .bg = 0, + @ .charBaseIndex = 0, + @ .mapBaseIndex = 31, + @ .screenSize = 0, + @ .paletteMode = 0, + @ .priority = 0, + @ .baseTile = 0x0000 + @ } gUnknown_841EE68:: @ 841EE68 - .incbin "baserom.gba", 0x41EE68, 0x18 + .byte 0, 3, 5, 6, 4, 15 + .2byte 0x000a + .byte 0, 3, 15, 23, 4, 15 + .2byte 0x0022 + .byte 255, 0, 0, 0, 0, 0 + .2byte 0x0000 gUnknown_841EE80:: @ 841EE80 - .incbin "baserom.gba", 0x41EE80, 0x44 + .byte 0x01, 0x02, 0x03 diff --git a/data/evolution_graphics.s b/data/evolution_graphics.s index 0fd702447..08276557a 100644 --- a/data/evolution_graphics.s +++ b/data/evolution_graphics.s @@ -6,6 +6,9 @@ .section .rodata .align 2 +gUnknown_841EE84:: @ 841EE84 + .incbin "baserom.gba", 0x41EE84, 0x40 + gUnknown_841EEC4:: @ 841EEC4 .incbin "baserom.gba", 0x41EEC4, 0x10 diff --git a/data/field_tasks.s b/data/field_tasks.s index a91e6cec9..2ff9ad215 100644 --- a/data/field_tasks.s +++ b/data/field_tasks.s @@ -1,7 +1,22 @@ .section .rodata .align 2 gUnknown_83A7310:: @ 83A7310 - .incbin "baserom.gba", 0x3A7310, 0x20 + .4byte nullsub_40 + .4byte sub_806EB54 + .4byte nullsub_40 + .4byte nullsub_40 + .4byte sub_806E9E0 + .4byte nullsub_40 + .4byte nullsub_40 + .4byte sub_806EC40 gUnknown_83A7330:: @ 83A7330 - .incbin "baserom.gba", 0x3A7330, 0x14 + .byte 0x08, 0x03 + .byte 0x0a, 0x05 + .byte 0x0f, 0x05 + .byte 0x08, 0x09 + .byte 0x09, 0x09 + .byte 0x10, 0x09 + .byte 0x08, 0x0a + .byte 0x09, 0x0a + .byte 0x08, 0x0e diff --git a/data/save_failed_screen.s b/data/save_failed_screen.s index cdf68c4de..e19763962 100644 --- a/data/save_failed_screen.s +++ b/data/save_failed_screen.s @@ -7,4 +7,4 @@ .align 2 gUnknown_841EE44:: @ 841EE44 - .incbin "baserom.gba", 0x41EE44, 0x20 + .incbin "graphics/interface/save_failed_screen.gbapal" diff --git a/graphics/interface/save_failed_screen.pal b/graphics/interface/save_failed_screen.pal new file mode 100644 index 000000000..f7932450f --- /dev/null +++ b/graphics/interface/save_failed_screen.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +16 115 230 +255 255 255 +98 98 98 +213 213 205 +230 8 8 +255 189 115 +32 156 8 +148 246 148 +49 82 205 +164 197 246 +0 0 0 +74 205 238 +49 164 238 +0 90 131 +24 98 197 +16 115 230 -- cgit v1.2.3 From f6e88738926162034998a1e510989671a2cab216 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 12 Nov 2019 15:24:36 -0500 Subject: Resolve comments on map_name_popup --- include/map_name_popup.h | 2 +- src/map_name_popup.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/map_name_popup.h b/include/map_name_popup.h index 6f4a6528c..6fb2f798b 100644 --- a/include/map_name_popup.h +++ b/include/map_name_popup.h @@ -9,6 +9,6 @@ // Exported ROM declarations void HideMapNamePopUpWindow(void); -void CreateMapNamePopupIfNotAlreadyRunning(u8); +void CreateMapNamePopupIfNotAlreadyRunning(bool32 palIntoFadedBuffer); #endif //GUARD_MAP_NAME_POPUP_H diff --git a/src/map_name_popup.c b/src/map_name_popup.c index 361c3a931..fe15cc129 100644 --- a/src/map_name_popup.c +++ b/src/map_name_popup.c @@ -14,11 +14,11 @@ #include "constants/flags.h" static void Task_MapNamePopup(u8 taskId); -static u16 MapNamePopupCreateWindow(int a0); -static void MapNamePopupPrintMapNameOnWindow(u16 a0); +static u16 MapNamePopupCreateWindow(bool32 palIntoFadedBuffer); +static void MapNamePopupPrintMapNameOnWindow(u16 windowId); static u8 *MapNamePopupAppendFloorNum(u8 *dest, s8 flags); -void CreateMapNamePopupIfNotAlreadyRunning(int a0) +void CreateMapNamePopupIfNotAlreadyRunning(bool32 palIntoFadedBuffer) { u8 taskId; if (FlagGet(FLAG_SPECIAL_FLAG_0x4000) != TRUE && !(gUnknown_203ADFA == 2 || gUnknown_203ADFA == 3)) @@ -31,7 +31,7 @@ void CreateMapNamePopupIfNotAlreadyRunning(int a0) ChangeBgY(0, 0xFFFFEF7F, 0); gTasks[taskId].data[0] = 0; gTasks[taskId].data[2] = 0; - gTasks[taskId].data[8] = a0; + gTasks[taskId].data[8] = palIntoFadedBuffer; } else { @@ -138,7 +138,7 @@ bool32 IsMapNamePopupTaskActive(void) return FindTaskIdByFunc(Task_MapNamePopup) != 0xFF ? TRUE : FALSE; } -static u16 MapNamePopupCreateWindow(int a0) +static u16 MapNamePopupCreateWindow(bool32 palintoFadedBuffer) { struct WindowTemplate windowTemplate = { .bg = 0, @@ -151,7 +151,7 @@ static u16 MapNamePopupCreateWindow(int a0) }; u16 windowId; u16 r6 = 0x01D; - if (gMapHeader.flags) + if (gMapHeader.flags != 0) { if (gMapHeader.flags != 0x7F) { @@ -165,7 +165,7 @@ static u16 MapNamePopupCreateWindow(int a0) } } windowId = AddWindow(&windowTemplate); - if (a0) + if (palintoFadedBuffer) { LoadPalette(stdpal_get(3), 0xd0, 0x20); } @@ -187,7 +187,7 @@ static void MapNamePopupPrintMapNameOnWindow(u16 windowId) u32 maxWidth = 112; u32 xpos; u8 *ptr = GetMapName(mapName, gMapHeader.regionMapSectionId, 0); - if (gMapHeader.flags) + if (gMapHeader.flags != 0) { ptr = MapNamePopupAppendFloorNum(ptr, gMapHeader.flags); maxWidth = gMapHeader.flags != 0x7F ? 152 : 176; -- cgit v1.2.3 From f04e6737b2073446efa285cfa74a80ee23649afd Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 12 Nov 2019 15:30:48 -0500 Subject: remove declaration of nonexistent map_name_popup routine --- include/map_name_popup.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/include/map_name_popup.h b/include/map_name_popup.h index 6fb2f798b..c8ce02c30 100644 --- a/include/map_name_popup.h +++ b/include/map_name_popup.h @@ -3,12 +3,6 @@ #include "global.h" -// Exported type declarations - -// Exported RAM declarations - -// Exported ROM declarations -void HideMapNamePopUpWindow(void); void CreateMapNamePopupIfNotAlreadyRunning(bool32 palIntoFadedBuffer); #endif //GUARD_MAP_NAME_POPUP_H -- cgit v1.2.3