From f316b22f96753c8580d86a8b7957ec69d7bd0c3c Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 11 Nov 2019 17:08:21 -0500 Subject: [PATCH 1/9] 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 07a82d3b0fe8499ad135c63d46e8c0b5d19a6f5b..d11c55170c4c0cbbd57e9d3d0edc9cc0ae303268 100644 GIT binary patch delta 29 jcmeBOEAe8DL_-T>3)2?n^#AQW|Cxc9WqZ$mRz`6E%g7Be delta 67 zcmaE{MxuAEL_-T>3)2?n^#7`kU$!tPFfalk6O?3PU}|7!V1V;j7+BiV|1$$I%l7pD Htc>CSQU(wT 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) From 734cbfdb202f366ed39b5304e030478aaa3ea090 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 11 Nov 2019 21:46:57 -0500 Subject: [PATCH 2/9] 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 d11c55170c4c0cbbd57e9d3d0edc9cc0ae303268..c7c4f9714efde94fbf9491844cff3f48712c5072 100644 GIT binary patch delta 35 pcmaE{Mq=AaiG~)&7N#xCg>~EO>X?oA+e7=AftY1`Xg{lPI{*Z?4PyWR delta 248 zcmdnCQsTuLiG~)&7N#xCg>}5PjwuWr42-gTOuUQ?+Y9TMjrhgYw=gbXfB{A(C`)*9 z<6kij2MEt$I^#kS^BlnZ>FXacu`@X^O@DZvQJl#^aXRBOCRr{62B<1VkhmC|12f3P>H4=BC6s{- m5C#GPh`|sJn3QLDz|2tdf4U>kruId>%s|YteNiu~NIL+tyDwh= 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){}; From 3cbc3121304a0dfb34566a16b828dda96c474700 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 12 Nov 2019 11:21:49 -0500 Subject: [PATCH 3/9] 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 c7c4f9714efde94fbf9491844cff3f48712c5072..7c99bf40b99f70e9ff8d76162b54a0b95c0aa7f0 100644 GIT binary patch delta 36 ncmdnCQexL^u?;1ES+=Jzv9y=8Faj|X5HkZY%l48MR;LL7AlnYL delta 16506 zcmeI3e{7q_dB-J6&E6zlk)v$MKjtuc7bngF)Nx*M=~fhtT`Dz(0GVaJ^o%V_e9ws!u&!r`7Eqv?CCg0KWNrq;Y(@vk2pD5tV0!~Xqsjm$KudP& z5O@Em@4nC7d*sVsqJL%y&@(=|=e>LGp8NgYdq@A%EA7XREq{C0!mSVNIMCG8>}%By z9&uJBI3F5vv7~Pe@u)%I*&0e(hwRh=kUC^rAhqL=eHea{o(~_gWf~iKY~`FsOdd5& zcqTmID19^ooJB0J9eimPk}6fO6X!bSn& z9u{i`DuGuw4&#Di0d8_XPyyg-_JIg*!QWy(TtF=qv)LE97iyPcBq@0#A=Bd3MXB%lEMaUlEQ!b`B>GW#Ou9w;+76?@^Os5SFq#GDnF@Sz)h;{_gp zA9>@2s7X-Yr~;6ViO`ZyvMRu5s2?s(a$e+FjK%`iq)P(G>HhO}It`AUw-14V$@6w@ z;Jke?m$M51X$zQJU@MxddR;19gkFKTX!Ak=>k_z{b?K5-urFDcB+p*5|EoYC%%#zM zfMwhK2*kdNxXKCnsjN$v(GP-e!gtUQ4*KA-0CGCrj(z~g+U-feEM_yt z>;Q0pOk*S6R#c|CADjU693o(I$3Z`UtLcZ!mSbPGE=#_7+5R7gK$uIzejua21aUI_ z%g<^*Ft!Kn>Lp{dsq`KJ%h+(Mh@s)(D(s=*RWj`=R{$5#k7ylUy_98nm*s~buGXluz{^J+s2CXd^hXO7z^GZ{MzkQOg&8`K``*^|)A5+`k*&0?^Fs~PMwR@R=eW+Xdj>>p|}Hn#L4jNXLYcf=KcdNDe0SdHpanzyd)2#lFx^esprF-KOas34tcjLQ+O%O zCs2PZWPTC~!3)6?F1Z`&DUalVun9sY2$>*6Ot3w^rB6SBq~H_e_DN{}fdk?FDd771 z;O|q!rb*6-=hz<(0IvBb1Kx$VWa=5WyOca!W^PqR@-LH<6d1 zq>wOSn-g#KS7EK}r5!j;Ct~tlFP1g=u4%R(LAuDw-l+Lje-wEUTg6sK6~Hv5p7dw3 zCQ9ILb)d49#Cp!cs}?V-Iu4%z78wyAI~Cs?(TO9mFWf(|?R3i>2j6z?z{Z~PnK@HJ zY-H4$at7JhKP#NEf0`lQu?rwmcn53BJ6KcRp*4jzGDyD_r9obZ~cWd93=til6}JFP^c_pOL%||9xaO1D|NPra;%61#vQ5y{6P^#T&MfpJ#O;5W({sCk{g$tv~uxs2~ z03_}U9S2X5;p5;bW&Ej7$cJU^$;sx9r@P6P#6m?%pb3?}@Eh54D^`}q6DHRf&PPVd z;UjpP4hs;GPNwWs8l+w>au{-wIQ%jO-$_82!n*qn{>o z)#x8eC+(q;ks|vb6Dq9X=syah!yrzEKjq^E8v1ZoH2Qzn;JhD*~!1)0~K$ZfO&*WyTWtrYO?En8Vq8C?SBH zSrrRpGORU^tl!aDcR&u|SNmPCsMobT*H#rFFUvPdGjdJ)R82 z_;A1<;{n|t3*h?(=tM%t2aDIu;{o5x#QZOSo|uXSyzJ_T1$J?SaV`)>m0{Pow*asn zz{eE~1HH^Ro_+G`s%?O5t|NOA7Qk~6Y&%tfh2O}gTe-3{o-p~5wb@+5ige%2HizzJ z8w4_(^_a_wYz!}B8$-lW))Tuw*KJnwR3il&6 ziW6i3CRa4&LNa#J(JW4o2MFxQch02K{Q~Uavsr@n;(Qi*@miZrnqW9d?w>{4_-uBk z8K2#WgDcvL_PLW!oM6)OPKcEhB4)ijg``X`z&L>u;hhA1JWz%rQ+lp3yU9Y)3BxdM z3ghs_;ig-F>TNyMysQ8ySkYmb7hCya<`8NYpkiB(!Gw+~cNB)!$)an-^e&I3t}Vs? z&iCa%3gi4<9EC`d$+dpM8{dh;lp^0wCOf~KOeB?JJs(P>SQnK}8Ri^oAV#oq#k8(* z7UNuwVA4o5t|8Uzid&!)t>BV`Pk38^F+Wz@B1x8DXeC#%o{t2{#YlE`>I7Gy_MQg7 z{PHJVP;)=ko+A)*Sl1t=KaFbGC|=c&)`R7m_o?RUP`+5SE=6Baaj856bzSGg`dsU} ziJyGX+IsMqvpiwIVNYIknD@DY>qu@CuXM?$+ML4Z7U0C|6sU~PLWjsm5{#7UG4*CT z?JBASWqz8m6{JJym9Gkb{6#-N$Dd)N{xn|08FrsP%XEKs6rI#btK+k}-l&F+;wx)- zD*Ib#1#ohez#C8fxD>ku8B@!jdUIuQ@o!Cxrc$WjN|BH2k0S3*aGzU0>Q(=JHI{mG zHZA|xQ@{1NCn*gFstC2}sS2tpcvq!{_j!u3l&Il1kWGr}hkiQ6M)fK5$SHOo(DhTJ za^zC^;i_I^o-ny(sO%&f&&WK5MNqg#@uW{Wzx|;6hq7U5TIVMUg)jMQ#drR~aReV0 z5@>@j3B`JT=ZA&DVtCU@!?eeu87o~`S{P>Yj#IYSHmYHx_*yk|uznH+P%9o&3$HAI z#TM0*iuHUbV))dj&^eltbm|TkTnDxHG=QF3;V%$aXbGylgP|cNIbJr^1D#5Iy<>pJ zfpWE5K*Ub`iS7Gh`ReQ0v{A$@_hK$HB88z1Mlojz<*20OCORMXEuZ+{1N`~|>+{4D zlg-O+!;Zt^lXxOv92Q@SiWx-lg+hLH4rFr+tFzgK z)zE?dhk3@9g3wuPcIOyd4L^_Pe4cc2z=8g+9LV6&0v>V&1i+UWusrKDP!hvn4@w{k zS8x+i8V17#0|o;IVbrW)N1Ymq_aJq4u|D}+es%swC8&;Y8>GiDCfS1$S-v^wFP+P; z4gq!+>GFW`ARj;-^#D|r8r5OYU2Pz-(MI){18u4 z8qKP>Lc46NES(tqx$iL?R!k-49Mr*i?@SXaO}t$*24)TgZ*SX}ck8e7X$N96MMdG-jH*OK1!Q3LiXpFg!RoSY#LE zF=E#sF5$-i^xNRJaX@IQInvv#?rZ=)HBV8 z22I3DQ~@yZiU)!vq2g+y6hV@EJw&A!h|^MaJx>Ri5lN{4QcvlZ`Nd0WQOQMreF_b4 zXQ_sFee&pvh&YkiBW{CG*z$g$DM8vSU%rcfz4rWn?Sjnirz|22x*x z3mAjeBVp5}n`0Y>pAdE%adhI>*JJ0ip7S=WQpWm0Y?O_&xg4AORl!l<_RQfNdTr2m zchYp;@LGuk>rJH=aEJ(=2G+vp(}xz2Q85!rP@7msfWl@Ew!jY6x5}s1xYjYCMl<=9EhOGLH{-T1(c0uVt+<70ZTc2yYNiXB zQdmsl(D=DOQl=RPJ>c+pqsmbmWLI!@`Sgi5V4T*WV0 zB1`rguG2JnPWXIZaGgr1{K{}uauu#JmKphcx8E)ed=;&cd?2X($3FzM?P$=o4+gcL zK>p+A=BCp|Q2QA2>uA#*!Jziv2|T=o2koJt_P>x*kdJ;js5MOowKI@6{eDo>ApZsA zkG~Ss?tpyK*W8r+YEWAa`7pxQel4io1^N4sPd^;g)mDNEt898SBeA*;g_>+8)@{-(+0=n3a8g=g)+KgHPwzd@1~I*pU;X)pUgG m?hL_&ouZnHb@oZPK4*RS-{a=0J;GHWTRdI;T-G@yGywqYuP?a( literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8353088_2.png b/graphics/door_anims/frame_8353088_2.png new file mode 100644 index 0000000000000000000000000000000000000000..981aaa7fd02e69cab353519f1709f5ad286795dd GIT binary patch literal 124 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fEx&YmugAsjPfPaPCIpuoWzxXV0* zA*wM?d7Eg-g9(2wON&(|T|4{qP~8Qu+S}s0j5L4Rd|-O(&=|RZ_1Hn32Swg{vq?p*JAyp{j_K?Zob`njxgN@xNAACMl2 literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8353228_1.png b/graphics/door_anims/frame_8353228_1.png new file mode 100644 index 0000000000000000000000000000000000000000..2f7b80495da6a698be70d75ff225d776265e4b8c GIT binary patch literal 105 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fEx2A(dCAsjQ4Uo{JdUx0Vhd{=8 My85}Sb4q9e0QSuzS^xk5 literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8353228_3.png b/graphics/door_anims/frame_8353228_3.png new file mode 100644 index 0000000000000000000000000000000000000000..97a87ea4c5c841a7150a5fd2448f1493c44a0509 GIT binary patch literal 103 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExdY&$hAsjQ4Uo{xW8XqqL+Xirx^mvv4FO#py$B`g2{ literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_83533C8_3.png b/graphics/door_anims/frame_83533C8_3.png new file mode 100644 index 0000000000000000000000000000000000000000..97a87ea4c5c841a7150a5fd2448f1493c44a0509 GIT binary patch literal 103 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExdY&$hAsjQ4UoelF{r5}E*v%r;j5 literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8353568_2.png b/graphics/door_anims/frame_8353568_2.png new file mode 100644 index 0000000000000000000000000000000000000000..93b6e18f597bb00343c9491a25c5ef3aae06180e GIT binary patch literal 130 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExo}Mm_AsjP9Pi+)DpuofIu-@V1 zj*`Nc=L{GxirwUq&Uv@!mA{a!*h|-!4*wEXvj5c<|9xgXi-5!hmRZe=XIN$>TBI>~ cRd4JPi0Dyr4Vss0b{S;2r>mdKI;Vst0GbObq5uE@ literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8353568_3.png b/graphics/door_anims/frame_8353568_3.png new file mode 100644 index 0000000000000000000000000000000000000000..a4edcdc0b6d6a793a211d56c8cae165fe6a151b4 GIT binary patch literal 102 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExx}GkMAsjQ4Uo{vq?p*JAyp{j_K?Zob`njxgN@xNAACMl2 literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8353708_1.png b/graphics/door_anims/frame_8353708_1.png new file mode 100644 index 0000000000000000000000000000000000000000..e56c2f31e20468c1e18b8d1321b64ba892a9e785 GIT binary patch literal 144 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fEx;hrvzAsjP(PjBQspuppDG5hic zS>+UQby40)3r{f2Q{7zAHpkF)UDdB?ikGU^_CM-hJdg9skp_PCb=!C5Php)mA;Tdu rz<@O`k;`ZCqtiV~%UVSQEn45!PL6T*6k301KFBIhS3j3^P6PzU ZH!|A&cgZ*u&u0WO+0)g}Wt~$(69D6JDUARC literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8353708_3.png b/graphics/door_anims/frame_8353708_3.png new file mode 100644 index 0000000000000000000000000000000000000000..a4edcdc0b6d6a793a211d56c8cae165fe6a151b4 GIT binary patch literal 102 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExx}GkMAsjQ4Uo{vq?p*JAyp{j_K?Zob`njxgN@xNAACMl2 literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_83538A8_1.png b/graphics/door_anims/frame_83538A8_1.png new file mode 100644 index 0000000000000000000000000000000000000000..117acac1d289e88c641382bf065cdcef8d4784a8 GIT binary patch literal 131 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExUY;(FAsjPf&ukPtpuofIz(2j| z*efGp=gTBqo9pp=VE7pO!sv4b6Mw<&;$S~k1nhL literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_83538A8_2.png b/graphics/door_anims/frame_83538A8_2.png new file mode 100644 index 0000000000000000000000000000000000000000..58aa0d45696af276ce79a386e2f88ac30a0021bc GIT binary patch literal 123 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExPM$7~AsjQ4E7)1&WM%7ken|Q& zU6ABhDIL)E-j?I>$-BGt5AfXIUH-mN!hvytz=Vg~Nq0UcGjQM8`}+6;?&LeIOboIw VV|b@{wYY;!^>p=fS?83{1OWW+Cu#ry literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_83538A8_3.png b/graphics/door_anims/frame_83538A8_3.png new file mode 100644 index 0000000000000000000000000000000000000000..a9f2c98f55c09aa33990ad89e24ceebaeaed6040 GIT binary patch literal 108 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fEx#-1*YAsjQ4E7%$9cvOsIVqy;T zsF%OL$7)=&kY@tJjECH*4Xh44@fyrZ3@JYjNt7>SUmdKI;Vst E06%mbZvX%Q literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8353A48_1.png b/graphics/door_anims/frame_8353A48_1.png new file mode 100644 index 0000000000000000000000000000000000000000..5ea623f10099656274489d8c401411888f261cce GIT binary patch literal 146 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExk)AG&AsjPJPj3`#FyLrSEK};W z^=0#T$nZ`m*U<6|$C*a~P95uiy?fpewR7rUu^AfneFv^F^FMoL5x;EDgpNlojBY-{ tP19t;w?2```lKH^IdO&efo5Na>vok>9TFFv`SBNInWw9t%Q~loCIA@IHUaDr6PHxbKWg_bzf1g>;A|P>rWmYre8J1az7HLdg c)f>A6BGk&=)eOVdae@r@boFyt=akR{09Yd^)c^nh literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8353A48_3.png b/graphics/door_anims/frame_8353A48_3.png new file mode 100644 index 0000000000000000000000000000000000000000..a4edcdc0b6d6a793a211d56c8cae165fe6a151b4 GIT binary patch literal 102 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExx}GkMAsjQ4Uo{vq?p*JAyp{j_K?Zob`njxgN@xNAACMl2 literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8353BE8_1.png b/graphics/door_anims/frame_8353BE8_1.png new file mode 100644 index 0000000000000000000000000000000000000000..3b8a603969e1590a35797ea6dd4102f8e2c7797b GIT binary patch literal 140 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fEx!JaOTAsjPp&m81EV8Frb@b9MZ zE=I{l!%tZ%{S4YEE2d4lvVO9zLIT(8r&9v-Hr&kH!LV`GwY#e$KhHlmHN)Q5RwiJo n3wMo#V53X-lwh&^IZ4kMXKe8?uw8g!A;=m}S3j3^P6 Vu-}>nsXPymv7WAeF6*2UngEbTC_exI literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8353BE8_3.png b/graphics/door_anims/frame_8353BE8_3.png new file mode 100644 index 0000000000000000000000000000000000000000..de5e8c3561e6e722df755585f67d26398253bc35 GIT binary patch literal 103 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExdY&$hAsjQ4BUl+@cz#IoI54CY zyuY_s`bfkE>A44c&oP`{V6fw&q=2MCvbhKY1ADTkq3`u_UXTf%u6{1-oD!M<GS}19&t;ucLK6UFTqY#| literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8353D88_2.png b/graphics/door_anims/frame_8353D88_2.png new file mode 100644 index 0000000000000000000000000000000000000000..405f027b09f0cf80d8cff97a53f9c30828ba7cad GIT binary patch literal 130 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExo}Mm_AsjQ44Ys{uXgYa}r=TrU zrNhv421D|*Gcz6B?wsz6Tpf0{noEe$=z!AP)eDpq*aD8+5IVvTeUUY>q~XfCS1%GG cSXm3$7z|ULxM%0Dn*lQ1)78&qol`;+0E+l3J^%m! literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8353D88_3.png b/graphics/door_anims/frame_8353D88_3.png new file mode 100644 index 0000000000000000000000000000000000000000..052c556069fa55aa4d0ff7ea565206380edcb427 GIT binary patch literal 95 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExYMw5RAsjQ4UoQn rD;JA|l~wpcNOq4hG2?UongR__TcQ{9!YM)hK= sX`%D=!w)Yw%=YGZqGoke@p|oZW|nD|7gpx+hk)$zboFyt=akR{01HtuBme*a literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8353F28_2.png b/graphics/door_anims/frame_8353F28_2.png new file mode 100644 index 0000000000000000000000000000000000000000..2337f80df9ed786f115490c999b1b3630972d306 GIT binary patch literal 133 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExKAtX)AsjPf&u$bvpuofIu%4mE zr#bqPfIowj^5mmsK3pMxJzG~~vPh)7*lDq2I`j9>%9a(e@rOA$+_)A%qDmnw-|=8DYF;a@&~;BFuMW9} o`u7}g>gP~#TcQzJv(V)!>({Hko)Ndb>p}K-y85}Sb4q9e0J%#r%K!iX literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_83540C8_2.png b/graphics/door_anims/frame_83540C8_2.png new file mode 100644 index 0000000000000000000000000000000000000000..b23db61c5cf58878a1696bc493d1204baa4588f0 GIT binary patch literal 125 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExE}kxqAsjPfPZ4Pa zWfq%lW8Uk7O?)CJ*WcT4LU?nYp7^)suvfSDU6|^5@_D0p20PaoCS3!*G{))Ck5rz- X38sf6eQ>>e17xnJtDnm{r-UW|`$j6u literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_83540C8_3.png b/graphics/door_anims/frame_83540C8_3.png new file mode 100644 index 0000000000000000000000000000000000000000..8870077b3ac4821263613ca366b039466e418d3b GIT binary patch literal 103 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExdY&$hAsjQ4XK*rVOMWm8V`QAM zvFiJ~y9&qF+HUV%*TboFyt=akR{06SbB AZvX%Q literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8354268_1.png b/graphics/door_anims/frame_8354268_1.png new file mode 100644 index 0000000000000000000000000000000000000000..5a09abac07ef0c2552a4e30b14107eeb4be85a1f GIT binary patch literal 138 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExfu1goAsjP9PaPC(P~c&{pcna? zMYgdgp^z!1<=mlwZA|RNzw|k0b{cF6bgFdjm(N+)w>l@mU*q$c1MR}+kK`tJmYA!o ks@Aw*dsU;`Lpi>Zk+;V&(B|U$T_8(5UHx3vIVCg!0ItL>ZvX%Q literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8354268_2.png b/graphics/door_anims/frame_8354268_2.png new file mode 100644 index 0000000000000000000000000000000000000000..e46d8b0afe4a42832fd389ce2073bc2430587ef1 GIT binary patch literal 130 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExo}Mm_AsjPfPafnwpuppNQ76*S z^C-szPN^9TdpNQMCs+o|pZ7=g_dfMmIV}aw{HK06T2F3Tv0=JHQ~-mnkVoIH3w#Ni cy5pJhm?U4iAE}Vtz7k}(r>mdKI;Vst04T00rvLx| literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8354268_3.png b/graphics/door_anims/frame_8354268_3.png new file mode 100644 index 0000000000000000000000000000000000000000..97a87ea4c5c841a7150a5fd2448f1493c44a0509 GIT binary patch literal 103 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExdY&$hAsjQ4Uo`3U l%x8pi7uGL08T?GO=dRHT&+CDkYTQ7Uc)I$ztaD0e0suKuFUCkh!R66A+mr(;u_d7qu2cBKCO&n@m)`Wzopr0J8umrT_o{ literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_83545A8_1.png b/graphics/door_anims/frame_83545A8_1.png new file mode 100644 index 0000000000000000000000000000000000000000..46de34aafb9fe1c8da4e8e47e478f32212e3a192 GIT binary patch literal 122 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExj-D=#AsjQ4GlDL?c)=jVGovRh zxx0@~!BJ$fsmY?n%pMJ{R*6cR9h4mI?BqJ~;>C*@Te&<8O4czoi}I{qz;KR%VMCNf Th?1^_2FOrPS3j3^P64^Kskk z>hAvh%t^6?V{1asuIM=zs?l?eW5JnK*ElAe&{@F|z^1~K-e9sm>gvUV43C%(agTe~DWM4fU(+bb literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_83545A8_3.png b/graphics/door_anims/frame_83545A8_3.png new file mode 100644 index 0000000000000000000000000000000000000000..f2de21913f27ebbfd9b20229f9bc2b94ca421f32 GIT binary patch literal 105 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fEx2A(dCAsjQ4UoHJo6OT)lwd90LPqq3=A8i&Gzf%< zsn*27pRoDV$Ej*>I$zVw0u8{tyPL|K{k52`njxgN@xNAyU{sj literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8354748_2.png b/graphics/door_anims/frame_8354748_2.png new file mode 100644 index 0000000000000000000000000000000000000000..f6b3644b847ae8e0b38b58a89201cb7312c6c4f5 GIT binary patch literal 129 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fEx9-c0aAsjPvPjBR9P~>sGIK?F8 zUC5c@1{|zYmkv bPL_b$@0-Hbmlv*G0W#au)z4*}Q$iB}PSq** literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8354748_3.png b/graphics/door_anims/frame_8354748_3.png new file mode 100644 index 0000000000000000000000000000000000000000..eec2567a1125ac48f15b5bf7ecbee3caa554bb15 GIT binary patch literal 103 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExdY&$hAsjQ4E7%!pcz#IoI54Dr zxVN`j{76NC_}qit=NL{eFsQgFDIlrvSWkq3VG(=mPv&E*IzT3Py85}Sb4q9e01M9@ Ae*gdg literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_83548E8_1.png b/graphics/door_anims/frame_83548E8_1.png new file mode 100644 index 0000000000000000000000000000000000000000..22566a901439ed2f54fbde8e02ab2005a477586e GIT binary patch literal 150 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExv7RoDAsjPv&mQD$P~c&`u>U`s z>A~F+5)O;18&;MZma#<}%zLx2vi*N_h`dWz|Br)vy54jvNd_Icx=~YS@sC65tP3uz xC~yc1DLONAi=AX!+037{7ZsJx>?$ap{g`o)N>Wrw@xelng`Tc{F6*2UngCa_I9&h$ literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_83548E8_2.png b/graphics/door_anims/frame_83548E8_2.png new file mode 100644 index 0000000000000000000000000000000000000000..35f772671450d91818bbef76c6f3fec0fb5275dc GIT binary patch literal 131 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExUY;(FAsjQ4E4F@<6}S_1yy0ZU zUhyM4_VPbUb~gqmfoJ$aGIvKbLh*2~7Y*vMnh9 literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_83548E8_3.png b/graphics/door_anims/frame_83548E8_3.png new file mode 100644 index 0000000000000000000000000000000000000000..226fe6bb044f6298cfeca8e75b8cf7bb1ed172c0 GIT binary patch literal 90 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExik>cxAsjQ4E7)0iM2saI8u&Xu mKG5U1AsjQ4Uore1 uj)^hlm`(|s3)@UX?zxOp9h25Lr86)XJ@l(k6+RjT((LK#=d#Wzp$Pyg!WicO literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8354C28_1.png b/graphics/door_anims/frame_8354C28_1.png new file mode 100644 index 0000000000000000000000000000000000000000..cd6285a64389e94d3d66892c1b2a4b8375ea6e5e GIT binary patch literal 130 zcmeAS@N?(olHy`uVBq!ia0vp^0zj<50wfrI3wa3wDNj!q#}J9B$rbFZJVzLIBqeJk z?BHhQ*%+=UaIiu9-HR7{zkhRcXBTs;tbDt7`}NbOUmiU0tY=^O`#1*4_xJYht^O`| eVP(Pl0}>2tyk?r*;QVzGWVolRpUXO@geCyezc4lc literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8354C28_2.png b/graphics/door_anims/frame_8354C28_2.png new file mode 100644 index 0000000000000000000000000000000000000000..11a1c36e00d3e0981fbc498a720523b93fb4a83e GIT binary patch literal 127 zcmeAS@N?(olHy`uVBq!ia0vp^0zj<50wfrI3wa3wDK}3S#}J9B$rbFZJVzLIBqeJk z?BHhQ*%+=UaIiu9T?O}|cclr5Q=BE9Zb{g)xB9!B(PHL9FC3EgFdN=0HE75X;C?78 Z!OS4Vw^2q+baDj9WKUN=mvv4FO#t_?B%A;M literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8354C28_3.png b/graphics/door_anims/frame_8354C28_3.png new file mode 100644 index 0000000000000000000000000000000000000000..c0d626d068c3648bca97daf5ccd472fb5489052a GIT binary patch literal 104 zcmeAS@N?(olHy`uVBq!ia0vp^0zj<50wfrI3wa3wDSb~D#}J9B$rbFZJVzLIBqeJk z?BHhQ*%+=UaIisJPU2Yfio*guyI=HdmjIGH3?hyPuAW?T8)O!Pr>mdKI;Vst0Lb{fxIrQvyDB#!l%5$jV(>q-s74c&`xKnMKjTF2Z cdUgjeFm(Uj_@wx9fF;OqPgg&ebxsLQ02IR}&;S4c literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8355268_1.png b/graphics/door_anims/frame_8355268_1.png new file mode 100644 index 0000000000000000000000000000000000000000..d752d94ef640b08e3b60e8b8e49b81693ada6f71 GIT binary patch literal 137 zcmeAS@N?(olHy`uVBq!ia0vp^0zj<50wfrI3wa3wsQ^zG#}J9B$rjA4Ji8Y%$Sd=5 zNt{~9aIj%@qjbeLJ{Bd3_X`>t8ymmhyUoqR!_l^2!JEC?#aUTj9(33=_x;`7><+K) l?%rPh{vNZ{8$FQ&k_@&Bd;UB#OPmCtAL@4OI^K}L;Uv)%l49fSecCy7&)(|qauW_RBr@dI kvnTCozL0P&R-?g~L8ohr&$QKNO+j{ey85}Sb4q9e0EvMrq5uE@ literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8355268_3.png b/graphics/door_anims/frame_8355268_3.png new file mode 100644 index 0000000000000000000000000000000000000000..19a595cd0d340cab81c835fb4ceeb93265785579 GIT binary patch literal 115 zcmeAS@N?(olHy`uVBq!ia0vp^0zj<50wfrI3wa3wDJxGG#}J9B$rjA4Ji8Y%$Sd=5 zNt{~9aIj%@qjbeLJ{Bd3_X`^IdeQ@yD@kOQA7nUKF|GUDj%x8|^|AhiGh literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8355588_1.png b/graphics/door_anims/frame_8355588_1.png new file mode 100644 index 0000000000000000000000000000000000000000..b8ee1eb421ab9c2ea5cb2afd95bc1502e77801d3 GIT binary patch literal 177 zcmeAS@N?(olHy`uVBq!ia0vp^0zj<50wfrI3wa3wsR~aQ#}J9By=ONHHXHD?CiXU% zcerMm&ok5Bz*O$Dpv~@NY)0`l9*&ocysY(K=jz=4;#9)UylaNWqHiDfsrM;gJ)`+_ z)5DVv@jn@_FfeaEX_(qIxA5hOkN*o7=x|Az$l;iz1_MJN W-}&kLs-l`frh2;ixvX#Xb6Mw<&;$UoLme6b literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8359788_3.png b/graphics/door_anims/frame_8359788_3.png new file mode 100644 index 0000000000000000000000000000000000000000..f103be5a1386113ba2200facc1fa4ce28d6a97c2 GIT binary patch literal 88 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~c0wfp&-k$XWQu3ZIjv*W~lPlO+dGg;k9kgX( k)?-x?nJV&Cfk!llhaovhk8xH^Zw5$mdKI;Vst0O0ErSpWb4 literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8359788_4.png b/graphics/door_anims/frame_8359788_4.png new file mode 100644 index 0000000000000000000000000000000000000000..36f6cf135efeeb0618ffa5b361593f8a42f3c85d GIT binary patch literal 80 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~c0wfp&-k$XWQsSO2jv*W~lPlO+dGg;k9kgX( c)^lZHX3+U+HQDxeqCH5dr>mdKI;Vst09pPK@&Et; literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8359988_1.png b/graphics/door_anims/frame_8359988_1.png new file mode 100644 index 0000000000000000000000000000000000000000..75a43b9fbc9c0c0e7dadb34307b0c39547861206 GIT binary patch literal 104 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~c0wfp&-k$XWQu>}Qjv*W~lPgXvU}52^;o+B@ zvNk-|E%m@s5eW&2hMw&P$4;{cth~-I!ph1j`hy{km;dL@OVbm-vG`-7phe_CI*Fs2(=ioG$=8=SSH2!xcAT*kWrql KelF{r5}E+{R3zpA literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8359988_3.png b/graphics/door_anims/frame_8359988_3.png new file mode 100644 index 0000000000000000000000000000000000000000..d7abc49baaace058a2b29dc170f2422790c3d012 GIT binary patch literal 102 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~c0wfp&-k$XWQo5cljv*W~lPlO+_@|0|m1y|# zx|UzDr+oLqp6&1D93{#{L=$;B9&Jxwpd`S?@Rv>Pk$}VrVUPiyu6{1-oD!M<)PEc* literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8359988_4.png b/graphics/door_anims/frame_8359988_4.png new file mode 100644 index 0000000000000000000000000000000000000000..1af99db238499b12ffbba4799f0be74abf82ac91 GIT binary patch literal 90 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~c0wfp&-k$XWQi`4~jv*W~lPlO+c~10fFMoe; nFMHY?%VM@OJDSfioK!Gmkltp|Vo{V?1=8f{>gTe~DWM4fpd}cm literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8359B88_1.png b/graphics/door_anims/frame_8359B88_1.png new file mode 100644 index 0000000000000000000000000000000000000000..a5208db18dec0cea5330f67af2b3e36ab139c709 GIT binary patch literal 105 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~c0wfp&-k$XWQU;zbjv*W~lPmr@aB_(JkchJn zNJvOvFuHe8f?sk$5Wl1dD=X_n$@dEy9=?q=*ul=Q>AYm^+joIwATvB&{an^LB{Ts5 D>|h-y literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8359B88_2.png b/graphics/door_anims/frame_8359B88_2.png new file mode 100644 index 0000000000000000000000000000000000000000..e3ecef0fe4fc9cb4f5dd6b3f82d27de7a2ff5614 GIT binary patch literal 109 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~c0wfp&-k$XWQYM}*jv*W~O^bP0 Hl+XkKtk)m@ literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8359B88_3.png b/graphics/door_anims/frame_8359B88_3.png new file mode 100644 index 0000000000000000000000000000000000000000..d4be7a81fb7d3359e985f49a8f7d5d57f97bca4e GIT binary patch literal 109 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~c0wfp&-k$XWQYM}*jv*W~lPkWzJ2$i3tE-Af z;n>V}g=4pk)6dOmHaus;V)U*-;(0=kaTQO3gTe~ HDWM4fPTwKH literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8359B88_4.png b/graphics/door_anims/frame_8359B88_4.png new file mode 100644 index 0000000000000000000000000000000000000000..4ba80f9981c898e52abb42b85afcb34ed957cb2b GIT binary patch literal 89 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~c0wfp&-k$XWQVO0fjv*W~lPkWzJ142I<9I{D m9^2+~JDSfmoM4blU%b`^-NROwhpUXO@geCyQxfw

literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8359CA8_2.png b/graphics/door_anims/frame_8359CA8_2.png new file mode 100644 index 0000000000000000000000000000000000000000..800bb92c455f53af0817feaee1c1eec7a787cd76 GIT binary patch literal 139 zcmeAS@N?(olHy`uVBq!ia0vp^0zj<50wfrI3wa3wsUS}m#}J9B$v1dec~&oAkUuQJ zC7`4iaDc)5Igg0JoW0DA9LKCR5)vx77rir7kZ2NUQxKIrf9cYv0LlFK_x7@<7&u5c m+`iu^@m|4XMyWX010III_8WMNXB6v$Z1HsUb6Mw<&;$T!K`7Dy literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8359CA8_3.png b/graphics/door_anims/frame_8359CA8_3.png new file mode 100644 index 0000000000000000000000000000000000000000..e2f16ef25236bebf94276de57fa952bd7881117e GIT binary patch literal 117 zcmeAS@N?(olHy`uVBq!ia0vp^0zj<50wfrI3wa3wDH~50#}J9B$v1dec~&oAkUuQJ zC7`4iaDc)5Igg0JoW0DA9LKCR7H~g~l#);|y!5V#vFW3Z_}s$pdQ!{`!kdq)w`FF4 PjAQV0^>bP0l+XkK`LrI% literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8359FC8_1.png b/graphics/door_anims/frame_8359FC8_1.png new file mode 100644 index 0000000000000000000000000000000000000000..9428b111a72f7c1d3acd4d19289f2a249dd79119 GIT binary patch literal 132 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fEx-kvUwAsjP9&u-*pP~>4g@W#Gt zf4_i#Z%|6>{in&ytn2*zRHO|yUE=)^8QIany*|I@9^aoit1cD0E|4sG_{RQ( z=n{WH8^?2B&oVnYdfZt*FDKKOL66fo`hxtga>x6-rm)H!X_{1Hro{Mci=f`mGcggo X)f-~=-$-CM1~S*v)z4*}Q$iB}eH$pV literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_8359FC8_3.png b/graphics/door_anims/frame_8359FC8_3.png new file mode 100644 index 0000000000000000000000000000000000000000..467c04f7f7be4732e988ce2538163346fc563b07 GIT binary patch literal 103 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExdY&$hAsjQ4BUl-COMEacV`iMO z@%fpV#tO$?8NcYUeZjMVhbx)iidl&{Wlkd#Lq|dEyx0G`%0VW0y85}Sb4q9e02cop A@c;k- literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_835A168_1.png b/graphics/door_anims/frame_835A168_1.png new file mode 100644 index 0000000000000000000000000000000000000000..f23474512d40b8c8e1d1ae68b2d913712920a167 GIT binary patch literal 121 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fEx4xTQKAsjQ4GlDL?c)=jVQz3Eo zn3$}rLz9Wy`I*A9a~+x%et*~77wN!s4v*}6e z?&~`@^Q>6Hu{EI?J?BDS^h74Oo#zx-{G7%4J@0}utL{m2uz7r56)G#sqhKenCLw~A YmBH<`^AaIj`)H8Kp00i_>zopr0Qt3(~#o@Q}I&p#iY*Cik$JYD@<);T3K0RTGo B9Wwv` literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_835A308_1.png b/graphics/door_anims/frame_835A308_1.png new file mode 100644 index 0000000000000000000000000000000000000000..c11c06156efbcc2a519d33772a18368d9077bf26 GIT binary patch literal 128 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fEx?w&4=AsjQ4GcLVgXj0>CQ&Uyo z_DD!Hk&Z4YVc=XOv38-LtgHjmnHMaEQ86}FX^fl`Jf3S!;J9!sa&-fX^K&hOh=Uur axES_bHrsP&+xb->qdi^yT-G@yGywqbKqc@1 literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_835A308_2.png b/graphics/door_anims/frame_835A308_2.png new file mode 100644 index 0000000000000000000000000000000000000000..3d825f587d522452249e57e921aa9a653b4d1ff8 GIT binary patch literal 130 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExo}Mm_AsjQ4GcLVgXj0>4v*}6e z?&~`@^Q>6Hu{EI?J?BC-daiLSIJ4>+2g~B4%o>|l0STrg23Ln!;cH*LNMQKbn812i bOM`*o`YDGUMFuI#Aj3Uf{an^LB{Ts5sn06j literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_835A308_3.png b/graphics/door_anims/frame_835A308_3.png new file mode 100644 index 0000000000000000000000000000000000000000..e87798cd2de056662d621ee3cdd308fa54fc181b GIT binary patch literal 104 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fEx`kpS1AsjQ4Uot3(~#o@Q}I&p#iY*Cik$JYD@<);T3K0RTGo B9Wwv` literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_835A4A8_1.png b/graphics/door_anims/frame_835A4A8_1.png new file mode 100644 index 0000000000000000000000000000000000000000..9428b111a72f7c1d3acd4d19289f2a249dd79119 GIT binary patch literal 132 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fEx-kvUwAsjP9&u-*pP~>4g@W#Gt zf4_i#Z%|6>{in&ytn2*zRHO|yUE=)^8QIany*|I@9^aoit1cD0E|4sG_{RQ( z=n{WH8^?2B&oVnYdfZt*FDKKOL66fo`hxtga>x6-rm)H!X_{1Hro{Mci=f`mGcggo X)f-~=-$-CM1~S*v)z4*}Q$iB}eH$pV literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_835A4A8_3.png b/graphics/door_anims/frame_835A4A8_3.png new file mode 100644 index 0000000000000000000000000000000000000000..467c04f7f7be4732e988ce2538163346fc563b07 GIT binary patch literal 103 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExdY&$hAsjQ4BUl-COMEacV`iMO z@%fpV#tO$?8NcYUeZjMVhbx)iidl&{Wlkd#Lq|dEyx0G`%0VW0y85}Sb4q9e02cop A@c;k- literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_835A648_1.png b/graphics/door_anims/frame_835A648_1.png new file mode 100644 index 0000000000000000000000000000000000000000..7cac61ead5b42f8893b9a96652175a902330c7af GIT binary patch literal 144 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fEx;hrvzAsjPJ&ukPupuoWr5O#t0 zNY|z3lcrw^IU+bi)!Fqz%-8#}{7i09flTiXwVD^bmbPV`cd7hy-=D?vJb%b=dpn4) rN^Vk>^K*V+WNfi)=afAWftx1t-#u!<-l%!zHOMMYS3j3^P6i literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_835A648_2.png b/graphics/door_anims/frame_835A648_2.png new file mode 100644 index 0000000000000000000000000000000000000000..618b958b96bbda6d81f8ab74fdf6a59df9affd97 GIT binary patch literal 130 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExo}Mm_AsjPfPj2KrV8G!L7}n7H zSZmA54eAQ!Zff0}Zqq)kUT$rb&b~QtLFb=?o&P)(#rLj{5#dfgY_HJ}_Thko536}s cdRog>?zU$RE*H3#9|ali>FVdQ&MBb@0ExaUg8%>k literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_835A648_3.png b/graphics/door_anims/frame_835A648_3.png new file mode 100644 index 0000000000000000000000000000000000000000..28942389b3fa3c0ec08dbed2f586ab7c92d51a1f GIT binary patch literal 103 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExdY&$hAsjQ4UoS^|rUMXi#>teAD056x&j*KmSCa`gfRhJ~#@aqdpKNgxwEUHx3vIVCg!043!e AQ2+n{ literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_835A7E8_1.png b/graphics/door_anims/frame_835A7E8_1.png new file mode 100644 index 0000000000000000000000000000000000000000..2b51bba5fc5f502c0c7445e043ad68d4ad8d356d GIT binary patch literal 140 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fEx!JaOTAsjQ4BZ{A0SrzKgl=${; z^y)B1&Nf%CCBsu%QJO?T)CT^;t;l37LK h+8oB_V4m~^3=D2JePe%q`(6gJ#?#f$Wt~$(695RQE!hA7 literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_835A7E8_2.png b/graphics/door_anims/frame_835A7E8_2.png new file mode 100644 index 0000000000000000000000000000000000000000..b29303c1bc69e35996b90665dab1b245f88935ce GIT binary patch literal 138 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExfu1goAsjPf&m81EV8Frb@GQ~f z*rSQ;jhwSM1%wTJ6}v>X*3C`1xj;{}bVE)AQ*yH)n<-oFndb>d`Hl5vRPE!s(cWsc kWzDl@Irol+V|~tZ_Be}$)!voRxCpYu)78&qol`;+0Bn6M@Bjb+ literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_835A7E8_3.png b/graphics/door_anims/frame_835A7E8_3.png new file mode 100644 index 0000000000000000000000000000000000000000..55e1b2db9aee2f9e0cb27207836736ea98f2c667 GIT binary patch literal 107 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExMxHK?AsjQ4BUo8^en_q^e}8W; z_mLaL&(6#YKGAbE{eoom1<3?Skz;Zi$!8@s9`lGWFckfdT^-S)GYe#jr>mdKI;Vst E02g^7qyPW_ literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_835A988_1.png b/graphics/door_anims/frame_835A988_1.png new file mode 100644 index 0000000000000000000000000000000000000000..9428b111a72f7c1d3acd4d19289f2a249dd79119 GIT binary patch literal 132 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fEx-kvUwAsjP9&u-*pP~>4g@W#Gt zf4_i#Z%|6>{in&ytn2*zRHO|yUE=)^8QIany*|I@9^aoit1cD0E|4sG_{RQ( z=n{WH8^?2B&oVnYdfZt*FDKKOL66fo`hxtga>x6-rm)H!X_{1Hro{Mci=f`mGcggo X)f-~=-$-CM1~S*v)z4*}Q$iB}eH$pV literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_835A988_3.png b/graphics/door_anims/frame_835A988_3.png new file mode 100644 index 0000000000000000000000000000000000000000..467c04f7f7be4732e988ce2538163346fc563b07 GIT binary patch literal 103 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx+BpCi@`0fExdY&$hAsjQ4BUl-COMEacV`iMO z@%fpV#tO$?8NcYUeZjMVhbx)iidl&{Wlkd#Lq|dEyx0G`%0VW0y85}Sb4q9e02cop A@c;k- literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_835AB28_1.png b/graphics/door_anims/frame_835AB28_1.png new file mode 100644 index 0000000000000000000000000000000000000000..73f90730c1aceb7b61958ff5625cb59300ee2c1a GIT binary patch literal 223 zcmeAS@N?(olHy`uVBq!ia0vp^0zj<50wfrI3wa3wsb!unjv*3LL(kZ99dZz8d$=-) z?Q%rdGo5Q?+om<%N#Qsc#1W_PX5N8Vet{3lxmW>1!k{?9s8L3`*Z`I79`AOy%1WNo8M#DAbaJ=#+QqqYb`2p z+2C;c%}3u!Yj^)VRc*ko-Cc7eb@u{MR<{T`YyhiGO(vO5T#ijnCr6yfM zKK#D7qSCT?B}27CHGCZyuP_u=v+2pQFVGY`xR7B%_9?SF9UKB|JFiCFyEyfe;7yjg zBgr%UKm2iy+IjwPjLqkV(lbBs-^qE$u2XeF;I7$5-Mi%*Yoqouh%&62WIiXj1ms*# LS3j3^P6gTe~DWM4f0r*U< literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_835AE48_1.png b/graphics/door_anims/frame_835AE48_1.png new file mode 100644 index 0000000000000000000000000000000000000000..6d9956306e907ce3f6ea0c1198f0f792092e6d7d GIT binary patch literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^0zj<50wfrI3wa3wsSr;W#}J9B$rjA4Ji8Y%$S-E* zl1Ou6Jj~PKpzg$b=fLK21%ZPV?5sRIJbS+1i%UpwFkoR#eZP0FhK2_}+oZQO@9)_% o1iinvcW?D~xeJNq3mMKaFl_qMzcufe*fo$np00i_>zopr0M`;MkN^Mx literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_835AE48_2.png b/graphics/door_anims/frame_835AE48_2.png new file mode 100644 index 0000000000000000000000000000000000000000..62b93f79e2adb3355070f96333fe74b3bfc6021d GIT binary patch literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^0zj<50wfrI3wa3wsSr;W#}J9B$rjA4Ji8Y%$S-E* zl1Ou6Jj~PKpzg$b=fLK21%ZPV?5sRI`Hoj?*;t$f4hbw#dK?)QC8zcH?cLqq8+h0_ om@|G`3p|!>VcY!9iE$1i!@{TASzAK`EkO2oy85}Sb4q9e06tqM(f|Me literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_835AE48_3.png b/graphics/door_anims/frame_835AE48_3.png new file mode 100644 index 0000000000000000000000000000000000000000..a980732357d7674dd66648d4a9c38461d90d091c GIT binary patch literal 119 zcmeAS@N?(olHy`uVBq!ia0vp^0zj<50wfrI3wa3wDLYRW#}J9B$rjA4Ji8Y%$S-E* zl1Ou6Jj~PKpzg$b=fLK21%ZPV?5rh;Hr~w4DsH!84IB*SJzZq{?w)Hh1H%rla|$y5 Rq|!kqdb;|#taD0e0ssmjA65VW literal 0 HcmV?d00001 diff --git a/graphics/door_anims/frame_835B168_1.png b/graphics/door_anims/frame_835B168_1.png new file mode 100644 index 0000000000000000000000000000000000000000..7c75282d6cf5473a15c3de8d2b7b0a10cb80fdb8 GIT binary patch literal 137 zcmeAS@N?(olHy`uVBq!ia0vp^0zj<50wfrI3wa3wsQ^zG#}J9B$r|lUY(8z=A_;WI%R{H`a(%<#r{-*N-xVsDUX Mp00i_>zopr0Nl_YMF0Q* literal 0 HcmV?d00001 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; From 4c61bead05968e0404ea074bed4da5edb2645b90 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 12 Nov 2019 13:53:47 -0500 Subject: [PATCH 4/9] 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; +} From e2005e194dee022b422e07c0f8efeeea490e55e0 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 12 Nov 2019 14:34:14 -0500 Subject: [PATCH 5/9] 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) { From 9c27830791ba648ce0c470eac53a100e508247b9 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 12 Nov 2019 14:36:06 -0500 Subject: [PATCH 6/9] 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}, From 5cc2701e4721bd885da7d9f01943d396775e51d9 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 12 Nov 2019 15:20:54 -0500 Subject: [PATCH 7/9] 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 7c99bf40b99f70e9ff8d76162b54a0b95c0aa7f0..9bea735dd29aca129d8b538b5333e7e31d372451 100644 GIT binary patch delta 39 ucmdlrTkPO0v4$;-`it8$7Bgz`!O%I9y delta 152 zcmX>&OKjI{v4$;-`isp37)(N6vT=mI24WBm#1Ek~i0$}>je~=ki Date: Tue, 12 Nov 2019 15:24:36 -0500 Subject: [PATCH 8/9] 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; From f04e6737b2073446efa285cfa74a80ee23649afd Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 12 Nov 2019 15:30:48 -0500 Subject: [PATCH 9/9] 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