From fa08c0e69119612aea64e72695f9d9e69f946a4d Mon Sep 17 00:00:00 2001 From: Kermalis <29823718+Kermalis@users.noreply.github.com> Date: Sun, 10 Nov 2024 15:11:07 -0500 Subject: [PATCH] dungeon_serializer.c --- asm/code_80450F8.s | 8 +- asm/code_8069E0C.s | 2 +- asm/code_807E5AC.s | 2 +- asm/code_8080CF0.s | 1010 ----------------- charmap.txt | 9 +- data/data_80F4E2C.s | 9 +- data/data_80F59C8.s | 3 +- data/data_8107010.s | 1534 +------------------------ data/data_8107224.s | 1523 +++++++++++++++++++++++++ data/move/move_names.s | 4 +- include/code_800F958.h | 8 + include/code_8041AD0.h | 5 +- include/code_8045A00.h | 4 +- include/code_8092334.h | 9 +- include/data_serializer.h | 13 + include/dungeon_map_access.h | 4 +- include/dungeon_serializer.h | 11 + include/pokemon.h | 2 +- include/structs/dungeon_entity.h | 70 +- include/structs/str_damage.h | 7 +- include/structs/str_dungeon.h | 77 +- ld_script.txt | 5 +- src/code_800F958.c | 4 +- src/code_803E724.c | 1 - src/code_8040094.c | 1 - src/code_8041AD0.c | 1 - src/code_804267C.c | 3 +- src/code_8042B34.c | 19 +- src/code_8048480.c | 2 +- src/code_805D8C8.c | 34 +- src/code_805D8C8_1.c | 1 - src/code_8069E0C.c | 25 +- src/code_806CD90.c | 6 +- src/code_80718D8.c | 2 +- src/code_8073CF0.c | 4 +- src/code_8075708.c | 1 - src/code_8077274_1.c | 10 +- src/code_807CD9C.c | 2 +- src/code_8083288.c | 548 --------- src/data/dungeon_serializer.h | 10 + src/dungeon_cutscenes.c | 3 +- src/dungeon_items.c | 2 +- src/dungeon_move.c | 2 +- src/dungeon_serializer.c | 1816 ++++++++++++++++++++++++++++++ src/status.c | 18 +- src/status_actions.c | 5 +- src/tile_types.c | 1 - src/trap.c | 3 +- src/trap_1.c | 977 +--------------- sym_ewram2.txt | 4 +- 50 files changed, 3602 insertions(+), 4222 deletions(-) delete mode 100644 asm/code_8080CF0.s create mode 100644 data/data_8107224.s create mode 100644 include/code_800F958.h create mode 100644 include/data_serializer.h create mode 100644 include/dungeon_serializer.h delete mode 100644 src/code_8083288.c create mode 100644 src/data/dungeon_serializer.h create mode 100644 src/dungeon_serializer.c diff --git a/asm/code_80450F8.s b/asm/code_80450F8.s index 92463056..afbd0fef 100644 --- a/asm/code_80450F8.s +++ b/asm/code_80450F8.s @@ -87,7 +87,7 @@ _0804540C: strh r2, [r0, 0x2] movs r0, 0 mov r1, r8 - bl sub_8069F54 + bl GetMonsterApparentID ldr r1, [r4, 0x70] strh r0, [r1, 0x4] ldr r0, [r4, 0x70] @@ -95,7 +95,7 @@ _0804540C: strb r5, [r0, 0x6] movs r0, 0 mov r1, r8 - bl sub_8069F54 + bl GetMonsterApparentID lsls r0, 16 asrs r0, 16 bl GetSpriteData @@ -280,7 +280,7 @@ _0804557A: strh r2, [r0, 0x2] movs r0, 0 mov r1, r8 - bl sub_8069F54 + bl GetMonsterApparentID ldr r1, [r4, 0x70] strh r0, [r1, 0x4] ldr r0, [r4, 0x70] @@ -288,7 +288,7 @@ _0804557A: strb r3, [r0, 0x6] movs r0, 0 mov r1, r8 - bl sub_8069F54 + bl GetMonsterApparentID lsls r0, 16 asrs r0, 16 bl GetSpriteData diff --git a/asm/code_8069E0C.s b/asm/code_8069E0C.s index fc6d1192..28075ac1 100644 --- a/asm/code_8069E0C.s +++ b/asm/code_8069E0C.s @@ -3136,7 +3136,7 @@ sub_806BB6C: str r6, [sp, 0xC] movs r0, 0 adds r1, r4, 0 - bl sub_8069F54 + bl GetMonsterApparentID lsls r0, 16 adds r1, r7, 0 adds r1, 0x22 diff --git a/asm/code_807E5AC.s b/asm/code_807E5AC.s index be82e0ed..10d05dfe 100644 --- a/asm/code_807E5AC.s +++ b/asm/code_807E5AC.s @@ -421,7 +421,7 @@ _0807E9A4: movs r0, 0x2 ldrsh r1, [r4, r0] adds r0, r5, 0 - bl sub_8069F54 + bl GetMonsterApparentID b _0807E9D8 .align 2, 0 _0807E9D0: .4byte 0xfffffe88 diff --git a/asm/code_8080CF0.s b/asm/code_8080CF0.s deleted file mode 100644 index 00c92aa9..00000000 --- a/asm/code_8080CF0.s +++ /dev/null @@ -1,1010 +0,0 @@ - #include "asm/constants/gba_constants.inc" - #include "asm/macros.inc" - - .syntax unified - - .text - - thumb_func_start RestoreDungeonEntity -RestoreDungeonEntity: - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - ldr r4, _0808266C - add sp, r4 - adds r5, r0, 0 - str r2, [sp, 0x210] - lsls r1, 24 - lsrs r1, 24 - str r1, [sp, 0x20C] - movs r2, 0x82 - lsls r2, 2 - mov r0, sp - movs r1, 0 - bl memset - adds r0, r5, 0 - bl ReadU8 - adds r0, r5, 0 - bl ReadU8 - adds r0, r5, 0 - bl ReadU8 - lsls r0, 24 - lsrs r0, 24 - str r0, [sp, 0x214] - add r4, sp, 0x208 - adds r0, r5, 0 - adds r1, r4, 0 - bl ReadPosition8 - adds r0, r5, 0 - bl ReadBool8 - lsls r0, 24 - lsrs r0, 24 - str r0, [sp, 0x218] - adds r0, r5, 0 - bl ReadU16 - lsls r0, 16 - lsrs r0, 16 - str r0, [sp, 0x21C] - ldr r1, _08082670 - movs r0, 0 - str r0, [r1] - adds r0, r5, 0 - bl ReadU16 - mov r1, sp - strh r0, [r1] - adds r0, r5, 0 - bl sub_8082BC0 - mov r1, sp - strh r0, [r1, 0x4] - adds r0, r5, 0 - bl sub_8082BC0 - mov r1, sp - strh r0, [r1, 0x2] - adds r0, r5, 0 - bl ReadBool8 - mov r1, sp - strb r0, [r1, 0x6] - adds r0, r5, 0 - bl ReadBool8 - mov r1, sp - strb r0, [r1, 0x7] - adds r0, r5, 0 - bl ReadU8 - mov r1, sp - strb r0, [r1, 0x8] - adds r0, r5, 0 - bl ReadU8 - mov r1, sp - strb r0, [r1, 0x9] - adds r0, r5, 0 - bl ReadU8 - mov r1, sp - strb r0, [r1, 0xA] - add r1, sp, 0x40 - adds r0, r5, 0 - bl ReadJoinedAt - adds r0, r5, 0 - bl ReadS16 - mov r1, sp - strh r0, [r1, 0xC] - adds r0, r5, 0 - bl ReadS16 - mov r1, sp - strh r0, [r1, 0xE] - adds r0, r5, 0 - bl ReadS16 - mov r1, sp - strh r0, [r1, 0x10] - adds r0, r5, 0 - bl ReadS16 - mov r1, sp - strh r0, [r1, 0x12] - adds r0, r5, 0 - bl ReadU8 - mov r1, sp - strb r0, [r1, 0x14] - adds r0, r5, 0 - bl ReadU8 - mov r1, sp - strb r0, [r1, 0x15] - adds r0, r5, 0 - bl ReadU8 - mov r1, sp - strb r0, [r1, 0x16] - adds r0, r5, 0 - bl ReadU8 - mov r1, sp - strb r0, [r1, 0x17] - adds r0, r5, 0 - bl sub_80831A0 - str r0, [sp, 0x18] - adds r0, r5, 0 - bl ReadS16 - mov r1, sp - strh r0, [r1, 0x1C] - adds r0, r5, 0 - bl ReadS16 - mov r1, sp - strh r0, [r1, 0x1E] - adds r0, r5, 0 - bl ReadS16 - mov r1, sp - strh r0, [r1, 0x20] - adds r0, r5, 0 - bl ReadS16 - mov r1, sp - strh r0, [r1, 0x22] - adds r0, r5, 0 - bl ReadS16 - mov r1, sp - strh r0, [r1, 0x24] - adds r0, r5, 0 - bl ReadS16 - mov r1, sp - strh r0, [r1, 0x26] - adds r0, r5, 0 - bl ReadS16 - mov r1, sp - strh r0, [r1, 0x28] - adds r0, r5, 0 - bl sub_80831C8 - str r0, [sp, 0x2C] - adds r0, r5, 0 - bl sub_80831C8 - str r0, [sp, 0x30] - adds r0, r5, 0 - bl sub_80831C8 - str r0, [sp, 0x34] - adds r0, r5, 0 - bl sub_80831C8 - str r0, [sp, 0x38] - add r1, sp, 0x44 - adds r0, r5, 0 - bl ReadActionContainer - adds r0, r5, 0 - bl sub_8082BFC - add r1, sp, 0x5C - strb r0, [r1] - adds r0, r5, 0 - bl sub_8082BFC - mov r1, sp - adds r1, 0x5D - strb r0, [r1] - adds r0, r5, 0 - bl sub_8082C18 - mov r1, sp - adds r1, 0x5E - strb r0, [r1] - adds r0, r5, 0 - bl sub_8082C18 - mov r1, sp - adds r1, 0x5F - strb r0, [r1] - add r1, sp, 0x60 - adds r0, r5, 0 - bl sub_80820A8 - adds r0, r5, 0 - bl sub_8082BE0 - add r1, sp, 0x64 - strb r0, [r1] - add r7, sp, 0x78 - add r0, sp, 0x8C - mov r8, r0 - add r1, sp, 0x90 - mov r9, r1 - add r2, sp, 0x94 - mov r10, r2 - mov r3, sp - adds r3, 0x3C - str r3, [sp, 0x270] - mov r0, sp - adds r0, 0x98 - str r0, [sp, 0x274] - mov r1, sp - adds r1, 0x9C - str r1, [sp, 0x278] - mov r2, sp - adds r2, 0xA0 - str r2, [sp, 0x27C] - adds r3, 0x6C - str r3, [sp, 0x284] - adds r0, 0x14 - str r0, [sp, 0x288] - adds r1, 0x14 - str r1, [sp, 0x28C] - adds r2, 0x1C - str r2, [sp, 0x290] - adds r3, 0x18 - str r3, [sp, 0x294] - adds r0, 0x18 - str r0, [sp, 0x298] - adds r1, 0x18 - str r1, [sp, 0x29C] - adds r2, 0x14 - str r2, [sp, 0x220] - adds r3, 0x1C - str r3, [sp, 0x224] - adds r0, 0x1C - str r0, [sp, 0x228] - adds r1, 0x1C - str r1, [sp, 0x22C] - adds r2, 0x18 - str r2, [sp, 0x230] - adds r3, 0x10 - str r3, [sp, 0x234] - adds r0, 0x10 - str r0, [sp, 0x238] - adds r1, 0xD - str r1, [sp, 0x23C] - adds r2, 0xA - str r2, [sp, 0x240] - adds r3, 0x7 - str r3, [sp, 0x244] - adds r0, 0x4 - str r0, [sp, 0x248] - adds r1, 0xA - str r1, [sp, 0x25C] - adds r2, 0x3 - str r2, [sp, 0x24C] - adds r3, 0x3 - str r3, [sp, 0x250] - adds r0, 0x3 - str r0, [sp, 0x254] - subs r1, 0x1 - str r1, [sp, 0x258] - adds r2, 0x7 - str r2, [sp, 0x260] - adds r3, 0x7 - str r3, [sp, 0x264] - adds r0, 0x7 - str r0, [sp, 0x268] - adds r1, 0x5 - str r1, [sp, 0x26C] - subs r2, 0x58 - str r2, [sp, 0x280] - add r4, sp, 0x68 - movs r6, 0x3 -_080824DC: - adds r0, r5, 0 - adds r1, r4, 0 - bl ReadPosition8 - adds r4, 0x4 - subs r6, 0x1 - cmp r6, 0 - bge _080824DC - adds r0, r5, 0 - adds r1, r7, 0 - bl ReadAITarget - adds r0, r5, 0 - mov r1, r8 - bl Read3Bytes - adds r0, r5, 0 - mov r1, r9 - bl Read3Bytes - adds r0, r5, 0 - bl sub_8082C84 - movs r4, 0 - mov r3, r10 - strb r0, [r3] - adds r0, r5, 0 - ldr r1, [sp, 0x270] - bl ReadHiddenPower - adds r0, r5, 0 - bl sub_80831A0 - ldr r1, [sp, 0x274] - str r0, [r1] - adds r0, r5, 0 - bl sub_80831A0 - ldr r2, [sp, 0x278] - str r0, [r2] - adds r0, r5, 0 - bl sub_80831A0 - ldr r3, [sp, 0x27C] - str r0, [r3] - adds r0, r5, 0 - ldr r1, [sp, 0x284] - bl ReadSleep - adds r0, r5, 0 - ldr r1, [sp, 0x288] - bl ReadNonVolatile - adds r0, r5, 0 - ldr r1, [sp, 0x28C] - bl ReadImmobilize - adds r0, r5, 0 - ldr r1, [sp, 0x290] - bl ReadVolatileStatus - adds r0, r5, 0 - ldr r1, [sp, 0x294] - bl ReadCharging - adds r0, r5, 0 - ldr r1, [sp, 0x298] - bl ReadProtection - adds r0, r5, 0 - ldr r1, [sp, 0x29C] - bl ReadWaiting - adds r0, r5, 0 - ldr r1, [sp, 0x220] - bl ReadLinked - adds r0, r5, 0 - ldr r1, [sp, 0x224] - bl ReadMoveStatus - adds r0, r5, 0 - ldr r1, [sp, 0x228] - bl sub_8082E88 - adds r0, r5, 0 - ldr r1, [sp, 0x22C] - bl ReadTransformStatus - adds r0, r5, 0 - ldr r1, [sp, 0x230] - bl ReadEyesightStatus - adds r0, r5, 0 - ldr r1, [sp, 0x234] - bl ReadMuzzled - adds r0, r5, 0 - bl ReadBool8 - ldr r1, [sp, 0x238] - strb r0, [r1] - adds r0, r5, 0 - bl ReadBool8 - ldr r2, [sp, 0x23C] - strb r0, [r2] - adds r0, r5, 0 - bl ReadBool8 - ldr r3, [sp, 0x240] - strb r0, [r3] - adds r0, r5, 0 - bl ReadBool8 - ldr r1, [sp, 0x244] - strb r0, [r1] - adds r0, r5, 0 - bl ReadBool8 - ldr r2, [sp, 0x248] - strb r0, [r2] - adds r0, r5, 0 - bl ReadU8 - ldr r3, [sp, 0x25C] - strb r0, [r3] - adds r0, r5, 0 - bl ReadBool8 - ldr r1, [sp, 0x24C] - strb r0, [r1] - adds r0, r5, 0 - bl ReadBool8 - ldr r2, [sp, 0x250] - strb r0, [r2] - adds r0, r5, 0 - bl ReadBool8 - ldr r3, [sp, 0x254] - strb r0, [r3] - adds r0, r5, 0 - bl ReadU8 - ldr r1, [sp, 0x258] - strb r0, [r1] - adds r0, r5, 0 - bl ReadBool8 - ldr r2, [sp, 0x260] - strb r0, [r2] - adds r0, r5, 0 - bl ReadU8 - ldr r3, [sp, 0x264] - strb r0, [r3] - adds r0, r5, 0 - bl ReadU8 - ldr r1, [sp, 0x268] - strb r0, [r1] - adds r0, r5, 0 - bl sub_8082C34 - ldr r2, [sp, 0x26C] - strb r0, [r2] - adds r0, r5, 0 - bl sub_8082C50 - add r1, sp, 0x100 - strb r0, [r1] - adds r0, r5, 0 - bl sub_8082C6C - add r1, sp, 0x104 - str r0, [r1] - add r1, sp, 0x108 - adds r0, r5, 0 - movs r2, 0x5 - bl xxx_ReadBytes - ldr r1, _08082674 - add r1, sp - adds r0, r5, 0 - movs r2, 0x5 - bl xxx_ReadBytes - adds r0, r5, 0 - bl ReadU8 - movs r1, 0x89 - lsls r1, 1 - add r1, sp - strb r0, [r1] - adds r0, r5, 0 - bl ReadU8 - b _08082678 - .align 2, 0 -_0808266C: .4byte 0xfffffd60 -_08082670: .4byte gLeaderPointer -_08082674: .4byte 0x0000010d -_08082678: - ldr r1, _08082818 - add r1, sp - strb r0, [r1] - adds r0, r5, 0 - bl ReadU8 - add r1, sp, 0x114 - lsls r0, 24 - lsrs r0, 24 - str r0, [r1] - add r1, sp, 0x118 - adds r0, r5, 0 - bl ReadMoves - add r1, sp, 0x13C - adds r0, r5, 0 - bl sub_8082F48 - add r1, sp, 0x140 - adds r0, r5, 0 - bl sub_8082F48 - adds r0, r5, 0 - bl ReadBool8 - add r1, sp, 0x144 - strb r0, [r1] - adds r0, r5, 0 - bl ReadBool8 - ldr r1, _0808281C - add r1, sp - strb r0, [r1] - adds r0, r5, 0 - bl ReadBool8 - ldr r1, _08082820 - add r1, sp - strb r0, [r1] - adds r0, r5, 0 - bl ReadBool8 - movs r1, 0xA3 - lsls r1, 1 - add r1, sp - strb r0, [r1] - adds r0, r5, 0 - bl ReadBool8 - add r1, sp, 0x148 - strb r0, [r1] - adds r0, r5, 0 - bl ReadBool8 - ldr r1, _08082824 - add r1, sp - strb r0, [r1] - adds r0, r5, 0 - bl ReadBool8 - movs r1, 0xA5 - lsls r1, 1 - add r1, sp - strb r0, [r1] - adds r0, r5, 0 - bl ReadBool8 - ldr r1, _08082828 - add r1, sp - strb r0, [r1] - adds r0, r5, 0 - bl ReadBool8 - add r1, sp, 0x14C - strb r0, [r1] - adds r0, r5, 0 - bl ReadU16 - movs r1, 0xA7 - lsls r1, 1 - add r1, sp - strh r0, [r1] - adds r0, r5, 0 - bl ReadU16 - add r1, sp, 0x150 - strh r0, [r1] - adds r0, r5, 0 - bl ReadBool8 - movs r1, 0xA9 - lsls r1, 1 - add r1, sp - strb r0, [r1] - adds r0, r5, 0 - bl ReadU8 - ldr r1, _0808282C - add r1, sp - strb r0, [r1] - adds r0, r5, 0 - bl ReadBool8 - add r1, sp, 0x154 - strb r0, [r1] - adds r0, r5, 0 - bl ReadBool8 - ldr r1, _08082830 - add r1, sp - strb r0, [r1] - adds r0, r5, 0 - bl ReadBool8 - movs r1, 0xAB - lsls r1, 1 - add r1, sp - strb r0, [r1] - adds r0, r5, 0 - bl ReadU8 - add r1, sp, 0x164 - strb r0, [r1] - adds r0, r5, 0 - bl ReadU8 - ldr r1, _08082834 - add r1, sp - strb r0, [r1] - adds r0, r5, 0 - bl ReadU8 - movs r1, 0xB3 - lsls r1, 1 - add r1, sp - strb r0, [r1] - adds r0, r5, 0 - bl ReadU8 - ldr r1, _08082838 - add r1, sp - strb r0, [r1] - adds r0, r5, 0 - bl ReadU8 - add r1, sp, 0x168 - strb r0, [r1] - adds r0, r5, 0 - bl ReadU8 - ldr r1, _0808283C - add r1, sp - strb r0, [r1] - add r1, sp, 0x16C - adds r0, r5, 0 - bl ReadPosition8 - adds r0, r5, 0 - bl sub_80831C8 - add r1, sp, 0x174 - str r0, [r1] - adds r0, r5, 0 - bl ReadU16 - add r1, sp, 0x178 - strh r0, [r1] - adds r0, r5, 0 - bl ReadS16 - add r1, sp, 0x1F8 - strh r0, [r1] - adds r0, r5, 0 - bl ReadS16 - movs r1, 0xFD - lsls r1, 1 - add r1, sp - strh r0, [r1] - adds r0, r5, 0 - bl sub_80831A0 - add r1, sp, 0x1FC - str r0, [r1] - adds r0, r5, 0 - bl sub_8082CA0 - ldr r3, [sp, 0x280] - strb r0, [r3] - ldr r0, _08082840 - str r4, [r0] - ldr r0, [sp, 0x214] - cmp r0, 0 - beq _080828BE - ldr r1, [sp, 0x20C] - cmp r1, 0 - beq _08082844 - mov r0, sp - movs r2, 0x2 - ldrsh r0, [r0, r2] - mov r1, sp - movs r3, 0x4 - ldrsh r1, [r1, r3] - ldr r2, [sp, 0x210] - bl sub_80828E0 - b _08082856 - .align 2, 0 -_08082818: .4byte 0x00000113 -_0808281C: .4byte 0x00000145 -_08082820: .4byte 0x00000147 -_08082824: .4byte 0x00000149 -_08082828: .4byte 0x0000014b -_0808282C: .4byte 0x00000153 -_08082830: .4byte 0x00000155 -_08082834: .4byte 0x00000165 -_08082838: .4byte 0x00000167 -_0808283C: .4byte 0x00000169 -_08082840: .4byte gLeaderPointer -_08082844: - mov r0, sp - movs r1, 0x2 - ldrsh r0, [r0, r1] - mov r1, sp - movs r2, 0x4 - ldrsh r1, [r1, r2] - ldr r2, [sp, 0x210] - bl sub_8082A08 -_08082856: - adds r7, r0, 0 - cmp r7, 0 - beq _080828BE - ldr r6, [r7, 0x70] - movs r5, 0x82 - lsls r5, 2 - mov r3, sp - adds r4, r3, r5 - movs r1, 0 - ldrsh r0, [r4, r1] - ldr r3, _080828D4 - add r3, sp - movs r2, 0 - ldrsh r1, [r3, r2] - bl GetTileSafe - ldr r1, [r4] - str r1, [r7, 0x8] - ldr r1, [r4] - str r1, [r7, 0x4] - str r7, [r0, 0x10] - adds r0, r7, 0 - adds r0, 0x20 - movs r4, 0 - add r1, sp, 0x218 - ldrb r1, [r1] - strb r1, [r0] - add r2, sp, 0x21C - ldrh r2, [r2] - strh r2, [r7, 0x26] - adds r0, r6, 0 - mov r1, sp - adds r2, r5, 0 - bl memcpy - ldr r0, _080828D8 - str r4, [r0] - ldrb r0, [r6, 0x7] - cmp r0, 0 - beq _080828B0 - ldr r0, _080828DC - ldrh r1, [r7, 0x4] - strh r1, [r0] - ldrh r1, [r7, 0x6] - strh r1, [r0, 0x2] -_080828B0: - adds r0, r7, 0 - bl LoadIQSkills - adds r0, r7, 0 - movs r1, 0 - bl sub_804535C -_080828BE: - movs r3, 0xA8 - lsls r3, 2 - add sp, r3 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_080828D4: .4byte 0x0000020a -_080828D8: .4byte gLeaderPointer -_080828DC: .4byte gUnknown_203B410 - thumb_func_end RestoreDungeonEntity - - thumb_func_start sub_80828E0 -sub_80828E0: - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - adds r5, r2, 0 - lsls r0, 16 - asrs r0, 16 - mov r10, r0 - lsls r1, 16 - asrs r1, 16 - mov r8, r1 - movs r4, 0x1 - negs r4, r4 - mov r0, r8 - bl GetBodySize - lsls r0, 24 - lsrs r6, r0, 24 - movs r3, 0 - movs r0, 0x6 - subs r7, r0, r6 - ldr r0, _08082914 - mov r9, r0 - b _0808291A - .align 2, 0 -_08082914: .4byte gUnknown_202EE70 -_08082918: - adds r3, 0x1 -_0808291A: - cmp r3, r7 - bgt _0808293E - movs r2, 0 - cmp r2, r6 - bge _08082938 - mov r0, r9 - adds r1, r3, r0 - b _08082932 -_0808292A: - adds r1, 0x1 - adds r2, 0x1 - cmp r2, r6 - bge _08082938 -_08082932: - ldrb r0, [r1] - cmp r0, 0 - beq _0808292A -_08082938: - cmp r2, r6 - bne _08082918 - adds r4, r3, 0 -_0808293E: - movs r0, 0x1 - negs r0, r0 - cmp r4, r0 - bne _0808294A - movs r0, 0 - b _080829E6 -_0808294A: - ldr r2, _080829F4 - ldr r0, [r2] - lsls r1, r5, 2 - ldr r3, _080829F8 - adds r0, r3 - adds r0, r1 - ldr r7, [r0] - movs r0, 0x1 - mov r9, r0 - str r0, [r7] - adds r0, r7, 0 - adds r0, 0x24 - strb r5, [r0] - lsls r0, r5, 6 - adds r0, r5 - lsls r0, 3 - ldr r1, _080829FC - adds r0, r1 - ldr r1, [r2] - adds r1, r0 - str r1, [r7, 0x70] - movs r5, 0 - mov r3, r10 - strh r3, [r1, 0x2] - ldr r0, [r7, 0x70] - mov r1, r8 - strh r1, [r0, 0x4] - ldr r0, [r7, 0x70] - strb r5, [r0, 0x6] - mov r0, r8 - bl GetSpriteData - str r0, [r7, 0x64] - lsls r0, r4, 4 - adds r0, 0x40 - adds r1, r7, 0 - adds r1, 0x68 - strh r0, [r1] - adds r1, 0x2 - movs r0, 0x7 - strb r0, [r1] - adds r0, r7, 0 - adds r0, 0x6C - strb r5, [r0] - adds r1, 0x1 - movs r0, 0xFF - strb r0, [r1] - adds r0, r7, 0 - adds r0, 0x6D - mov r3, r9 - strb r3, [r0] - adds r0, 0x2 - strb r3, [r0] - movs r0, 0 - str r0, [r7, 0x1C] - bl sub_8045ACC - ldr r0, [r7, 0x70] - ldr r1, _08082A00 - adds r0, r1 - strb r4, [r0] - ldr r0, [r7, 0x70] - movs r3, 0xB4 - lsls r3, 1 - adds r0, r3 - strb r6, [r0] - cmp r6, 0 - beq _080829E4 - ldr r3, _08082A04 - movs r2, 0x1 - adds r1, r6, 0 -_080829D8: - adds r0, r4, r3 - strb r2, [r0] - adds r4, 0x1 - subs r1, 0x1 - cmp r1, 0 - bne _080829D8 -_080829E4: - adds r0, r7, 0 -_080829E6: - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - .align 2, 0 -_080829F4: .4byte gDungeon -_080829F8: .4byte 0x0001357c -_080829FC: .4byte 0x0000069c -_08082A00: .4byte 0x00000167 -_08082A04: .4byte gUnknown_202EE70 - thumb_func_end sub_80828E0 - - thumb_func_start sub_8082A08 -sub_8082A08: - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x4 - adds r5, r2, 0 - lsls r0, 16 - asrs r0, 16 - str r0, [sp] - lsls r1, 16 - asrs r1, 16 - mov r9, r1 - movs r0, 0x1 - negs r0, r0 - mov r8, r0 - mov r0, r9 - bl GetBodySize - lsls r0, 24 - lsrs r6, r0, 24 - movs r3, 0 - movs r0, 0x10 - subs r4, r0, r6 - ldr r7, _08082A3C - b _08082A42 - .align 2, 0 -_08082A3C: .4byte gUnknown_202EE76 -_08082A40: - adds r3, 0x1 -_08082A42: - cmp r3, r4 - bgt _08082A64 - movs r2, 0 - cmp r2, r6 - bge _08082A5E - adds r1, r3, r7 - b _08082A58 -_08082A50: - adds r1, 0x1 - adds r2, 0x1 - cmp r2, r6 - bge _08082A5E -_08082A58: - ldrb r0, [r1] - cmp r0, 0 - beq _08082A50 -_08082A5E: - cmp r2, r6 - bne _08082A40 - mov r8, r3 -_08082A64: - movs r0, 0x1 - negs r0, r0 - cmp r8, r0 - bne _08082A70 - movs r0, 0 - b _08082B1C -_08082A70: - ldr r2, _08082B2C - ldr r0, [r2] - lsls r1, r5, 2 - ldr r3, _08082B30 - adds r0, r3 - adds r0, r1 - ldr r7, [r0] - movs r4, 0x1 - str r4, [r7] - adds r0, r7, 0 - adds r0, 0x24 - movs r1, 0 - mov r10, r1 - strb r5, [r0] - subs r0, 0x2 - mov r3, r10 - strb r3, [r0] - lsls r0, r5, 6 - adds r0, r5 - lsls r0, 3 - ldr r1, _08082B34 - adds r0, r1 - ldr r1, [r2] - adds r1, r0 - str r1, [r7, 0x70] - movs r5, 0 - mov r2, sp - ldrh r2, [r2] - strh r2, [r1, 0x2] - ldr r0, [r7, 0x70] - mov r3, r9 - strh r3, [r0, 0x4] - ldr r0, [r7, 0x70] - strb r4, [r0, 0x6] - mov r0, r9 - bl GetSpriteData - str r0, [r7, 0x64] - mov r1, r8 - lsls r0, r1, 4 - adds r0, 0xA0 - adds r1, r7, 0 - adds r1, 0x68 - strh r0, [r1] - adds r1, 0x2 - movs r0, 0x7 - strb r0, [r1] - adds r0, r7, 0 - adds r0, 0x6C - strb r5, [r0] - adds r1, 0x1 - movs r0, 0xFF - strb r0, [r1] - adds r0, r7, 0 - adds r0, 0x6D - strb r4, [r0] - adds r0, 0x2 - strb r4, [r0] - mov r2, r10 - str r2, [r7, 0x1C] - ldr r0, [r7, 0x70] - ldr r3, _08082B38 - adds r0, r3 - mov r4, r8 - strb r4, [r0] - ldr r0, [r7, 0x70] - movs r1, 0xB4 - lsls r1, 1 - adds r0, r1 - strb r6, [r0] - cmp r6, 0 - beq _08082B16 - ldr r3, _08082B3C - movs r2, 0x1 - adds r1, r6, 0 -_08082B06: - mov r4, r8 - adds r0, r4, r3 - strb r2, [r0] - movs r0, 0x1 - add r8, r0 - subs r1, 0x1 - cmp r1, 0 - bne _08082B06 -_08082B16: - bl sub_8045ACC - adds r0, r7, 0 -_08082B1C: - add sp, 0x4 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - .align 2, 0 -_08082B2C: .4byte gDungeon -_08082B30: .4byte 0x0001358c -_08082B34: .4byte 0x00000ebc -_08082B38: .4byte 0x00000167 -_08082B3C: .4byte gUnknown_202EE76 - thumb_func_end sub_8082A08 - - .align 2,0 diff --git a/charmap.txt b/charmap.txt index b0918f42..b5fd5ca5 100644 --- a/charmap.txt +++ b/charmap.txt @@ -115,6 +115,7 @@ '”' = 7E 39 34 '•' = 95 @ 96, 97 are not hyphens, 'er', and 're' superscripts in kanji_a +INVALID_SEQUENCE_976C = 97 6C '˜' = 98 '™' = 99 'š' = 9A @@ -229,17 +230,21 @@ 'A' = 82 60 'B' = 82 61 'C' = 82 62 +'い' = 82 A2 'う' = 82 A4 'か' = 82 A9 'が' = 82 AA +'き' = 82 AB +'さ' = 82 B3 'し' = 82 B5 'す' = 82 B7 'な' = 82 C8 'に' = 82 C9 'も' = 82 CC -'み' = 82 DC -'ま' = 82 DD +'ま' = 82 DC +'み' = 82 DD 'の' = 82 E0 +'や' = 82 E2 'よ' = 82 E6 'る' = 82 E9 'を' = 82 F0 diff --git a/data/data_80F4E2C.s b/data/data_80F4E2C.s index a1385959..a95b7e46 100644 --- a/data/data_80F4E2C.s +++ b/data/data_80F4E2C.s @@ -812,5 +812,12 @@ gUnknown_80F51EC: @ 80F51EC .global gUnknown_80F520C gUnknown_80F520C: @ 80F520C @ replacing .incbin "baserom.gba", 0x000f520c, 0x20 -.byte 0x01, 0x00, 0x78, 0x01, 0x02, 0x00, 0x7a, 0x01, 0x01, 0x00, 0x78, 0x01, 0x01, 0x00, 0x78, 0x01, 0x03, 0x00, 0x7b, 0x01, 0x06, 0x00, 0x79, 0x01, 0x03, 0x00, 0x7b, 0x01, 0x06, 0x00, 0x79, 0x01 +.byte 0x01, 0x00, 0x78, 0x01 +.byte 0x02, 0x00, 0x7a, 0x01 +.byte 0x01, 0x00, 0x78, 0x01 +.byte 0x01, 0x00, 0x78, 0x01 +.byte 0x03, 0x00, 0x7b, 0x01 +.byte 0x06, 0x00, 0x79, 0x01 +.byte 0x03, 0x00, 0x7b, 0x01 +.byte 0x06, 0x00, 0x79, 0x01 diff --git a/data/data_80F59C8.s b/data/data_80F59C8.s index 99c6433b..df0cd827 100644 --- a/data/data_80F59C8.s +++ b/data/data_80F59C8.s @@ -465,7 +465,8 @@ gUnknown_80F683C: @ 80F683C .global gUnknown_80F6850 gUnknown_80F6850: @ 80F6850 @ replacing .incbin "baserom.gba", 0xF6850, 0x10 -.byte 0x9e, 0x01, 0xa1, 0x01, 0xa2, 0x01, 0xa3, 0x01, 0x70, 0x6b, 0x73, 0x64, 0x69, 0x72, 0x30, 0x00 +.byte 0x9e, 0x01, 0xa1, 0x01, 0xa2, 0x01, 0xa3, 0x01 +.byte 0x70, 0x6b, 0x73, 0x64, 0x69, 0x72, 0x30, 0x00 .global gSpeedTurns gSpeedTurns: @ 80F6860 diff --git a/data/data_8107010.s b/data/data_8107010.s index ffa26ced..90934e65 100644 --- a/data/data_8107010.s +++ b/data/data_8107010.s @@ -1,4 +1,5 @@ .section .rodata + @ ??? .string "pksdir0\0" @ sub_807218C @@ -89,1535 +90,4 @@ gUnknown_8107178: @ 8107178 .string "pksdir0\0" @ ??? .string "pksdir0\0" -@ WriteDungeonState - sub_808217C -.string "pksdir0\0" - -.global gYayoiSan -gYayoiSan: @ 81071D4 -.byte 0x82, 0xe2, 0x82, 0xe6, 0x82, 0xa2, 0x97, 0x6c, 0x00, 0x00, 0x00, 0x00 - -.global gMisakiSan -gMisakiSan: @ 81071E0 -.byte 0x82, 0xdd, 0x82, 0xb3, 0x82, 0xab, 0x97, 0x6c, 0x00, 0x00, 0x00, 0x00 -@ ??? -.string "pksdir0\0" -@ ??? -.string "pksdir0\0" -@ ??? -.string "pksdir0\0" -@ ??? -.string "pksdir0\0" -@ ??? -.string "pksdir0\0" -@ START code_808417C #1 -.string "pksdir0\0" - -.string "pksdir0\0" - -.global gUnknown_8107224 -gUnknown_8107224: @ 8107224 -@ replacing .incbin "baserom.gba", 0x107224, 0x10 -.string "??????\0" -.align 2, 0 -@ END code_808417C #1 -@ code_8085B0C -.string "pksdir0\0" - -.global gUnknown_8107234 -gUnknown_8107234: @ 8107234 -.byte 0x01, 0x01, 0x00, 0x02, 0x01, 0x03, 0x00, 0x00, 0x02, 0x04, 0x02, 0x05, 0x03, 0x06, 0x00, 0x00 -.byte 0x03, 0x07, 0x04, 0x08, 0x05, 0x09, 0x00, 0x00, 0x04, 0x0a, 0x06, 0x0b, 0x07, 0x0c, 0x00, 0x00 -.byte 0x05, 0x0d, 0x08, 0x0e, 0x09, 0x0f, 0x00, 0x00, 0x06, 0x10, 0x0a, 0x11, 0x0a, 0x11, 0x00, 0x00 -.byte 0x07, 0x12, 0x0b, 0x13, 0x0c, 0x14, 0x00, 0x00, 0x14, 0x15, 0x0d, 0x16, 0x0d, 0x16, 0x00, 0x00 -.byte 0x08, 0x17, 0x0e, 0x18, 0x0f, 0x19, 0x00, 0x00, 0x0b, 0x1a, 0x10, 0x1b, 0x11, 0x1c, 0x00, 0x00 -.byte 0x09, 0x1d, 0x12, 0x1e, 0x13, 0x1f, 0x00, 0x00, 0x0c, 0x20, 0x14, 0x21, 0x15, 0x22, 0x00, 0x00 -.byte 0x0d, 0x23, 0x16, 0x24, 0x17, 0x25, 0x00, 0x00, 0x0e, 0x26, 0x18, 0x27, 0x19, 0x28, 0x00, 0x00 -.byte 0x0f, 0x29, 0x40, 0x29, 0x1a, 0x2a, 0x00, 0x00, 0x10, 0x2b, 0x1b, 0x2c, 0x1c, 0x2d, 0x00, 0x00 -.byte 0x11, 0x2e, 0x40, 0x2e, 0x40, 0x2e, 0x00, 0x00, 0x12, 0x2f, 0x40, 0x2f, 0x40, 0x2f, 0x00, 0x00 -.byte 0x13, 0x30, 0x40, 0x30, 0x40, 0x30, 0x00, 0x00, 0x0a, 0x31, 0x40, 0x31, 0x1e, 0x32, 0x00, 0x00 -.byte 0x15, 0x33, 0x40, 0x33, 0x40, 0x33, 0x00, 0x00, 0x16, 0x34, 0x40, 0x34, 0x40, 0x34, 0x00, 0x00 -.byte 0x17, 0x35, 0x40, 0x35, 0x40, 0x35, 0x00, 0x00, 0x19, 0x36, 0x40, 0x36, 0x40, 0x36, 0x00, 0x00 -.byte 0x1b, 0x37, 0x40, 0x37, 0x40, 0x37, 0x00, 0x00, 0x1a, 0x38, 0x20, 0x39, 0x20, 0x39, 0x00, 0x00 -.byte 0x18, 0x3a, 0x21, 0x3b, 0x21, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - -.global gUnknown_8107314 -gUnknown_8107314: @ 8107314 -.byte 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff -.byte 0x02, 0x00, 0x00, 0x00, 0xfd, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff -.byte 0x04, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x04, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff -.byte 0x04, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x04, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff -.byte 0x04, 0x00, 0x00, 0x00 - -.global gUnknown_8107358 -gUnknown_8107358: @ 8107358 -.byte 0x04, 0x03, 0x02, 0x03, 0x04, 0x05, 0x06, 0x05, 0x04, 0x03, 0x02, 0x03, 0x04, 0x05, 0x06, 0x05 -.byte 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00 - -.global gUnknown_8107374 -gUnknown_8107374: @ 8107374 -.byte 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - -.global gUnknown_8107380 -gUnknown_8107380: @ 8107380 -.byte 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -@ ??? -.string "pksdir0\0" -@ code_8086A3C #1 -.string "pksdir0\0" - -.global gUnknown_810739C -gUnknown_810739C: @ 810739C -.byte 0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x02, 0x00, 0x18, 0x00, 0x00, 0x00 -.byte 0x04, 0x00, 0x02, 0x00, 0x18, 0x00, 0x00, 0x00, 0x05, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00 -.byte 0x06, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x0b, 0x00, 0x08, 0x00, 0x00, 0x00 - -.global gUnknown_81073D4 -gUnknown_81073D4: @ 81073D4 -.byte 0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x02, 0x00, 0x18, 0x00, 0x00, 0x00 -.byte 0x04, 0x00, 0x02, 0x00, 0x18, 0x00, 0x00, 0x00, 0x05, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00 -.byte 0x06, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x00, 0x00 - -.global gUnknown_810740C -gUnknown_810740C: @ 810740C -.byte 0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x05, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00 -.byte 0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x02, 0x00, 0x18, 0x00, 0x00, 0x00 -.byte 0x03, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x0a, 0x00, 0x08, 0x00, 0x00, 0x00 -@ code_8086A3C #2 -.string "pksdir0\0" - -.global gUnknown_810744C -gUnknown_810744C: @ 810744C -.byte 0x01, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x09, 0x00, 0x09, 0x00, 0x00, 0x00 - -.global gUnknown_8107464 -gUnknown_8107464: @ 8107464 -.byte 0x05, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00 -.byte 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x07, 0x00, 0x00, 0x00 -.string "pksdir0\0" -.string "pksdir0\0" -.string "pksdir0\0" -.string "pksdir0\0" -.string "pksdir0\0" -.string "pksdir0\0" -.string "pksdir0\0" -.string "pksdir0\0" -.string "pksdir0\0" -.string "pksdir0\0" -.string "pksdir0\0" -.string "pksdir0\0" -.string "pksdir0\0" -.string "pksdir0\0" -@ ??? -.string "pksdir0\0" - -.global gUnknown_81074FC -gUnknown_81074FC: @ 81074FC -.byte 0x4e, 0x4f, 0x50, 0x51, 0x4a, 0x49, 0x3e, 0x38 - -@ ??? -.string "pksdir0\0" -@ ??? -.string "pksdir0\0" -@ ??? -.string "pksdir0\0" -@ ??? -.string "pksdir0\0" -@ ??? -.string "pksdir0\0" -@ ??? -.string "pksdir0\0" -@ ??? -.string "pksdir0\0" -@ ??? -.string "pksdir0\0" - -.global gUnknown_8107544 -gUnknown_8107544: @ 8107544 -.byte 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00 -.byte 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00 -.byte 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00 -.byte 0x0d, 0x00, 0x05, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00 -.byte 0x17, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00 -.byte 0x12, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 -.byte 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00 -.byte 0x07, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00 -.byte 0x0d, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00 -.byte 0x17, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00 -.byte 0x12, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 -@ pokemon -.string "pksdir0\0" - -.global gUnknown_81075F4 -gUnknown_81075F4: @ 81075F4 -.string "monspara\0" -.align 2,0 - -.global gUnknown_8107600 -gUnknown_8107600: @ 8107600 -.string "{color YELLOW_RAW}%s{reset}" -.align 2,0 - -.global gUnknown_8107608 -gUnknown_8107608: @ 8107608 -.string "{color CYAN_RAW}%s{reset}" -.align 2,0 - -.global gUnownLetters -gUnownLetters: @ 8107610 -.string "ABCDEFGHIJKLMNOPQRSTUVWXYZ!?\0" -.align 2,0 - -.global gUnknown_8107630 -gUnknown_8107630: @ 8107630 -.string "%s%c\0" -.align 2,0 - -.global gUnknown_8107638 -gUnknown_8107638: @ 8107638 -.string "%s\0" -.align 2,0 - -.global gUnknown_810763C -gUnknown_810763C: @ 810763C -.string "{color}%c%s{reset}\0" - -.global gUnknown_8107645 -gUnknown_8107645: @ 8107645 -.byte 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - -.global gUnknown_8107654 -gUnknown_8107654: @ 8107654 -.byte 0x9d, 0x01, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00 -.byte 0x33, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - -.global gUnknown_8107684 -gUnknown_8107684: @ 8107684 -.string "kao%03d\0" -.align 2,0 - -.global gUnknown_810768C -gUnknown_810768C: @ 810768C -.string "lvmp%03d\0" -.align 2,0 - -.global gShadowSpriteSizeFlags_8107698 -gShadowSpriteSizeFlags_8107698: @ 8107698 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 -.byte 0x03, 0x00, 0x00, 0x00 - -.global gUnknown_81076BC -gUnknown_81076BC: @ 81076BC -.string "etcfont\0" -.align 2,0 - -.global gUnknown_81076C4 -gUnknown_81076C4: @ 81076C4 -.4byte -4 -.4byte -8 -.4byte -16 -.4byte -4 -.4byte -8 -.4byte -16 -@ pokemon_3 #1 -.string "pksdir0\0" - -.global gIQSkillGroups -gIQSkillGroups: @ 81076E4 -.4byte 9999 -.4byte 4 -.4byte 1 -.4byte 2 -.4byte 4 -.4byte 4 -.4byte 6 -.4byte 7 -.4byte 8 -.4byte 9 -.4byte 9 -.4byte 9 -.4byte 10 -.4byte 10 -.4byte 11 -.4byte 11 -.4byte 14 -.4byte 14 -.4byte 14 -.4byte 16 -.4byte 16 -.4byte 9 -.4byte 17 -.4byte 6 -@ pokemon_3 #2 -.string "pksdir0\0" -@ pokemon_3 #3 -.string "pksdir0\0" - -.global gUnknown_8107754 -gUnknown_8107754: @ 8107754 -.string "Stats\0" -.align 2,0 - -.global gUnknown_810775C -gUnknown_810775C: @ 810775C -.string "Features\0" -.align 2,0 - -.global gUnknown_8107768 -gUnknown_8107768: @ 8107768 -.string "Type:\0" -.align 2,0 - -.global gUnknown_8107770 -gUnknown_8107770: @ 8107770 -.string "Special Abilities:\0" -.align 2,0 - -.global gUnknown_8107784 -gUnknown_8107784: @ 8107784 -.string "{MOVE_ITEM_1}\0" -.align 2,0 - -.global gUnknown_8107788 -gUnknown_8107788: @ 8107788 -.byte 0x87, 0x42, 0x00, 0x00 - -.global gUnknown_810778C -gUnknown_810778C: @ 810778C -.byte 0x87, 0x40, 0x00, 0x00 - -.global gUnknown_8107790 -gUnknown_8107790: @ 8107790 -.string "{MOVE_ITEM_0}{MOVE_ITEM_1}\0" -.align 2,0 - -.global gUnknown_8107798 -gUnknown_8107798: @ 8107798 -.string "Info\0" -.align 2,0 -@ dungeon -.string "pksdir0\0" -.align 2,0 - -.global gDungeonFloorCount -gDungeonFloorCount: @ 81077A8 -@ replacing .incbin "baserom.gba", 0x1077A8, 0x40 -.byte 0x04, 0x06, 0x0a, 0x0e, 0x0a, 0x0b, 0x04, 0x0d, 0x0f, 0x0d, 0x04, 0x0a, 0x06, 0x10, 0x06, 0x18 -.byte 0x04, 0x1a, 0x0a, 0x29, 0x64, 0x15, 0x05, 0x64, 0x15, 0x0c, 0x64, 0x64, 0x1a, 0x1a, 0x0d, 0x15 -.byte 0x33, 0x1f, 0x1f, 0x1f, 0x15, 0x1f, 0x10, 0x0d, 0x14, 0x1f, 0x0b, 0x10, 0x15, 0x15, 0x1f, 0x05 -.byte 0x05, 0x0b, 0x03, 0x33, 0x46, 0x10, 0x1f, 0x14, 0x14, 0x0c, 0x64, 0x4c, 0x29, 0x64, 0x64, 0x02 - -.global gUnknown_81077E8 -gUnknown_81077E8: @ 81077E8 -@ replacing .incbin "baserom.gba", 0x1077E8, 0x40 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - -.global gUnknown_8107828 -gUnknown_8107828: @ 8107828 -@ replacing .incbin "baserom.gba", 0x107828, 0x85C -.byte 0x02, 0x09, 0x00, 0x00, 0x03, 0x0d, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x0a, 0x03, 0x00, 0x00 -.byte 0x0c, 0x05, 0x00, 0x00, 0x0e, 0x05, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0x10, 0x03, 0x00, 0x00 -.byte 0x12, 0x09, 0x00, 0x00, 0x13, 0x28, 0x00, 0x00, 0x14, 0x63, 0x00, 0x00, 0x15, 0x14, 0x00, 0x00 -.byte 0x17, 0x3b, 0x00, 0x00, 0x17, 0x63, 0x00, 0x00, 0x1a, 0x14, 0x00, 0x00, 0x1a, 0x32, 0x00, 0x00 -.byte 0x1a, 0x63, 0x00, 0x00, 0x1b, 0x0f, 0x00, 0x00, 0x1b, 0x19, 0x00, 0x00, 0x1b, 0x23, 0x00, 0x00 -.byte 0x1b, 0x2d, 0x00, 0x00, 0x1b, 0x3c, 0x00, 0x00, 0x1b, 0x46, 0x00, 0x00, 0x1b, 0x50, 0x00, 0x00 -.byte 0x1d, 0x19, 0x00, 0x00, 0x21, 0x14, 0x00, 0x00, 0x21, 0x1e, 0x00, 0x00, 0x22, 0x1e, 0x00, 0x00 -.byte 0x23, 0x14, 0x00, 0x00, 0x23, 0x1e, 0x00, 0x00, 0x24, 0x0a, 0x00, 0x00, 0x24, 0x0f, 0x00, 0x00 -.byte 0x24, 0x14, 0x00, 0x00, 0x25, 0x1e, 0x00, 0x00, 0x29, 0x0f, 0x00, 0x00, 0x29, 0x19, 0x00, 0x00 -.byte 0x2a, 0x0a, 0x00, 0x00, 0x31, 0x01, 0x00, 0x00, 0x31, 0x02, 0x00, 0x00, 0x31, 0x03, 0x00, 0x00 -.byte 0x31, 0x04, 0x00, 0x00, 0x31, 0x05, 0x00, 0x00, 0x31, 0x06, 0x00, 0x00, 0x31, 0x07, 0x00, 0x00 -.byte 0x31, 0x08, 0x00, 0x00, 0x31, 0x09, 0x00, 0x00, 0x31, 0x0a, 0x00, 0x00, 0x34, 0x03, 0x00, 0x00 -.byte 0x34, 0x06, 0x00, 0x00, 0x34, 0x09, 0x00, 0x00, 0x34, 0x0c, 0x00, 0x00, 0x34, 0x0f, 0x00, 0x00 -.byte 0x34, 0x12, 0x00, 0x00, 0x34, 0x15, 0x00, 0x00, 0x34, 0x18, 0x00, 0x00, 0x34, 0x1b, 0x00, 0x00 -.byte 0x34, 0x1e, 0x00, 0x00, 0x34, 0x21, 0x00, 0x00, 0x34, 0x24, 0x00, 0x00, 0x34, 0x27, 0x00, 0x00 -.byte 0x34, 0x2a, 0x00, 0x00, 0x34, 0x2d, 0x00, 0x00, 0x34, 0x30, 0x00, 0x00, 0x34, 0x33, 0x00, 0x00 -.byte 0x34, 0x36, 0x00, 0x00, 0x34, 0x39, 0x00, 0x00, 0x34, 0x3c, 0x00, 0x00, 0x34, 0x3f, 0x00, 0x00 -.byte 0x34, 0x42, 0x00, 0x00, 0x34, 0x45, 0x00, 0x00, 0x35, 0x0f, 0x00, 0x00, 0x3b, 0x32, 0x00, 0x00 -.byte 0x3b, 0x48, 0x00, 0x00, 0x3c, 0x1e, 0x00, 0x00, 0x3c, 0x28, 0x00, 0x00, 0x3e, 0x63, 0x00, 0x00 -.byte 0x3f, 0xff, 0x00, 0x00 - -.global gUnknown_810795C -gUnknown_810795C: @ 810795C -.byte 0x00, 0x01, 0x01, 0x01 - -.global gUnknown_8107960 -gUnknown_8107960: @ 8107960 -.byte 0x00, 0x01, 0x01, 0x01, 0x01, 0x01 - -.global gUnknown_8107966 -gUnknown_8107966: @ 8107966 -.byte 0x00, 0x01 -.byte 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 - -.global gUnknown_8107970 -gUnknown_8107970: @ 8107970 -.byte 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02 -.byte 0x02, 0x02, 0x02, 0x02, 0x02, 0x02 - -.global gUnknown_810797E -gUnknown_810797E: @ 810797E -.byte 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03 - -.global gUnknown_8107988 -gUnknown_8107988: @ 8107988 -.byte 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03 - -.global gUnknown_8107993 -gUnknown_8107993: @ 8107993 -.byte 0x00, 0x03, 0x03, 0x03 - -.global gUnknown_8107997 -gUnknown_8107997: @ 8107997 -.byte 0x00 -.byte 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 - -.global gUnknown_81079A4 -gUnknown_81079A4: @ 81079A4 -.byte 0x00, 0x04, 0x04, 0x04 -.byte 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 - -.global gUnknown_81079B3 -gUnknown_81079B3: @ 81079B3 -.byte 0x00, 0x04, 0x04, 0x04, 0x04 -.byte 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 - -.global gUnknown_81079C0 -gUnknown_81079C0: @ 81079C0 -.byte 0x00, 0x04, 0x04, 0x04 - -.global gUnknown_81079C4 -gUnknown_81079C4: @ 81079C4 -.byte 0x00, 0x04, 0x04, 0x04 -.byte 0x04, 0x04, 0x05, 0x05, 0x05, 0x05 - -.global gUnknown_81079CE -gUnknown_81079CE: @ 81079CE -.byte 0x00, 0x05, 0x05, 0x05, 0x05, 0x05 - -.global gUnknown_81079D4 -gUnknown_81079D4: @ 81079D4 -.byte 0x00, 0x05, 0x05, 0x05 -.byte 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05 - -.global gUnknown_81079E4 -gUnknown_81079E4: @ 81079E4 -.byte 0x00, 0x05, 0x05, 0x05 -.byte 0x05, 0x05 - -.global gUnknown_81079EA -gUnknown_81079EA: @ 81079EA -.byte 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06 -.byte 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06 - -.global gUnknown_8107A02 -gUnknown_8107A02: @ 8107A02 -.byte 0x00, 0x06, 0x06, 0x06 - -.global gUnknown_8107A06 -gUnknown_8107A06: @ 8107A06 -.byte 0x00, 0x06 -.byte 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06 -.byte 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06 - -.global gUnknown_8107A20 -gUnknown_8107A20: @ 8107A20 -.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 -.byte 0x07, 0x07 - -.global gUnknown_8107A2A -gUnknown_8107A2A: @ 8107A2A -.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 -.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 -.byte 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09 - -.global gUnknown_8107A53 -gUnknown_8107A53: @ 8107A53 -.byte 0x00, 0x07, 0x07, 0x07, 0x07 -.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08 -.byte 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0a -.byte 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a -.byte 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b -.byte 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b -.byte 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b - -.global gUnknown_8107AB7 -gUnknown_8107AB7: @ 8107AB7 -.byte 0x00 -.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 -.byte 0x08, 0x08, 0x08, 0x08 - -.global gUnknown_8107ACC -gUnknown_8107ACC: @ 8107ACC -.byte 0x00, 0x05, 0x05, 0x05, 0x05 - -.global gUnknown_8107AD1 -gUnknown_8107AD1: @ 8107AD1 -.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 -.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08 -.byte 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0a, 0x0a, 0x0a -.byte 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a -.byte 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b -.byte 0x0b, 0x0b, 0x0b, 0x0b, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c -.byte 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c - -.global gUnknown_8107B35 -gUnknown_8107B35: @ 8107B35 -.byte 0x00, 0x07, 0x07 -.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 -.byte 0x08, 0x08 - -.global gUnknown_8107B4A -gUnknown_8107B4A: @ 8107B4A -.byte 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 - -.global gUnknown_8107B56 -gUnknown_8107B56: @ 8107B56 -.byte 0x00, 0x07 -.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 -.byte 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x09, 0x09, 0x09, 0x09 -.byte 0x09, 0x09, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a -.byte 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b -.byte 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c -.byte 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c -.byte 0x0c, 0x0c - -.global gUnknown_8107BBA -gUnknown_8107BBA: @ 8107BBA -.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 -.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 -.byte 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a -.byte 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0b, 0x0b -.byte 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0c, 0x0c, 0x0c -.byte 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c -.byte 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c - -.global gUnknown_8107C1E -gUnknown_8107C1E: @ 8107C1E -.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 -.byte 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09 - -.global gUnknown_8107C38 -gUnknown_8107C38: @ 8107C38 -.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 -.byte 0x08, 0x08, 0x08, 0x08, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09 - -.global gUnknown_8107C52 -gUnknown_8107C52: @ 8107C52 -.byte 0x00, 0x01, 0x01, 0x01, 0x01, 0x01 -.byte 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 - -.global gUnknown_8107C5F -gUnknown_8107C5F: @ 8107C5F -.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 -.byte 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 - -.global gUnknown_8107C74 -gUnknown_8107C74: @ 8107C74 -.byte 0x00, 0x07, 0x07, 0x07 -.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 -.byte 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09 -.byte 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09 - -.global gUnknown_8107CA7 -gUnknown_8107CA7: @ 8107CA7 -.byte 0x00 -.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 -.byte 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x09 - -.global gUnknown_8107CC6 -gUnknown_8107CC6: @ 8107CC6 -.byte 0x00, 0x07 -.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 -.byte 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x09 - -.global gUnknown_8107CE5 -gUnknown_8107CE5: @ 8107CE5 -.byte 0x00, 0x07, 0x07 -.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 -.byte 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x09 - -.global gUnknown_8107D04 -gUnknown_8107D04: @ 8107D04 -.byte 0x00, 0x07, 0x07, 0x07 -.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 -.byte 0x08 - -.global gUnknown_8107D19 -gUnknown_8107D19: @ 8107D19 -.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 -.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x09 - -.global gUnknown_8107D38 -gUnknown_8107D38: @ 8107D38 -.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 - -.global gUnknown_8107D48 -gUnknown_8107D48: @ 8107D48 -.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08 - -.global gUnknown_8107D55 -gUnknown_8107D55: @ 8107D55 -.byte 0x00, 0x07, 0x07 -.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 -.byte 0x08 - -.global gUnknown_8107D69 -gUnknown_8107D69: @ 8107D69 -.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08 -.byte 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 - -.global gUnknown_8107D88 -gUnknown_8107D88: @ 8107D88 -.byte 0x00, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05 - -.global gUnknown_8107D93 -gUnknown_8107D93: @ 8107D93 -.byte 0x00, 0x07, 0x07, 0x07, 0x07 -.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 - -.global gUnknown_8107DA3 -gUnknown_8107DA3: @ 8107DA3 -.byte 0x00, 0x07, 0x07, 0x07, 0x07 -.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 - -.global gUnknown_8107DB8 -gUnknown_8107DB8: @ 8107DB8 -.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 -.byte 0x07, 0x07, 0x07, 0x07, 0x08 - -.global gUnknown_8107DCD -gUnknown_8107DCD: @ 8107DCD -.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 -.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 -.byte 0x08, 0x08, 0x08, 0x09 - -.global gUnknown_8107DEC -gUnknown_8107DEC: @ 8107DEC -.byte 0x00, 0x01, 0x01, 0x01, 0x01 - -.global gUnknown_8107DF1 -gUnknown_8107DF1: @ 8107DF1 -.byte 0x00, 0x01, 0x01, 0x01, 0x01 - -.global gUnknown_8107DF6 -gUnknown_8107DF6: @ 8107DF6 -.byte 0x00, 0x01 -.byte 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 - -.global gUnknown_8107E01 -gUnknown_8107E01: @ 8107E01 -.byte 0x00, 0x01, 0x01 - -.global gUnknown_8107E04 -gUnknown_8107E04: @ 8107E04 -.byte 0x00, 0x0f, 0x0f, 0x0f -.byte 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f -.byte 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f -.byte 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f - -.global gUnknown_8107E37 -gUnknown_8107E37: @ 8107E37 -.byte 0x00 -.byte 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 -.byte 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 -.byte 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 -.byte 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 -.byte 0x01, 0x01, 0x01, 0x01, 0x01 - -.global gUnknown_8107E7D -gUnknown_8107E7D: @ 8107E7D -.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 -.byte 0x07, 0x07, 0x07, 0x07, 0x07 - -.global gUnknown_8107E8D -gUnknown_8107E8D: @ 8107E8D -.byte 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 -.byte 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 -.byte 0x01, 0x01, 0x01, 0x01 - -.global gUnknown_8107EAC -gUnknown_8107EAC: @ 8107EAC -.byte 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 -.byte 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 - -.global gUnknown_8107EC0 -gUnknown_8107EC0: @ 8107EC0 -.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 -.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 - -.global gUnknown_8107ED4 -gUnknown_8107ED4: @ 8107ED4 -.byte 0x00, 0x07, 0x07, 0x07 -.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 - -.global gUnknown_8107EE0 -gUnknown_8107EE0: @ 8107EE0 -.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 -.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08 -.byte 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0a, 0x0a, 0x0a, 0x0a -.byte 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a -.byte 0x0a, 0x0a, 0x0a, 0x0a, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b -.byte 0x0b, 0x0b, 0x0b, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c -.byte 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c - -.global gUnknown_8107F44 -gUnknown_8107F44: @ 8107F44 -.byte 0x00, 0x07, 0x07, 0x07 -.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 -.byte 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09 -.byte 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a -.byte 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b -.byte 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0c - -.global gUnknown_8107F90 -gUnknown_8107F90: @ 8107F90 -.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 -.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08 -.byte 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0a, 0x0a, 0x0a, 0x0a -.byte 0x0a - -.global gUnknown_8107FB9 -gUnknown_8107FB9: @ 8107FB9 -.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 -.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x09 -.byte 0x09, 0x09, 0x09, 0x09, 0x09, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a -.byte 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0b, 0x0b, 0x0b -.byte 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0c, 0x0c, 0x0c, 0x0c -.byte 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c -.byte 0x0c, 0x0c, 0x0c, 0x0c, 0x0c - -.global gUnknown_810801D -gUnknown_810801D: @ 810801D -.byte 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 -.byte 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0a, 0x0a -.byte 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b -.byte 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b -.byte 0x0b, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c -.byte 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0e, 0x0e -.byte 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e - -.global gUnknown_8108081 -gUnknown_8108081: @ 8108081 -.byte 0x00, 0x07, 0x00 - -.global gUnknown_8108084 -gUnknown_8108084: @ 8108084 -@ replacing .incbin "baserom.gba", 0x108084, 0xDD4 -.4byte gUnknown_810795C -.4byte gUnknown_8107960 -.4byte gUnknown_8107966 -.4byte gUnknown_8107970 -.4byte gUnknown_810797E -.4byte gUnknown_8107988 -.4byte gUnknown_8107993 -.4byte gUnknown_8107997 -.4byte gUnknown_81079A4 -.4byte gUnknown_81079B3 -.4byte gUnknown_81079C0 -.4byte gUnknown_81079C4 -.4byte gUnknown_81079CE -.4byte gUnknown_81079D4 -.4byte gUnknown_81079E4 -.4byte gUnknown_81079EA -.4byte gUnknown_8107A02 -.4byte gUnknown_8107A06 -.4byte gUnknown_8107A20 -.4byte gUnknown_8107A2A -.4byte gUnknown_8107A53 -.4byte gUnknown_8107AB7 -.4byte gUnknown_8107ACC -.4byte gUnknown_8107AD1 -.4byte gUnknown_8107B35 -.4byte gUnknown_8107B4A -.4byte gUnknown_8107B56 -.4byte gUnknown_8107BBA -.4byte gUnknown_8107C1E -.4byte gUnknown_8107C38 -.4byte gUnknown_8107C52 -.4byte gUnknown_8107C5F -.4byte gUnknown_8107C74 -.4byte gUnknown_8107CA7 -.4byte gUnknown_8107CC6 -.4byte gUnknown_8107CE5 -.4byte gUnknown_8107D04 -.4byte gUnknown_8107D19 -.4byte gUnknown_8107D38 -.4byte gUnknown_8107D48 -.4byte gUnknown_8107D55 -.4byte gUnknown_8107D69 -.4byte gUnknown_8107D88 -.4byte gUnknown_8107D93 -.4byte gUnknown_8107DA3 -.4byte gUnknown_8107DB8 -.4byte gUnknown_8107DCD -.4byte gUnknown_8107DEC -.4byte gUnknown_8107DF1 -.4byte gUnknown_8107DF6 -.4byte gUnknown_8107E01 -.4byte gUnknown_8107E04 -.4byte gUnknown_8107E37 -.4byte gUnknown_8107E7D -.4byte gUnknown_8107E8D -.4byte gUnknown_8107EAC -.4byte gUnknown_8107EC0 -.4byte gUnknown_8107ED4 -.4byte gUnknown_8107EE0 -.4byte gUnknown_8107F44 -.4byte gUnknown_8107F90 -.4byte gUnknown_8107FB9 -.4byte gUnknown_810801D -.4byte gUnknown_8108081 - -.global gUnknown_8108184 -gUnknown_8108184: @ 8108184 -.byte 0x31, 0x75, 0xa0, 0x0f, 0x10, 0x27, 0x40, 0x75, 0x10, 0x27, 0x62, 0x75, 0xa0, 0x0f, 0x38, 0x75 -.byte 0x70, 0x17, 0x39, 0x75, 0x10, 0x27, 0xd2, 0x75 - -.global gUnknown_810819C -gUnknown_810819C: @ 810819C -.byte 0x31, 0x75, 0x98, 0x04, 0x62, 0x12, 0x2b, 0x20 -.byte 0x10, 0x27, 0x3e, 0x75, 0x10, 0x27, 0x3b, 0x75, 0x05, 0x0d, 0x0b, 0x1a, 0x3c, 0x75, 0x10, 0x27 -.byte 0x43, 0x75, 0xd0, 0x07, 0x34, 0x75, 0xa0, 0x0f, 0x38, 0x75, 0x70, 0x17, 0x39, 0x75, 0x10, 0x27 -.byte 0x38, 0x75, 0x4c, 0x02, 0x98, 0x04, 0xe5, 0x06, 0x31, 0x09, 0x7d, 0x0b, 0xc9, 0x0d, 0x16, 0x10 -.byte 0x62, 0x12, 0xae, 0x14, 0xfa, 0x16, 0x47, 0x19, 0x93, 0x1b, 0xdf, 0x1d, 0x2b, 0x20, 0x78, 0x22 -.byte 0xc4, 0x24, 0x10, 0x27, 0xb9, 0x75 - -.global gUnknown_81081EA -gUnknown_81081EA: @ 81081EA -.byte 0x31, 0x75, 0x20, 0x03, 0x80, 0x0c, 0x40, 0x1f, 0xf0, 0x23 -.byte 0x10, 0x27, 0x3d, 0x75, 0x10, 0x27, 0x3a, 0x75, 0xc4, 0x09, 0x88, 0x13, 0x4c, 0x1d, 0x3c, 0x75 -.byte 0x10, 0x27, 0x43, 0x75, 0xc4, 0x09, 0x34, 0x75, 0x88, 0x13, 0x42, 0x75, 0x10, 0x27, 0x38, 0x75 -.byte 0x4c, 0x02, 0x98, 0x04, 0xe5, 0x06, 0x31, 0x09, 0x7d, 0x0b, 0xc9, 0x0d, 0x16, 0x10, 0x62, 0x12 -.byte 0xae, 0x14, 0xfa, 0x16, 0x47, 0x19, 0x93, 0x1b, 0xdf, 0x1d, 0x2b, 0x20, 0x78, 0x22, 0xc4, 0x24 -.byte 0x10, 0x27, 0x49, 0x75, 0x65, 0x01, 0x2f, 0x04, 0x33, 0x75, 0x95, 0x05, 0x5f, 0x08, 0x31, 0x75 -.byte 0x29, 0x0b, 0x8e, 0x0c, 0x32, 0x75, 0xf3, 0x0d, 0x34, 0x75, 0x59, 0x0f, 0x32, 0x75, 0xbe, 0x10 -.byte 0x32, 0x75, 0x23, 0x12, 0x88, 0x13, 0x32, 0x75, 0xed, 0x14, 0x31, 0x75, 0x52, 0x16, 0xb7, 0x17 -.byte 0x36, 0x75, 0x82, 0x1a, 0x4c, 0x1d, 0x16, 0x20, 0x7b, 0x21, 0x46, 0x24, 0x10, 0x27, 0x75, 0x75 - -.global gUnknown_8108274 -gUnknown_8108274: @ 8108274 -.byte 0x31, 0x75, 0x01, 0x03, 0x05, 0x0c, 0x0c, 0x1e, 0x8e, 0x22, 0x10, 0x27, 0x3d, 0x75, 0x10, 0x27 -.byte 0x3a, 0x75, 0xd0, 0x07, 0xa0, 0x0f, 0x70, 0x17, 0x3c, 0x75, 0x40, 0x1f, 0x3b, 0x75, 0x10, 0x27 -.byte 0x37, 0x75, 0x05, 0x0d, 0x34, 0x75, 0x0b, 0x1a, 0x42, 0x75, 0x10, 0x27, 0x38, 0x75, 0x4c, 0x02 -.byte 0x98, 0x04, 0xe5, 0x06, 0x31, 0x09, 0x7d, 0x0b, 0xc9, 0x0d, 0x16, 0x10, 0x62, 0x12, 0xae, 0x14 -.byte 0xfa, 0x16, 0x47, 0x19, 0x93, 0x1b, 0xdf, 0x1d, 0x2b, 0x20, 0x78, 0x22, 0xc4, 0x24, 0x10, 0x27 -.byte 0x49, 0x75, 0x65, 0x01, 0x2f, 0x04, 0x33, 0x75, 0x95, 0x05, 0x5f, 0x08, 0x31, 0x75, 0x29, 0x0b -.byte 0x8e, 0x0c, 0x32, 0x75, 0xf3, 0x0d, 0x34, 0x75, 0x59, 0x0f, 0x32, 0x75, 0xbe, 0x10, 0x32, 0x75 -.byte 0x23, 0x12, 0x88, 0x13, 0x32, 0x75, 0xed, 0x14, 0x31, 0x75, 0x52, 0x16, 0xb7, 0x17, 0x36, 0x75 -.byte 0x82, 0x1a, 0x4c, 0x1d, 0x16, 0x20, 0x7b, 0x21, 0x46, 0x24, 0x10, 0x27, 0x75, 0x75 - -.global gUnknown_8108302 -gUnknown_8108302: @ 8108302 -.byte 0x32, 0x75 -.byte 0xd0, 0x07, 0x70, 0x17, 0x40, 0x1f, 0x10, 0x27, 0x40, 0x75, 0x83, 0x06, 0x37, 0x75, 0x05, 0x0d -.byte 0x88, 0x13, 0x0b, 0x1a, 0x3c, 0x75, 0x8d, 0x20, 0x3b, 0x75, 0x10, 0x27, 0x37, 0x75, 0x05, 0x0d -.byte 0x34, 0x75, 0x0b, 0x1a, 0x42, 0x75, 0x10, 0x27, 0x38, 0x75, 0x4c, 0x02, 0x98, 0x04, 0xe5, 0x06 -.byte 0x31, 0x09, 0x7d, 0x0b, 0xc9, 0x0d, 0x16, 0x10, 0x62, 0x12, 0xae, 0x14, 0xfa, 0x16, 0x47, 0x19 -.byte 0x93, 0x1b, 0xdf, 0x1d, 0x2b, 0x20, 0x78, 0x22, 0xc4, 0x24, 0x10, 0x27, 0x49, 0x75, 0x65, 0x01 -.byte 0x2f, 0x04, 0x33, 0x75, 0x95, 0x05, 0x5f, 0x08, 0x31, 0x75, 0x29, 0x0b, 0x8e, 0x0c, 0x32, 0x75 -.byte 0xf3, 0x0d, 0x34, 0x75, 0x59, 0x0f, 0x32, 0x75, 0xbe, 0x10, 0x32, 0x75, 0x23, 0x12, 0x88, 0x13 -.byte 0x32, 0x75, 0xed, 0x14, 0x31, 0x75, 0x52, 0x16, 0xb7, 0x17, 0x36, 0x75, 0x82, 0x1a, 0x4c, 0x1d -.byte 0x16, 0x20, 0x7b, 0x21, 0x46, 0x24, 0x10, 0x27, 0x75, 0x75 - -.global gUnknown_810838E -gUnknown_810838E: @ 810838E -.byte 0x32, 0x75, 0x04, 0x09, 0x09, 0x15 -.byte 0x0c, 0x1e, 0x10, 0x27, 0x40, 0x75, 0x83, 0x06, 0x37, 0x75, 0x05, 0x0d, 0x88, 0x13, 0x0b, 0x1a -.byte 0x3c, 0x75, 0x8d, 0x20, 0x3b, 0x75, 0x10, 0x27, 0x37, 0x75, 0x05, 0x0d, 0x34, 0x75, 0x0b, 0x1a -.byte 0x42, 0x75, 0x10, 0x27, 0x38, 0x75, 0x4c, 0x02, 0x98, 0x04, 0xe5, 0x06, 0x31, 0x09, 0x7d, 0x0b -.byte 0xc9, 0x0d, 0x16, 0x10, 0x62, 0x12, 0xae, 0x14, 0xfa, 0x16, 0x47, 0x19, 0x93, 0x1b, 0xdf, 0x1d -.byte 0x2b, 0x20, 0x78, 0x22, 0xc4, 0x24, 0x10, 0x27, 0x46, 0x75, 0x4f, 0x00, 0x32, 0x75, 0x8d, 0x01 -.byte 0x08, 0x04, 0x57, 0x04, 0x32, 0x75, 0x95, 0x05, 0x0f, 0x08, 0x31, 0x75, 0x8a, 0x0a, 0xc8, 0x0b -.byte 0x32, 0x75, 0x05, 0x0d, 0x32, 0x75, 0x55, 0x0d, 0xa4, 0x0d, 0xe2, 0x0e, 0x31, 0x0f, 0x31, 0x75 -.byte 0x6e, 0x10, 0x31, 0x75, 0xbe, 0x10, 0xfb, 0x11, 0x39, 0x13, 0x88, 0x13, 0xd7, 0x13, 0x15, 0x15 -.byte 0x31, 0x75, 0x52, 0x16, 0x90, 0x17, 0xcd, 0x18, 0x32, 0x75, 0x1d, 0x19, 0x31, 0x75, 0x6c, 0x19 -.byte 0xe7, 0x1b, 0x62, 0x1e, 0xdd, 0x20, 0x1a, 0x22, 0x95, 0x24, 0x10, 0x27, 0x75, 0x75 - -.global gUnknown_8108432 -gUnknown_8108432: @ 8108432 -.byte 0x32, 0x75 -.byte 0xc4, 0x09, 0x88, 0x13, 0x4c, 0x1d, 0x10, 0x27, 0x40, 0x75, 0x83, 0x06, 0x37, 0x75, 0x05, 0x0d -.byte 0x88, 0x13, 0x0b, 0x1a, 0x3c, 0x75, 0x8d, 0x20, 0x3b, 0x75, 0x10, 0x27, 0x37, 0x75, 0x05, 0x0d -.byte 0x34, 0x75, 0x0b, 0x1a, 0x42, 0x75, 0x10, 0x27, 0x38, 0x75, 0x4c, 0x02, 0x98, 0x04, 0xe5, 0x06 -.byte 0x31, 0x09, 0x7d, 0x0b, 0xc9, 0x0d, 0x16, 0x10, 0x62, 0x12, 0xae, 0x14, 0xfa, 0x16, 0x47, 0x19 -.byte 0x93, 0x1b, 0xdf, 0x1d, 0x2b, 0x20, 0x78, 0x22, 0xc4, 0x24, 0x10, 0x27, 0x46, 0x75, 0x4f, 0x00 -.byte 0x32, 0x75, 0x8d, 0x01, 0x08, 0x04, 0x57, 0x04, 0x32, 0x75, 0x95, 0x05, 0x0f, 0x08, 0x31, 0x75 -.byte 0x8a, 0x0a, 0xc8, 0x0b, 0x32, 0x75, 0x05, 0x0d, 0x32, 0x75, 0x55, 0x0d, 0xa4, 0x0d, 0xe2, 0x0e -.byte 0x31, 0x0f, 0x31, 0x75, 0x6e, 0x10, 0x31, 0x75, 0xbe, 0x10, 0xfb, 0x11, 0x39, 0x13, 0x88, 0x13 -.byte 0xd7, 0x13, 0x15, 0x15, 0x31, 0x75, 0x52, 0x16, 0x90, 0x17, 0xcd, 0x18, 0x32, 0x75, 0x1d, 0x19 -.byte 0x31, 0x75, 0x6c, 0x19, 0xe7, 0x1b, 0x62, 0x1e, 0xdd, 0x20, 0x1a, 0x22, 0x95, 0x24, 0x10, 0x27 -.byte 0x75, 0x75 - -.global gUnknown_81084D6 -gUnknown_81084D6: @ 81084D6 -.byte 0x32, 0x75, 0xc4, 0x09, 0x88, 0x13, 0x4c, 0x1d, 0x10, 0x27, 0x40, 0x75, 0x95, 0x05 -.byte 0x37, 0x75, 0x29, 0x0b, 0xbe, 0x10, 0x52, 0x16, 0x3c, 0x75, 0xe7, 0x1b, 0x33, 0x75, 0x7b, 0x21 -.byte 0x37, 0x75, 0x10, 0x27, 0x37, 0x75, 0x05, 0x0d, 0x34, 0x75, 0x0b, 0x1a, 0x42, 0x75, 0x10, 0x27 -.byte 0x38, 0x75, 0x4c, 0x02, 0x98, 0x04, 0xe5, 0x06, 0x31, 0x09, 0x7d, 0x0b, 0xc9, 0x0d, 0x16, 0x10 -.byte 0x62, 0x12, 0xae, 0x14, 0xfa, 0x16, 0x47, 0x19, 0x93, 0x1b, 0xdf, 0x1d, 0x2b, 0x20, 0x78, 0x22 -.byte 0xc4, 0x24, 0x10, 0x27, 0x46, 0x75, 0x4f, 0x00, 0x32, 0x75, 0x8d, 0x01, 0x08, 0x04, 0x57, 0x04 -.byte 0x32, 0x75, 0x95, 0x05, 0x0f, 0x08, 0x31, 0x75, 0x8a, 0x0a, 0xc8, 0x0b, 0x32, 0x75, 0x05, 0x0d -.byte 0x32, 0x75, 0x55, 0x0d, 0xa4, 0x0d, 0xe2, 0x0e, 0x31, 0x0f, 0x31, 0x75, 0x6e, 0x10, 0x31, 0x75 -.byte 0xbe, 0x10, 0xfb, 0x11, 0x39, 0x13, 0x88, 0x13, 0xd7, 0x13, 0x15, 0x15, 0x31, 0x75, 0x52, 0x16 -.byte 0x90, 0x17, 0xcd, 0x18, 0x32, 0x75, 0x1d, 0x19, 0x31, 0x75, 0x6c, 0x19, 0xe7, 0x1b, 0x62, 0x1e -.byte 0xdd, 0x20, 0x1a, 0x22, 0x95, 0x24, 0x10, 0x27, 0x75, 0x75 - -.global gUnknown_810857E -gUnknown_810857E: @ 810857E -.byte 0x32, 0x75, 0xc4, 0x09, 0x88, 0x13 -.byte 0x4c, 0x1d, 0x10, 0x27, 0x40, 0x75, 0x57, 0x04, 0x37, 0x75, 0xae, 0x08, 0x05, 0x0d, 0x5c, 0x11 -.byte 0x39, 0x75, 0xb4, 0x15, 0x32, 0x75, 0x0b, 0x1a, 0x62, 0x1e, 0x32, 0x75, 0xb9, 0x22, 0x37, 0x75 -.byte 0x10, 0x27, 0x37, 0x75, 0x05, 0x0d, 0x34, 0x75, 0x0b, 0x1a, 0x42, 0x75, 0x10, 0x27, 0x38, 0x75 -.byte 0x4c, 0x02, 0x98, 0x04, 0xe5, 0x06, 0x31, 0x09, 0x7d, 0x0b, 0xc9, 0x0d, 0x16, 0x10, 0x62, 0x12 -.byte 0xae, 0x14, 0xfa, 0x16, 0x47, 0x19, 0x93, 0x1b, 0xdf, 0x1d, 0x2b, 0x20, 0x78, 0x22, 0xc4, 0x24 -.byte 0x10, 0x27, 0x46, 0x75, 0x4f, 0x00, 0x32, 0x75, 0x8d, 0x01, 0x08, 0x04, 0x57, 0x04, 0x32, 0x75 -.byte 0x95, 0x05, 0x0f, 0x08, 0x31, 0x75, 0x8a, 0x0a, 0xc8, 0x0b, 0x32, 0x75, 0x05, 0x0d, 0x32, 0x75 -.byte 0x55, 0x0d, 0xa4, 0x0d, 0xe2, 0x0e, 0x31, 0x0f, 0x31, 0x75, 0x6e, 0x10, 0x31, 0x75, 0xbe, 0x10 -.byte 0xfb, 0x11, 0x39, 0x13, 0x88, 0x13, 0xd7, 0x13, 0x15, 0x15, 0x31, 0x75, 0x52, 0x16, 0x90, 0x17 -.byte 0xcd, 0x18, 0x32, 0x75, 0x1d, 0x19, 0x31, 0x75, 0x6c, 0x19, 0xe7, 0x1b, 0x62, 0x1e, 0xdd, 0x20 -.byte 0x1a, 0x22, 0x95, 0x24, 0x10, 0x27, 0x75, 0x75 - -.global gUnknown_810862C -gUnknown_810862C: @ 810862C -.byte 0x32, 0x75, 0x56, 0x0c, 0x31, 0x75, 0xac, 0x18 -.byte 0x02, 0x25, 0x34, 0x75, 0x10, 0x27, 0x3b, 0x75, 0x57, 0x04, 0x37, 0x75, 0xae, 0x08, 0x05, 0x0d -.byte 0x5c, 0x11, 0x39, 0x75, 0xb4, 0x15, 0x32, 0x75, 0x0b, 0x1a, 0x62, 0x1e, 0x32, 0x75, 0xb9, 0x22 -.byte 0x37, 0x75, 0x10, 0x27, 0x37, 0x75, 0xc4, 0x09, 0x34, 0x75, 0x88, 0x13, 0x3f, 0x75, 0x4c, 0x1d -.byte 0x32, 0x75, 0x10, 0x27, 0x5f, 0x75, 0x4f, 0x00, 0x32, 0x75, 0x8d, 0x01, 0x08, 0x04, 0x57, 0x04 -.byte 0x32, 0x75, 0x95, 0x05, 0x0f, 0x08, 0x31, 0x75, 0x8a, 0x0a, 0xc8, 0x0b, 0x32, 0x75, 0x05, 0x0d -.byte 0x32, 0x75, 0x55, 0x0d, 0xa4, 0x0d, 0xe2, 0x0e, 0x31, 0x0f, 0x31, 0x75, 0x6e, 0x10, 0x31, 0x75 -.byte 0xbe, 0x10, 0xfb, 0x11, 0x39, 0x13, 0x88, 0x13, 0xd7, 0x13, 0x15, 0x15, 0x31, 0x75, 0x52, 0x16 -.byte 0x90, 0x17, 0xcd, 0x18, 0x32, 0x75, 0x1d, 0x19, 0x31, 0x75, 0x6c, 0x19, 0xe7, 0x1b, 0x62, 0x1e -.byte 0xdd, 0x20, 0x1a, 0x22, 0x95, 0x24, 0x10, 0x27, 0x6d, 0x75, 0xb4, 0x15, 0x31, 0x75, 0x62, 0x1e -.byte 0x10, 0x27, 0x34, 0x75 - -.global gUnknown_81086C8 -gUnknown_81086C8: @ 81086C8 -.byte 0x32, 0x75, 0x56, 0x0c, 0x31, 0x75, 0xac, 0x18, 0x02, 0x25, 0x34, 0x75 -.byte 0x10, 0x27, 0x3b, 0x75, 0xe8, 0x03, 0x37, 0x75, 0xd0, 0x07, 0xb8, 0x0b, 0xa0, 0x0f, 0x88, 0x13 -.byte 0x38, 0x75, 0x70, 0x17, 0x32, 0x75, 0x58, 0x1b, 0x40, 0x1f, 0x32, 0x75, 0x28, 0x23, 0x37, 0x75 -.byte 0x10, 0x27, 0x37, 0x75, 0xc4, 0x09, 0x34, 0x75, 0x88, 0x13, 0x3f, 0x75, 0x4c, 0x1d, 0x32, 0x75 -.byte 0x10, 0x27, 0x5f, 0x75, 0x4f, 0x00, 0x32, 0x75, 0x8d, 0x01, 0x08, 0x04, 0x57, 0x04, 0x32, 0x75 -.byte 0x95, 0x05, 0x0f, 0x08, 0x31, 0x75, 0x8a, 0x0a, 0xc8, 0x0b, 0x32, 0x75, 0x05, 0x0d, 0x32, 0x75 -.byte 0x55, 0x0d, 0xa4, 0x0d, 0xe2, 0x0e, 0x31, 0x0f, 0x31, 0x75, 0x6e, 0x10, 0x31, 0x75, 0xbe, 0x10 -.byte 0xfb, 0x11, 0x39, 0x13, 0x88, 0x13, 0xd7, 0x13, 0x15, 0x15, 0x31, 0x75, 0x52, 0x16, 0x90, 0x17 -.byte 0xcd, 0x18, 0x32, 0x75, 0x1d, 0x19, 0x31, 0x75, 0x6c, 0x19, 0xe7, 0x1b, 0x62, 0x1e, 0xdd, 0x20 -.byte 0x1a, 0x22, 0x95, 0x24, 0x10, 0x27, 0x6d, 0x75, 0xb4, 0x15, 0x31, 0x75, 0x62, 0x1e, 0x10, 0x27 -.byte 0x34, 0x75 - -.global gUnknown_8108766 -gUnknown_8108766: @ 8108766 -.byte 0x32, 0x75, 0x35, 0x05, 0x31, 0x75, 0xd5, 0x14, 0x75, 0x24, 0x34, 0x75, 0x10, 0x27 -.byte 0x3b, 0x75, 0xe8, 0x03, 0x37, 0x75, 0xd0, 0x07, 0xb8, 0x0b, 0xa0, 0x0f, 0x88, 0x13, 0x38, 0x75 -.byte 0x70, 0x17, 0x32, 0x75, 0x58, 0x1b, 0x40, 0x1f, 0x32, 0x75, 0x28, 0x23, 0x37, 0x75, 0x10, 0x27 -.byte 0x37, 0x75, 0xc4, 0x09, 0x34, 0x75, 0x88, 0x13, 0x3f, 0x75, 0x4c, 0x1d, 0x32, 0x75, 0x10, 0x27 -.byte 0x5f, 0x75, 0x4f, 0x00, 0x32, 0x75, 0x8d, 0x01, 0x08, 0x04, 0x57, 0x04, 0x32, 0x75, 0x95, 0x05 -.byte 0x0f, 0x08, 0x31, 0x75, 0x8a, 0x0a, 0xc8, 0x0b, 0x32, 0x75, 0x05, 0x0d, 0x32, 0x75, 0x55, 0x0d -.byte 0xa4, 0x0d, 0xe2, 0x0e, 0x31, 0x0f, 0x31, 0x75, 0x6e, 0x10, 0x31, 0x75, 0xbe, 0x10, 0xfb, 0x11 -.byte 0x39, 0x13, 0x88, 0x13, 0xd7, 0x13, 0x15, 0x15, 0x31, 0x75, 0x52, 0x16, 0x90, 0x17, 0xcd, 0x18 -.byte 0x32, 0x75, 0x1d, 0x19, 0x31, 0x75, 0x6c, 0x19, 0xe7, 0x1b, 0x62, 0x1e, 0xdd, 0x20, 0x1a, 0x22 -.byte 0x95, 0x24, 0x10, 0x27, 0x6d, 0x75, 0xb4, 0x15, 0x31, 0x75, 0x62, 0x1e, 0x10, 0x27, 0x34, 0x75 - -.global gUnknown_8108804 -gUnknown_8108804: @ 8108804 -.byte 0x32, 0x75, 0x35, 0x05, 0x31, 0x75, 0xd5, 0x14, 0x75, 0x24, 0x34, 0x75, 0x10, 0x27, 0x3b, 0x75 -.byte 0xe8, 0x03, 0x37, 0x75, 0xd0, 0x07, 0xb8, 0x0b, 0xa0, 0x0f, 0x88, 0x13, 0x38, 0x75, 0x70, 0x17 -.byte 0x32, 0x75, 0x58, 0x1b, 0x40, 0x1f, 0x32, 0x75, 0x28, 0x23, 0x37, 0x75, 0x10, 0x27, 0x37, 0x75 -.byte 0xc4, 0x09, 0x34, 0x75, 0x88, 0x13, 0x3f, 0x75, 0x4c, 0x1d, 0x32, 0x75, 0x10, 0x27, 0x5f, 0x75 -.byte 0x4f, 0x00, 0x32, 0x75, 0x8d, 0x01, 0x08, 0x04, 0x57, 0x04, 0x32, 0x75, 0x95, 0x05, 0x0f, 0x08 -.byte 0x31, 0x75, 0x8a, 0x0a, 0xc8, 0x0b, 0x32, 0x75, 0x05, 0x0d, 0x32, 0x75, 0x55, 0x0d, 0xa4, 0x0d -.byte 0xe2, 0x0e, 0x31, 0x0f, 0x31, 0x75, 0x6e, 0x10, 0x31, 0x75, 0xbe, 0x10, 0xfb, 0x11, 0x39, 0x13 -.byte 0x88, 0x13, 0xd7, 0x13, 0x15, 0x15, 0x31, 0x75, 0x52, 0x16, 0x90, 0x17, 0xcd, 0x18, 0x32, 0x75 -.byte 0x1d, 0x19, 0x31, 0x75, 0x6c, 0x19, 0xe7, 0x1b, 0x62, 0x1e, 0xdd, 0x20, 0x1a, 0x22, 0x95, 0x24 -.byte 0x10, 0x27, 0x6d, 0x75, 0xb4, 0x15, 0x31, 0x75, 0x62, 0x1e, 0x10, 0x27, 0x34, 0x75 - -.global gUnknown_81088A2 -gUnknown_81088A2: @ 81088A2 -.byte 0x32, 0x75 -.byte 0x35, 0x05, 0x31, 0x75, 0xd5, 0x14, 0x75, 0x24, 0x34, 0x75, 0x10, 0x27, 0x3b, 0x75, 0xe8, 0x03 -.byte 0x37, 0x75, 0xd0, 0x07, 0xb8, 0x0b, 0xa0, 0x0f, 0x88, 0x13, 0x38, 0x75, 0x70, 0x17, 0x32, 0x75 -.byte 0x58, 0x1b, 0x40, 0x1f, 0x32, 0x75, 0x28, 0x23, 0x37, 0x75, 0x10, 0x27, 0x4c, 0x75, 0xd0, 0x07 -.byte 0x33, 0x75, 0xa0, 0x0f, 0x70, 0x17, 0x40, 0x1f, 0x10, 0x27, 0x5b, 0x75, 0x4f, 0x00, 0x32, 0x75 -.byte 0x8d, 0x01, 0x08, 0x04, 0x57, 0x04, 0x32, 0x75, 0x95, 0x05, 0x0f, 0x08, 0x31, 0x75, 0x8a, 0x0a -.byte 0xc8, 0x0b, 0x32, 0x75, 0x05, 0x0d, 0x32, 0x75, 0x55, 0x0d, 0xa4, 0x0d, 0xe2, 0x0e, 0x31, 0x0f -.byte 0x31, 0x75, 0x6e, 0x10, 0x31, 0x75, 0xbe, 0x10, 0xfb, 0x11, 0x39, 0x13, 0x88, 0x13, 0xd7, 0x13 -.byte 0x15, 0x15, 0x31, 0x75, 0x52, 0x16, 0x90, 0x17, 0xcd, 0x18, 0x32, 0x75, 0x1d, 0x19, 0x31, 0x75 -.byte 0x6c, 0x19, 0xe7, 0x1b, 0x62, 0x1e, 0xdd, 0x20, 0x1a, 0x22, 0x95, 0x24, 0x10, 0x27, 0x6d, 0x75 -.byte 0xb4, 0x15, 0x31, 0x75, 0x62, 0x1e, 0x10, 0x27, 0x34, 0x75 - -.global gUnknown_810893E -gUnknown_810893E: @ 810893E -.byte 0x32, 0x75, 0x35, 0x05, 0x31, 0x75 -.byte 0xd5, 0x14, 0x75, 0x24, 0x34, 0x75, 0x10, 0x27, 0x3b, 0x75, 0xe8, 0x03, 0x37, 0x75, 0xd0, 0x07 -.byte 0xb8, 0x0b, 0xa0, 0x0f, 0x88, 0x13, 0x38, 0x75, 0x70, 0x17, 0x32, 0x75, 0x58, 0x1b, 0x40, 0x1f -.byte 0x32, 0x75, 0x28, 0x23, 0x37, 0x75, 0x10, 0x27, 0x4c, 0x75, 0xd0, 0x07, 0x33, 0x75, 0xa0, 0x0f -.byte 0x70, 0x17, 0x40, 0x1f, 0x10, 0x27, 0x5b, 0x75, 0x4f, 0x00, 0x32, 0x75, 0x8d, 0x01, 0x08, 0x04 -.byte 0x57, 0x04, 0x32, 0x75, 0x95, 0x05, 0x0f, 0x08, 0x31, 0x75, 0x8a, 0x0a, 0xc8, 0x0b, 0x32, 0x75 -.byte 0x05, 0x0d, 0x32, 0x75, 0x55, 0x0d, 0xa4, 0x0d, 0xe2, 0x0e, 0x31, 0x0f, 0x31, 0x75, 0x6e, 0x10 -.byte 0x31, 0x75, 0xbe, 0x10, 0xfb, 0x11, 0x39, 0x13, 0x88, 0x13, 0xd7, 0x13, 0x15, 0x15, 0x31, 0x75 -.byte 0x52, 0x16, 0x90, 0x17, 0xcd, 0x18, 0x32, 0x75, 0x1d, 0x19, 0x31, 0x75, 0x6c, 0x19, 0xe7, 0x1b -.byte 0x62, 0x1e, 0xdd, 0x20, 0x1a, 0x22, 0x95, 0x24, 0x10, 0x27, 0x6d, 0x75, 0xb4, 0x15, 0x31, 0x75 -.byte 0x62, 0x1e, 0x10, 0x27, 0x34, 0x75 - -.global gUnknown_81089DA -gUnknown_81089DA: @ 81089DA -.byte 0x31, 0x75, 0xe2, 0x04, 0x6a, 0x18, 0x10, 0x27, 0x3f, 0x75 -.byte 0x10, 0x27, 0x5f, 0x75, 0x83, 0x06, 0x32, 0x75, 0xa6, 0x0e, 0x34, 0x75, 0xe7, 0x11, 0x32, 0x75 -.byte 0x29, 0x15, 0x6a, 0x18, 0x31, 0x75, 0xab, 0x1b, 0x31, 0x75, 0x4c, 0x1d, 0x8d, 0x20, 0x33, 0x75 -.byte 0xcf, 0x23, 0x10, 0x27, 0x34, 0x75, 0x88, 0x13, 0x10, 0x27, 0xcc, 0x75 - -.global gUnknown_8108A10 -gUnknown_8108A10: @ 8108A10 -.byte 0x35, 0x75, 0xc4, 0x09 -.byte 0x33, 0x75, 0x10, 0x27, 0xb2, 0x75, 0x65, 0x01, 0x2f, 0x04, 0x33, 0x75, 0x95, 0x05, 0x5f, 0x08 -.byte 0x31, 0x75, 0x29, 0x0b, 0x8e, 0x0c, 0x32, 0x75, 0xf3, 0x0d, 0x34, 0x75, 0x59, 0x0f, 0x32, 0x75 -.byte 0xbe, 0x10, 0x32, 0x75, 0x23, 0x12, 0x88, 0x13, 0x32, 0x75, 0xed, 0x14, 0x31, 0x75, 0x52, 0x16 -.byte 0xb7, 0x17, 0x36, 0x75, 0x82, 0x1a, 0x4c, 0x1d, 0x16, 0x20, 0x7b, 0x21, 0x46, 0x24, 0x10, 0x27 -.byte 0x3b, 0x75, 0xca, 0x02, 0x5f, 0x08, 0x29, 0x0b, 0x34, 0x75, 0xf3, 0x0d, 0x3a, 0x75, 0xe7, 0x1b -.byte 0xb1, 0x1e, 0x7b, 0x21, 0x3f, 0x75, 0x10, 0x27, 0x45, 0x75 - -.global gUnknown_8108A6E -gUnknown_8108A6E: @ 8108A6E -.byte 0xe8, 0x03, 0xd0, 0x07, 0x70, 0x17 -.byte 0x28, 0x23, 0x10, 0x27, 0x39, 0x75, 0x8d, 0x20, 0x10, 0x27, 0x33, 0x75, 0x10, 0x27, 0x32, 0x75 -.byte 0x95, 0x05, 0x36, 0x75, 0x29, 0x0b, 0xbe, 0x10, 0x52, 0x16, 0xe7, 0x1b, 0x7b, 0x21, 0x39, 0x75 -.byte 0x10, 0x27, 0x45, 0x75, 0x95, 0x05, 0x34, 0x75, 0xbe, 0x10, 0x38, 0x75, 0x52, 0x16, 0x31, 0x75 -.byte 0xe7, 0x1b, 0x31, 0x75, 0x7b, 0x21, 0x35, 0x75, 0x10, 0x27, 0x37, 0x75, 0x10, 0x27, 0xca, 0x75 - -.global gUnknown_8108AB4 -gUnknown_8108AB4: @ 8108AB4 -.byte 0x35, 0x75, 0xc4, 0x09, 0x33, 0x75, 0x10, 0x27, 0xb2, 0x75, 0x65, 0x01, 0x2f, 0x04, 0x33, 0x75 -.byte 0x95, 0x05, 0x5f, 0x08, 0x31, 0x75, 0x29, 0x0b, 0x8e, 0x0c, 0x32, 0x75, 0xf3, 0x0d, 0x34, 0x75 -.byte 0x59, 0x0f, 0x32, 0x75, 0xbe, 0x10, 0x32, 0x75, 0x23, 0x12, 0x88, 0x13, 0x32, 0x75, 0xed, 0x14 -.byte 0x71, 0x02, 0x52, 0x16, 0xb7, 0x17, 0x34, 0x75, 0xe2, 0x04, 0x31, 0x75, 0x82, 0x1a, 0x4c, 0x1d -.byte 0x16, 0x20, 0x7b, 0x21, 0x46, 0x24, 0x10, 0x27, 0x3b, 0x75, 0x53, 0x07, 0x35, 0x0c, 0xa6, 0x0e -.byte 0x34, 0x75, 0x17, 0x11, 0x3a, 0x75, 0x4c, 0x1d, 0xbd, 0x1f, 0x2e, 0x22, 0x3f, 0x75, 0x10, 0x27 -.byte 0x45, 0x75 - -.global gUnknown_8108B16 -gUnknown_8108B16: @ 8108B16 -.byte 0xe8, 0x03, 0xd0, 0x07, 0x70, 0x17, 0x28, 0x23, 0x10, 0x27, 0x39, 0x75, 0x8d, 0x20 -.byte 0x10, 0x27, 0x33, 0x75, 0x10, 0x27, 0x32, 0x75, 0x95, 0x05, 0x36, 0x75, 0x29, 0x0b, 0xbe, 0x10 -.byte 0x52, 0x16, 0xe7, 0x1b, 0x7b, 0x21, 0x39, 0x75, 0x10, 0x27, 0x45, 0x75, 0x95, 0x05, 0x34, 0x75 -.byte 0xbe, 0x10, 0x38, 0x75, 0x52, 0x16, 0x31, 0x75, 0xe7, 0x1b, 0x31, 0x75, 0x7b, 0x21, 0x35, 0x75 -.byte 0x10, 0x27, 0x37, 0x75, 0x10, 0x27, 0xca, 0x75 - -.global gUnknown_8108B5C -gUnknown_8108B5C: @ 8108B5C -.byte 0x35, 0x75, 0x6a, 0x18, 0x33, 0x75, 0x10, 0x27 -.byte 0xb2, 0x75, 0x59, 0x01, 0x0a, 0x04, 0x33, 0x75, 0x63, 0x05, 0x15, 0x08, 0x31, 0x75, 0xc7, 0x0a -.byte 0x1f, 0x0c, 0x32, 0x75, 0x78, 0x0d, 0x34, 0x75, 0xd1, 0x0e, 0x32, 0x75, 0x2a, 0x10, 0x32, 0x75 -.byte 0x83, 0x11, 0xdc, 0x12, 0x32, 0x75, 0x34, 0x14, 0x71, 0x02, 0x8d, 0x15, 0xe6, 0x16, 0x3f, 0x18 -.byte 0x33, 0x75, 0xe2, 0x04, 0x31, 0x75, 0xf1, 0x1a, 0xa2, 0x1d, 0x54, 0x20, 0xad, 0x21, 0x5e, 0x24 -.byte 0x10, 0x27, 0x3b, 0x75, 0x53, 0x07, 0x35, 0x0c, 0xa6, 0x0e, 0x34, 0x75, 0x17, 0x11, 0x3a, 0x75 -.byte 0x4c, 0x1d, 0xbd, 0x1f, 0x2e, 0x22, 0x3f, 0x75, 0x10, 0x27, 0x45, 0x75 - -.global gUnknown_8108BC0 -gUnknown_8108BC0: @ 8108BC0 -.byte 0xe8, 0x03, 0xd0, 0x07 -.byte 0x58, 0x1b, 0x28, 0x23, 0x10, 0x27, 0x39, 0x75, 0x8d, 0x20, 0x10, 0x27, 0x33, 0x75, 0x10, 0x27 -.byte 0x32, 0x75, 0x57, 0x04, 0x36, 0x75, 0xae, 0x08, 0x05, 0x0d, 0x5c, 0x11, 0xb4, 0x15, 0x0b, 0x1a -.byte 0x62, 0x1e, 0x3a, 0x75, 0xb9, 0x22, 0x3a, 0x75, 0xe4, 0x24, 0x10, 0x27, 0x37, 0x75, 0xe5, 0x02 -.byte 0x34, 0x75, 0xae, 0x08, 0x34, 0x75, 0x78, 0x0e, 0x41, 0x14, 0x32, 0x75, 0x0b, 0x1a, 0x36, 0x75 -.byte 0x7d, 0x1b, 0x31, 0x75, 0x47, 0x21, 0x10, 0x27, 0x37, 0x75, 0x10, 0x27, 0xca, 0x75 - -.global gUnknown_8108C12 -gUnknown_8108C12: @ 8108C12 -.byte 0x35, 0x75 -.byte 0x88, 0x13, 0x33, 0x75, 0x10, 0x27, 0xb2, 0x75, 0x59, 0x01, 0x0a, 0x04, 0x31, 0x75, 0xa1, 0x01 -.byte 0x31, 0x75, 0x63, 0x05, 0x15, 0x08, 0x41, 0x03, 0xc7, 0x0a, 0x1f, 0x0c, 0x32, 0x75, 0x78, 0x0d -.byte 0x31, 0x75, 0xe2, 0x04, 0x32, 0x75, 0xd1, 0x0e, 0x32, 0x75, 0x2a, 0x10, 0x32, 0x75, 0x83, 0x11 -.byte 0xdc, 0x12, 0x32, 0x75, 0x34, 0x14, 0x83, 0x06, 0x8d, 0x15, 0xe6, 0x16, 0x3f, 0x18, 0x31, 0x75 -.byte 0x23, 0x08, 0x31, 0x75, 0xc4, 0x09, 0x31, 0x75, 0xf1, 0x1a, 0xa2, 0x1d, 0x54, 0x20, 0xad, 0x21 -.byte 0x5e, 0x24, 0x10, 0x27, 0x38, 0x75, 0x65, 0x0b, 0x32, 0x75, 0x05, 0x0d, 0x47, 0x10, 0xe7, 0x11 -.byte 0x88, 0x13, 0x33, 0x75, 0x29, 0x15, 0x35, 0x75, 0x6a, 0x18, 0xab, 0x1b, 0x34, 0x75, 0x4c, 0x1d -.byte 0xed, 0x1e, 0x8d, 0x20, 0x2e, 0x22, 0xcf, 0x23, 0x3c, 0x75, 0x10, 0x27, 0x45, 0x75 - -.global gUnknown_8108C92 -gUnknown_8108C92: @ 8108C92 -.byte 0x01, 0x03 -.byte 0x02, 0x06, 0x0a, 0x18, 0x0b, 0x1b, 0x0c, 0x1e, 0x34, 0x75, 0x10, 0x27, 0x33, 0x75, 0xb6, 0x16 -.byte 0x56, 0x24, 0x10, 0x27, 0x33, 0x75, 0x58, 0x1b, 0x10, 0x27, 0x40, 0x75, 0x10, 0x27, 0x50, 0x75 -.byte 0x88, 0x13, 0x42, 0x75, 0x10, 0x27, 0x38, 0x75, 0x4c, 0x02, 0x98, 0x04, 0xe5, 0x06, 0x31, 0x09 -.byte 0x7d, 0x0b, 0xc9, 0x0d, 0x16, 0x10, 0x62, 0x12, 0xae, 0x14, 0xfa, 0x16, 0x47, 0x19, 0x93, 0x1b -.byte 0xdf, 0x1d, 0x2b, 0x20, 0x78, 0x22, 0xc4, 0x24, 0x10, 0x27, 0x7c, 0x75, 0x81, 0x01, 0x32, 0x75 -.byte 0x01, 0x03, 0x02, 0x06, 0x83, 0x07, 0x04, 0x09, 0x84, 0x0a, 0x31, 0x75, 0x86, 0x0d, 0x06, 0x0f -.byte 0x87, 0x10, 0x88, 0x13, 0x33, 0x75, 0x89, 0x16, 0x8a, 0x19, 0x8c, 0x1c, 0x31, 0x75, 0x0c, 0x1e -.byte 0x31, 0x75, 0x8d, 0x1f, 0x0e, 0x21, 0x34, 0x75, 0x8e, 0x22, 0x33, 0x75, 0x0f, 0x24, 0x36, 0x75 -.byte 0x10, 0x27, 0x45, 0x75 - -.global gUnknown_8108D18 -gUnknown_8108D18: @ 8108D18 -.byte 0x56, 0x0c, 0x31, 0x75, 0x81, 0x12, 0x9d, 0x16, 0xba, 0x1a, 0xd7, 0x1e -.byte 0x33, 0x75, 0xf3, 0x22, 0x10, 0x27, 0x35, 0x75, 0x05, 0x0d, 0x0b, 0x1a, 0x10, 0x27, 0x33, 0x75 -.byte 0xb3, 0x01, 0x66, 0x03, 0x31, 0x75, 0x18, 0x05, 0xcb, 0x06, 0x32, 0x75, 0x7e, 0x08, 0x31, 0x0a -.byte 0xe3, 0x0b, 0x96, 0x0d, 0x49, 0x0f, 0xfc, 0x10, 0x36, 0x75, 0xaf, 0x12, 0x61, 0x14, 0x14, 0x16 -.byte 0xc7, 0x17, 0x7a, 0x19, 0x2d, 0x1b, 0x33, 0x75, 0xdf, 0x1c, 0x92, 0x1e, 0x45, 0x20, 0xf8, 0x21 -.byte 0xaa, 0x23, 0x31, 0x75, 0x5d, 0x25, 0x10, 0x27, 0x3c, 0x75, 0x05, 0x0d, 0x3f, 0x75, 0x0b, 0x1a -.byte 0x32, 0x75, 0x10, 0x27, 0x49, 0x75, 0x10, 0x27, 0x45, 0x75, 0x4f, 0x00, 0x32, 0x75, 0x8d, 0x01 -.byte 0x08, 0x04, 0x57, 0x04, 0xc4, 0x00, 0x31, 0x75, 0x95, 0x05, 0x0f, 0x08, 0x88, 0x01, 0x8a, 0x0a -.byte 0xc8, 0x0b, 0x32, 0x75, 0x05, 0x0d, 0x31, 0x75, 0x4c, 0x02, 0x55, 0x0d, 0xa4, 0x0d, 0xe2, 0x0e -.byte 0x31, 0x0f, 0x31, 0x75, 0x6e, 0x10, 0x31, 0x75, 0xbe, 0x10, 0xfb, 0x11, 0x39, 0x13, 0x88, 0x13 -.byte 0xd7, 0x13, 0x15, 0x15, 0x10, 0x03, 0x52, 0x16, 0x90, 0x17, 0xcd, 0x18, 0x31, 0x75, 0xd4, 0x03 -.byte 0x1d, 0x19, 0x98, 0x04, 0x6c, 0x19, 0xe7, 0x1b, 0x62, 0x1e, 0xdd, 0x20, 0x1a, 0x22, 0x95, 0x24 -.byte 0x10, 0x27, 0x32, 0x75, 0x5d, 0x05, 0x35, 0x75, 0x21, 0x06, 0xe5, 0x06, 0xa9, 0x07, 0x6d, 0x08 -.byte 0xf5, 0x09, 0xb9, 0x0a, 0x7d, 0x0b, 0x41, 0x0c, 0x05, 0x0d, 0x8d, 0x0e, 0x52, 0x0f, 0x16, 0x10 -.byte 0x9e, 0x11, 0x62, 0x12, 0x26, 0x13, 0x31, 0x75, 0xae, 0x14, 0x36, 0x16, 0xbe, 0x17, 0x83, 0x18 -.byte 0x47, 0x19, 0x0b, 0x1a, 0xcf, 0x1a, 0x93, 0x1b, 0x57, 0x1c, 0x1b, 0x1d, 0xdf, 0x1d, 0x31, 0x75 -.byte 0xa3, 0x1e, 0x33, 0x75, 0x67, 0x1f, 0x2b, 0x20, 0xef, 0x20, 0xb3, 0x21, 0x78, 0x22, 0x32, 0x75 -.byte 0x00, 0x24, 0xc4, 0x24, 0x31, 0x75, 0x88, 0x25, 0x4c, 0x26, 0x10, 0x27, 0x38, 0x75, 0x10, 0x27 -.byte 0x37, 0x75 - -.global gUnknown_8108E36 -gUnknown_8108E36: @ 8108E36 -.byte 0x33, 0x75, 0x83, 0x06, 0x34, 0x75, 0x8d, 0x20, 0x10, 0x27, 0x99, 0x75, 0x10, 0x27 -.byte 0x34, 0x75, 0xc4, 0x09, 0x32, 0x75, 0x88, 0x13, 0x4c, 0x1d, 0x3a, 0x75, 0x10, 0x27, 0x89, 0x75 -.byte 0x10, 0x27, 0x4a, 0x75 - -.global gUnknown_8108E58 -gUnknown_8108E58: @ 8108E58 -@ replacing .incbin "baserom.gba", 0x00108e58, 0x68 -@ u16*s -.4byte gUnknown_8108184 -.4byte gUnknown_810819C -.4byte gUnknown_81081EA -.4byte gUnknown_8108274 -.4byte gUnknown_8108302 -.4byte gUnknown_810838E -.4byte gUnknown_8108432 -.4byte gUnknown_81084D6 -.4byte gUnknown_810857E -.4byte gUnknown_810862C -.4byte gUnknown_81086C8 -.4byte gUnknown_8108766 -.4byte gUnknown_8108804 -.4byte gUnknown_81088A2 -.4byte gUnknown_810893E -.4byte gUnknown_81089DA -.4byte gUnknown_8108A10 -.4byte gUnknown_8108A6E -.4byte gUnknown_8108AB4 -.4byte gUnknown_8108B16 -.4byte gUnknown_8108B5C -.4byte gUnknown_8108BC0 -.4byte gUnknown_8108C12 -.4byte gUnknown_8108C92 -.4byte gUnknown_8108D18 -.4byte gUnknown_8108E36 - -.global gUnknown_8108EC0 -gUnknown_8108EC0: @ 8108EC0 -@ replacing .incbin "baserom.gba", 0x108EC0, 0x50 -.byte 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f -.byte 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x10, 0x17, 0x18, 0x19, 0x14, 0x17, 0x1c, 0x1d, 0x1e, 0x1f -.byte 0x20, 0x21, 0x1c, 0x23, 0x24, 0x25, 0x1e, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f -.byte 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x2d, 0x2d, 0x3b, 0x3c, 0x30, 0x3e, 0x3f -.byte 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f - -.global gUnknown_8108F10 -gUnknown_8108F10: @ 8108F10 -.string "{color YELLOW_D}%s{reset}\0" -.align 2,0 - -.global gUnknown_8108F18 -gUnknown_8108F18: @ 8108F18 -.string "{color YELLOW_D}%s{reset} {color CYAN}%d{reset}F\0" -.align 2,0 - -.global gUnknown_8108F2C -gUnknown_8108F2C: @ 8108F2C -.string "{color YELLOW_D}%s{reset} B{color CYAN}%d{reset}F\0" -.align 2,0 - -.global gUnknown_8108F40 -gUnknown_8108F40: @ 8108F40 -.byte 0x00, 0x00 - -.global gUnknown_8108F42 -gUnknown_8108F42: @ 8108F42 -.byte 0x99, 0x00, 0x9c, 0x00, 0x9e, 0x00, 0xdb, 0x00 - -.global gUnknown_8108F4A -gUnknown_8108F4A: @ 8108F4A -.byte 0xe1, 0xe7, 0xe6, 0xe2, 0x00, 0x00 - -.global gUnknown_8108F50 -gUnknown_8108F50: @ 8108F50 -.string "No problem.\0" -.align 2,0 -@ items.c -.string "pksdir0\0" -.align 2,0 - -.global gUnknown_8108F64 -gUnknown_8108F64: @ 8108F64 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -.byte 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x2c, 0x01, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -.byte 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x0c, 0x21, 0x40, 0x10, 0x00, 0x02, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x21, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x84, 0x0c, 0x21, 0x44, 0xff, 0x03, 0x02, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x11, 0x00, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x80, 0x00, 0x08, 0x00, 0x02, 0x00, 0x80, 0x80, 0x0c, 0x21, 0xc4, 0x55, 0x1d, 0x02, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x80, 0x00, 0x08, 0x02, 0x02, 0x00, 0x80, 0x00, 0x0c, 0x21, 0xc4, 0xfd, 0x25, 0x02, 0x00, 0x00 -.byte 0x66, 0x81, 0x83, 0x4d, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x21, 0xc0, 0xfe, 0x44, 0x02, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -.byte 0x80, 0x00, 0x08, 0x00, 0x02, 0x00, 0x80, 0x80, 0x0c, 0x21, 0xc4, 0xfc, 0x45, 0x02, 0x00, 0x00 -.byte 0x66, 0x81, 0x83, 0x4d, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00 -.byte 0x80, 0x00, 0x18, 0x82, 0x00, 0x00, 0x80, 0x00, 0x0c, 0x21, 0xc4, 0xfd, 0x45, 0x02, 0x00, 0x00 -.byte 0x66, 0x81, 0x83, 0x4d, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00 -.byte 0x80, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x70, 0x64, 0x02, 0x00, 0x00 -.byte 0x66, 0x81, 0x83, 0x4d, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x02, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -.byte 0x80, 0x00, 0x18, 0x80, 0x02, 0x00, 0x80, 0x00, 0x0c, 0x21, 0x44, 0xfd, 0x61, 0x02, 0x00, 0x00 -.byte 0x66, 0x81, 0x83, 0x4d, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x08, 0x20, 0x00, 0x09, 0x00, 0x02, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -.byte 0x84, 0x04, 0x38, 0x80, 0x02, 0x00, 0x80, 0x04, 0x0c, 0x21, 0x44, 0xfd, 0x7d, 0x02, 0x00, 0x00 -.byte 0x66, 0x83, 0x93, 0x4d, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x08, 0x20, 0x40, 0xfd, 0x45, 0x02, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -.byte 0x8c, 0x14, 0x7e, 0xa2, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x64, 0x02, 0x00, 0x20 -.byte 0x66, 0x81, 0xd7, 0xcd, 0xf4, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -.byte 0x0c, 0x14, 0x7e, 0xa2, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xa8, 0x0c, 0x02, 0x00, 0x20 -.byte 0x67, 0x93, 0xd7, 0xef, 0xf4, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00 -.byte 0x00, 0x14, 0x7f, 0xa0, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20 -.byte 0x67, 0x93, 0xd7, 0xef, 0xf4, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -.byte 0x80, 0x3c, 0x7e, 0xc2, 0x08, 0x10, 0xa0, 0x20, 0xbe, 0x21, 0xc0, 0xff, 0x7f, 0x02, 0x00, 0x20 -.byte 0x67, 0x93, 0xd7, 0x7f, 0xf0, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x8c, 0x3c, 0x7e, 0xc2, 0x08, 0x10, 0xa0, 0x80, 0xbc, 0x20, 0x10, 0x01, 0x00, 0x02, 0x00, 0x20 -.byte 0x67, 0x93, 0xd7, 0x7f, 0xf0, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x08, 0x20, 0x40, 0xfd, 0x45, 0x02, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x84, 0x3c, 0xe1, 0x03, 0x00, 0x00, 0x02, 0x00, 0x08 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -.byte 0x8e, 0x02, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x21, 0x9a, 0x21, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x8e, 0x02, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x21, 0x9a, 0x21, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x8e, 0xbe, 0x7e, 0xe9, 0x4e, 0x3c, 0xa0, 0xa7, 0xbf, 0x39, 0x20, 0x00, 0x00, 0x02, 0x00, 0x20 -.byte 0x67, 0x93, 0xd7, 0xff, 0xfc, 0x27, 0xfc, 0xff, 0xbb, 0x9f, 0x79, 0xec, 0x00, 0x01, 0x00, 0x00 -.byte 0x8e, 0xfe, 0x7e, 0xe9, 0x4e, 0x34, 0xa0, 0xa7, 0xbf, 0x39, 0x04, 0x00, 0x00, 0x02, 0x00, 0x20 -.byte 0x67, 0x93, 0xd7, 0xff, 0xfc, 0x27, 0xfc, 0xff, 0xbb, 0x9f, 0x59, 0xec, 0x00, 0x01, 0x00, 0x00 -.byte 0x8c, 0x14, 0x7f, 0xe2, 0x00, 0x00, 0xa0, 0x84, 0x0f, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20 -.byte 0x67, 0x93, 0xd7, 0xff, 0xf4, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00 -.byte 0x8c, 0x14, 0x7f, 0xe2, 0x00, 0x00, 0xa0, 0x84, 0x0f, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20 -.byte 0x67, 0x93, 0xd7, 0xff, 0xf4, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00 -.byte 0x8e, 0xff, 0xff, 0xeb, 0xef, 0x77, 0xa0, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x80, 0x04, 0x38, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x28 -.byte 0x67, 0x93, 0xd7, 0xff, 0xf4, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x80, 0xc0, 0x03, 0x69, 0x46, 0x00, 0xa0, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x00, 0x02, 0x08, 0x20 -.byte 0x67, 0x93, 0xd7, 0xff, 0xf4, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x8e, 0xc0, 0x03, 0x69, 0x46, 0x10, 0xa0, 0xae, 0xbf, 0x39, 0x08, 0x00, 0x00, 0x02, 0x20, 0x60 -.byte 0x67, 0x93, 0xd7, 0xff, 0xf4, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x8e, 0xc0, 0x03, 0x69, 0x46, 0x00, 0xa0, 0xae, 0xbf, 0xf9, 0x07, 0x00, 0x00, 0x02, 0x02, 0x20 -.byte 0x67, 0x93, 0xd7, 0xff, 0xf4, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x8e, 0xc0, 0x03, 0x69, 0x46, 0x00, 0xa0, 0xae, 0xbf, 0xf9, 0x07, 0x00, 0x00, 0x02, 0x04, 0x20 -.byte 0x67, 0x93, 0xd7, 0xff, 0xf4, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x82, 0x3c, 0x06, 0xc0, 0x0c, 0x30, 0xa0, 0x00, 0x0d, 0x21, 0x00, 0x00, 0x00, 0x82, 0x01, 0x28 -.byte 0x67, 0x93, 0xd7, 0xff, 0xf4, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00 -.byte 0x8e, 0xc0, 0x03, 0x69, 0x46, 0x00, 0xa0, 0xae, 0xbf, 0xf9, 0x07, 0x00, 0x00, 0x12, 0x00, 0x20 -.byte 0x67, 0x93, 0xd7, 0xff, 0xf4, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x8e, 0xfd, 0x7f, 0xe9, 0xcf, 0x37, 0xa0, 0x84, 0x3c, 0x21, 0x10, 0x00, 0x00, 0x02, 0x00, 0x20 -.byte 0x67, 0x93, 0xd7, 0xef, 0xf4, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -.byte 0x8e, 0xff, 0xff, 0xeb, 0xef, 0x77, 0xa0, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -.byte 0x80, 0x35, 0x7b, 0xab, 0xc9, 0x01, 0x20, 0x28, 0x38, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20 -.byte 0x67, 0x93, 0xd7, 0x7f, 0xf0, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x20, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x0c, 0x01, 0x04, 0x02, 0x02, 0x03, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -.byte 0x80, 0x00, 0x08, 0x40, 0x06, 0x00, 0xa0, 0x80, 0x0c, 0x21, 0xc4, 0x55, 0x1d, 0x02, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x80, 0x00, 0x08, 0x40, 0x06, 0x00, 0xa0, 0x80, 0x0c, 0x21, 0xc4, 0x55, 0x1d, 0x02, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x80, 0x35, 0xfb, 0xab, 0xc9, 0x01, 0x20, 0x28, 0x38, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x80, 0x35, 0xfb, 0xab, 0xc9, 0x01, 0x20, 0x28, 0x38, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x0d, 0x21, 0x08, 0x00, 0x00, 0x02, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x0d, 0x21, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x8c, 0x14, 0x7f, 0xe2, 0x00, 0x00, 0xa0, 0x84, 0x0f, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x8e, 0xff, 0xff, 0xeb, 0xef, 0x77, 0xa0, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x8e, 0x34, 0xfb, 0xab, 0xc9, 0x01, 0xa0, 0xad, 0xbf, 0x39, 0xfc, 0xff, 0xff, 0x03, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x04, 0x8c, 0x21, 0xc4, 0xff, 0x7f, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0xac, 0x1c, 0x19, 0x04, 0x56, 0x02, 0x02, 0x00, 0x20 -.byte 0x67, 0x93, 0xd7, 0xff, 0xf4, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00 -.byte 0x8e, 0xff, 0xff, 0xeb, 0xef, 0x77, 0xa0, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x8e, 0xff, 0xff, 0xeb, 0xef, 0x77, 0xa0, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x8c, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -.byte 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x8e, 0xc5, 0x7f, 0x88, 0x8e, 0x1b, 0xa0, 0xad, 0xbf, 0xe5, 0x2b, 0x00, 0x00, 0x02, 0x00, 0x20 -.byte 0xef, 0xd3, 0xd7, 0xff, 0xfe, 0x07, 0xf4, 0xff, 0xb9, 0xff, 0xf9, 0xee, 0x00, 0x01, 0x00, 0x00 -.byte 0x80, 0x35, 0xfb, 0xab, 0xc9, 0x01, 0x20, 0x28, 0x38, 0x00, 0x00, 0x00, 0x00, 0x62, 0x00, 0x28 -.byte 0x67, 0x93, 0xd7, 0x7f, 0xf0, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x39, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -.byte 0x8e, 0xff, 0xff, 0xeb, 0xef, 0x77, 0xa0, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 -.byte 0x8e, 0xfd, 0xff, 0xeb, 0xef, 0x3f, 0xa0, 0xfb, 0xbf, 0x3f, 0x1c, 0x00, 0x00, 0x02, 0x00, 0x20 -.byte 0xef, 0xd3, 0xd7, 0xff, 0xfe, 0x27, 0xfc, 0xff, 0xfb, 0xff, 0xf9, 0xee, 0x00, 0x01, 0x00, 0x00 -.byte 0x8e, 0xff, 0xff, 0xeb, 0xef, 0x7f, 0xa0, 0xfb, 0xbf, 0x3f, 0x1c, 0x00, 0x00, 0x02, 0x00, 0x20 -.byte 0x67, 0x93, 0xd7, 0xff, 0xf4, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 - -.global gItemParaFileName -gItemParaFileName: @ 8109764 -.string "itempara\0" -.align 2,0 - -.global gUnknown_8109770 -gUnknown_8109770: @ 8109770 -.string "%s %d\0" -.align 2,0 - -.global gUnknown_8109778 -gUnknown_8109778: @ 8109778 -.string "%s\0" -.align 2,0 - -.global gUnknown_810977C -gUnknown_810977C: @ 810977C -@ replacing .incbin "baserom.gba", 0x0010977c, 0x8 -.string "%d {POKE}\0" - -.global gUnknown_8109784 -gUnknown_8109784: @ 8109784 -@ replacing .incbin "baserom.gba", 0x00109784, 0x8 -.byte 0x87, 0x44 -.asciz "%s\0" -.align 2,0 - -.global gUnknown_810978C -gUnknown_810978C: @ 810978C -@ replacing .incbin "baserom.gba", 0x0010978c, 0x8 -.byte 0x87, 0x41 -.asciz "%s\0" -.align 2,0 - -.global gUnknown_8109794 -gUnknown_8109794: @ 8109794 -@ replacing .incbin "baserom.gba", 0x00109794, 0x10 -.string "%s{UNK_MACRO_3D}%c{COLOR GREEN_RAW}%s{RESET}\0" -.align 2, 0 - -.global gUnknown_81097A4 -gUnknown_81097A4: @ 81097A4 -@ replacing .incbin "baserom.gba", 0x001097a4, 0xc -.string "%s{COLOR GREEN_RAW}%s{RESET}\0" -.align 2, 0 - -.global gPowersOfTen -gPowersOfTen: @ 81097B0 -@ replacing .incbin "baserom.gba", 0x001097b0, 0x14 -.byte 0xa0, 0x86, 0x01, 0x00, 0x10, 0x27, 0x00, 0x00, 0xe8, 0x03, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00 - -.global gHighDigits -gHighDigits: @ 81097C4 -.byte 0x83 - -.global gUnknown_81097C5 -gUnknown_81097C5: @ 81097C5 -.byte 0x9f, 0x83, 0xa0, 0x83, 0xa1, 0x83, 0xa2, 0x83, 0xa3, 0x83, 0xa4, 0x83, 0xa5, 0x83, 0xa6, 0x83, 0xa7, 0x83, 0xa8, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x97, 0x10, 0x08 - -.global gGummiStatBoostLUT -gGummiStatBoostLUT: @ 81097E0 -.2byte 1 -.2byte 2 -.2byte 4 -.2byte 8 - -.global gUnknown_81097E8 -gUnknown_81097E8: @ 81097E8 -.byte 0x10, 0x00, 0x00, 0x00 -.byte 0x12, 0x00, 0x00, 0x00 -.byte 0x14, 0x00, 0x00, 0x00 -.byte 0x16, 0x00, 0x00, 0x00 - -.global gUnknown_81097F8 -gUnknown_81097F8: @ 81097F8 -.byte 0x11, 0x00, 0x00, 0x00 -.byte 0x13, 0x00, 0x00, 0x00 -.byte 0x15, 0x00, 0x00, 0x00 -.byte 0x17, 0x00, 0x00, 0x00 -@ START rescue_team_info.c -.string "pksdir0\0" - -.global gRescueRankMaxPoints -gRescueRankMaxPoints: @ 8109810 -.4byte 50 -.4byte 500 -.4byte 1500 -.4byte 3000 -.4byte 7500 -.4byte 15000 -.4byte 100000000 - -.global gTeamNamePlaceholder -gTeamNamePlaceholder: @ 810982C -.string "Pokémon\0" -@ END rescue_team_info.c -@ text_util -.string "pksdir0\0" - -.global gUnknown_810983C -gUnknown_810983C: @ 810983C -.4byte gUnknown_8109888 -.4byte gUnknown_8109884 -.4byte gUnknown_8109880 -.4byte gUnknown_810987C -.4byte gUnknown_8109878 -.4byte gUnknown_8109874 -.4byte gUnknown_8109870 -.4byte gUnknown_810986C -.4byte gUnknown_8109868 -.4byte gUnknown_8109864 - -.global gUnknown_8109864 -gUnknown_8109864: @ 8109864 -.byte 0x82, 0x58, 0x00, 0x00 - -.global gUnknown_8109868 -gUnknown_8109868: @ 8109868 -.byte 0x82, 0x57, 0x00, 0x00 - -.global gUnknown_810986C -gUnknown_810986C: @ 810986C -.byte 0x82, 0x56, 0x00, 0x00 - -.global gUnknown_8109870 -gUnknown_8109870: @ 8109870 -.byte 0x82, 0x55, 0x00, 0x00 - -.global gUnknown_8109874 -gUnknown_8109874: @ 8109874 -.byte 0x82, 0x54, 0x00, 0x00 - -.global gUnknown_8109878 -gUnknown_8109878: @ 8109878 -.byte 0x82, 0x53, 0x00, 0x00 - -.global gUnknown_810987C -gUnknown_810987C: @ 810987C -.byte 0x82, 0x52, 0x00, 0x00 - -.global gUnknown_8109880 -gUnknown_8109880: @ 8109880 -.byte 0x82, 0x51, 0x00, 0x00 - -.global gUnknown_8109884 -gUnknown_8109884: @ 8109884 -.byte 0x82, 0x50, 0x00, 0x00 - -.global gUnknown_8109888 -gUnknown_8109888: @ 8109888 -.byte 0x82, 0x4f, 0x00, 0x00 -@ ??? -.string "pksdir0\0" -@ ??? -.string "pksdir0\0" -@ START friend_area.c -.string "pksdir0\0" - -.global sUnknown_81098A4 -sUnknown_81098A4: @ 81098A4 -.string "{color GREEN_RAW}%s{reset}\0" -.align 2,0 - -.global sUnknown_81098AC -sUnknown_81098AC: @ 81098AC -.string "%s{UNK_MACRO_3D}%c{COLOR GREEN_RAW}%s{RESET}\0" -.align 2,0 -@ END friend_area.c -@ moves.c -.string "pksdir0" -.align 2,0 - -.global gUnknown_81098C4 -gUnknown_81098C4: @ 81098C4 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - -.global gUnknown_81098D0 -gUnknown_81098D0: @ 81098D0 -.string "wazapara\0" -.align 2,0 - -.global gUnknown_81098DC -gUnknown_81098DC: @ 81098DC -.string "%+d\0" - -.global gUnknown_81098E0 -gUnknown_81098E0: @ 81098E0 -.string "{color}%c%s%s{reset}\0" -.align 2,0 - -.global gUnknown_81098EC -gUnknown_81098EC: @ 81098EC -.string "{color}%c#:%s%s%s#;%c%2d/%2d{reset}\0" -.align 2,0 - -.global gUnknown_8109908 -gUnknown_8109908: @ 8109908 -.byte 0x87, 0x41, 0x00, 0x00 @ apparently shows A in memory viewer - -.global gUnknown_810990C -gUnknown_810990C: @ 810990C -.byte 0x87, 0x40, 0x00, 0x00 @ apparently shows @ in memory viewer - -.global gUnknown_8109910 -gUnknown_8109910: @ 8109910 -.string "{color}%c%s%s%s{UNK_MACRO_3D}%c%2d/%2d{reset}\0" -.align 2,0 - -.global gUnknown_8109928 -gUnknown_8109928: @ 8109928 -.byte 0x87, 0x42, 0x00 @ apparently shows B in memory viewer - -.global gUnknown_810992B -gUnknown_810992B: @ 810992B -.byte 0x00 - -.global gUnknown_810992C -gUnknown_810992C: @ 810992C -.string "%s\0" -.align 2,0 - -.global gUnknown_8109930 -gUnknown_8109930: @ 8109930 -.string "{POKEMON_0}\0" -.align 2,0 -@ ??? -.string "pksdir0\0" -.align 2,0 -@ ??? -.string "pksdir0\0" -.align 2,0 -@ ??? -.string "pksdir0\0" -.align 2,0 +.align 2,0 \ No newline at end of file diff --git a/data/data_8107224.s b/data/data_8107224.s new file mode 100644 index 00000000..4574e5be --- /dev/null +++ b/data/data_8107224.s @@ -0,0 +1,1523 @@ +.section .rodata + +@ ??? +.string "pksdir0\0" +@ ??? +.string "pksdir0\0" +@ ??? +.string "pksdir0\0" +@ ??? +.string "pksdir0\0" +@ ??? +.string "pksdir0\0" +@ START code_808417C #1 +.string "pksdir0\0" + +.string "pksdir0\0" + +.global gUnknown_8107224 +gUnknown_8107224: @ 8107224 +.string "??????\0" +.align 2, 0 +@ END code_808417C #1 +@ code_8085B0C +.string "pksdir0\0" + +.global gUnknown_8107234 +gUnknown_8107234: @ 8107234 +.byte 0x01, 0x01, 0x00, 0x02, 0x01, 0x03, 0x00, 0x00, 0x02, 0x04, 0x02, 0x05, 0x03, 0x06, 0x00, 0x00 +.byte 0x03, 0x07, 0x04, 0x08, 0x05, 0x09, 0x00, 0x00, 0x04, 0x0a, 0x06, 0x0b, 0x07, 0x0c, 0x00, 0x00 +.byte 0x05, 0x0d, 0x08, 0x0e, 0x09, 0x0f, 0x00, 0x00, 0x06, 0x10, 0x0a, 0x11, 0x0a, 0x11, 0x00, 0x00 +.byte 0x07, 0x12, 0x0b, 0x13, 0x0c, 0x14, 0x00, 0x00, 0x14, 0x15, 0x0d, 0x16, 0x0d, 0x16, 0x00, 0x00 +.byte 0x08, 0x17, 0x0e, 0x18, 0x0f, 0x19, 0x00, 0x00, 0x0b, 0x1a, 0x10, 0x1b, 0x11, 0x1c, 0x00, 0x00 +.byte 0x09, 0x1d, 0x12, 0x1e, 0x13, 0x1f, 0x00, 0x00, 0x0c, 0x20, 0x14, 0x21, 0x15, 0x22, 0x00, 0x00 +.byte 0x0d, 0x23, 0x16, 0x24, 0x17, 0x25, 0x00, 0x00, 0x0e, 0x26, 0x18, 0x27, 0x19, 0x28, 0x00, 0x00 +.byte 0x0f, 0x29, 0x40, 0x29, 0x1a, 0x2a, 0x00, 0x00, 0x10, 0x2b, 0x1b, 0x2c, 0x1c, 0x2d, 0x00, 0x00 +.byte 0x11, 0x2e, 0x40, 0x2e, 0x40, 0x2e, 0x00, 0x00, 0x12, 0x2f, 0x40, 0x2f, 0x40, 0x2f, 0x00, 0x00 +.byte 0x13, 0x30, 0x40, 0x30, 0x40, 0x30, 0x00, 0x00, 0x0a, 0x31, 0x40, 0x31, 0x1e, 0x32, 0x00, 0x00 +.byte 0x15, 0x33, 0x40, 0x33, 0x40, 0x33, 0x00, 0x00, 0x16, 0x34, 0x40, 0x34, 0x40, 0x34, 0x00, 0x00 +.byte 0x17, 0x35, 0x40, 0x35, 0x40, 0x35, 0x00, 0x00, 0x19, 0x36, 0x40, 0x36, 0x40, 0x36, 0x00, 0x00 +.byte 0x1b, 0x37, 0x40, 0x37, 0x40, 0x37, 0x00, 0x00, 0x1a, 0x38, 0x20, 0x39, 0x20, 0x39, 0x00, 0x00 +.byte 0x18, 0x3a, 0x21, 0x3b, 0x21, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + +.global gUnknown_8107314 +gUnknown_8107314: @ 8107314 +.byte 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff +.byte 0x02, 0x00, 0x00, 0x00, 0xfd, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff +.byte 0x04, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x04, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff +.byte 0x04, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x04, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff +.byte 0x04, 0x00, 0x00, 0x00 + +.global gUnknown_8107358 +gUnknown_8107358: @ 8107358 +.byte 0x04, 0x03, 0x02, 0x03, 0x04, 0x05, 0x06, 0x05, 0x04, 0x03, 0x02, 0x03, 0x04, 0x05, 0x06, 0x05 +.byte 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00 + +.global gUnknown_8107374 +gUnknown_8107374: @ 8107374 +.byte 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + +.global gUnknown_8107380 +gUnknown_8107380: @ 8107380 +.byte 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +@ ??? +.string "pksdir0\0" +@ code_8086A3C #1 +.string "pksdir0\0" + +.global gUnknown_810739C +gUnknown_810739C: @ 810739C +.byte 0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x02, 0x00, 0x18, 0x00, 0x00, 0x00 +.byte 0x04, 0x00, 0x02, 0x00, 0x18, 0x00, 0x00, 0x00, 0x05, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00 +.byte 0x06, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +.byte 0x00, 0x00, 0x0b, 0x00, 0x08, 0x00, 0x00, 0x00 + +.global gUnknown_81073D4 +gUnknown_81073D4: @ 81073D4 +.byte 0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x02, 0x00, 0x18, 0x00, 0x00, 0x00 +.byte 0x04, 0x00, 0x02, 0x00, 0x18, 0x00, 0x00, 0x00, 0x05, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00 +.byte 0x06, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +.byte 0x00, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x00, 0x00 + +.global gUnknown_810740C +gUnknown_810740C: @ 810740C +.byte 0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x05, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00 +.byte 0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x02, 0x00, 0x18, 0x00, 0x00, 0x00 +.byte 0x03, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +.byte 0x00, 0x00, 0x0a, 0x00, 0x08, 0x00, 0x00, 0x00 +@ code_8086A3C #2 +.string "pksdir0\0" + +.global gUnknown_810744C +gUnknown_810744C: @ 810744C +.byte 0x01, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +.byte 0x00, 0x00, 0x09, 0x00, 0x09, 0x00, 0x00, 0x00 + +.global gUnknown_8107464 +gUnknown_8107464: @ 8107464 +.byte 0x05, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00 +.byte 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x07, 0x00, 0x00, 0x00 +.string "pksdir0\0" +.string "pksdir0\0" +.string "pksdir0\0" +.string "pksdir0\0" +.string "pksdir0\0" +.string "pksdir0\0" +.string "pksdir0\0" +.string "pksdir0\0" +.string "pksdir0\0" +.string "pksdir0\0" +.string "pksdir0\0" +.string "pksdir0\0" +.string "pksdir0\0" +.string "pksdir0\0" +@ ??? +.string "pksdir0\0" + +.global gUnknown_81074FC +gUnknown_81074FC: @ 81074FC +.byte 0x4e, 0x4f, 0x50, 0x51, 0x4a, 0x49, 0x3e, 0x38 + +@ ??? +.string "pksdir0\0" +@ ??? +.string "pksdir0\0" +@ ??? +.string "pksdir0\0" +@ ??? +.string "pksdir0\0" +@ ??? +.string "pksdir0\0" +@ ??? +.string "pksdir0\0" +@ ??? +.string "pksdir0\0" +@ ??? +.string "pksdir0\0" + +.global gUnknown_8107544 +gUnknown_8107544: @ 8107544 +.byte 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00 +.byte 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00 +.byte 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00 +.byte 0x0d, 0x00, 0x05, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00 +.byte 0x17, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00 +.byte 0x12, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 +.byte 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00 +.byte 0x07, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00 +.byte 0x0d, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00 +.byte 0x17, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00 +.byte 0x12, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 +@ pokemon +.string "pksdir0\0" + +.global gUnknown_81075F4 +gUnknown_81075F4: @ 81075F4 +.string "monspara\0" +.align 2,0 + +.global gUnknown_8107600 +gUnknown_8107600: @ 8107600 +.string "{color YELLOW_RAW}%s{reset}" +.align 2,0 + +.global gUnknown_8107608 +gUnknown_8107608: @ 8107608 +.string "{color CYAN_RAW}%s{reset}" +.align 2,0 + +.global gUnownLetters +gUnownLetters: @ 8107610 +.string "ABCDEFGHIJKLMNOPQRSTUVWXYZ!?\0" +.align 2,0 + +.global gUnknown_8107630 +gUnknown_8107630: @ 8107630 +.string "%s%c\0" +.align 2,0 + +.global gUnknown_8107638 +gUnknown_8107638: @ 8107638 +.string "%s\0" +.align 2,0 + +.global gUnknown_810763C +gUnknown_810763C: @ 810763C +.string "{color}%c%s{reset}\0" + +.global gUnknown_8107645 +gUnknown_8107645: @ 8107645 +.byte 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + +.global gUnknown_8107654 +gUnknown_8107654: @ 8107654 +.byte 0x9d, 0x01, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00 +.byte 0x33, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + +.global gUnknown_8107684 +gUnknown_8107684: @ 8107684 +.string "kao%03d\0" +.align 2,0 + +.global gUnknown_810768C +gUnknown_810768C: @ 810768C +.string "lvmp%03d\0" +.align 2,0 + +.global gShadowSpriteSizeFlags_8107698 +gShadowSpriteSizeFlags_8107698: @ 8107698 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 +.byte 0x03, 0x00, 0x00, 0x00 + +.global gUnknown_81076BC +gUnknown_81076BC: @ 81076BC +.string "etcfont\0" +.align 2,0 + +.global gUnknown_81076C4 +gUnknown_81076C4: @ 81076C4 +.4byte -4 +.4byte -8 +.4byte -16 +.4byte -4 +.4byte -8 +.4byte -16 +@ pokemon_3 #1 +.string "pksdir0\0" + +.global gIQSkillGroups +gIQSkillGroups: @ 81076E4 +.4byte 9999 +.4byte 4 +.4byte 1 +.4byte 2 +.4byte 4 +.4byte 4 +.4byte 6 +.4byte 7 +.4byte 8 +.4byte 9 +.4byte 9 +.4byte 9 +.4byte 10 +.4byte 10 +.4byte 11 +.4byte 11 +.4byte 14 +.4byte 14 +.4byte 14 +.4byte 16 +.4byte 16 +.4byte 9 +.4byte 17 +.4byte 6 +@ pokemon_3 #2 +.string "pksdir0\0" +@ pokemon_3 #3 +.string "pksdir0\0" + +.global gUnknown_8107754 +gUnknown_8107754: @ 8107754 +.string "Stats\0" +.align 2,0 + +.global gUnknown_810775C +gUnknown_810775C: @ 810775C +.string "Features\0" +.align 2,0 + +.global gUnknown_8107768 +gUnknown_8107768: @ 8107768 +.string "Type:\0" +.align 2,0 + +.global gUnknown_8107770 +gUnknown_8107770: @ 8107770 +.string "Special Abilities:\0" +.align 2,0 + +.global gUnknown_8107784 +gUnknown_8107784: @ 8107784 +.string "{MOVE_ITEM_1}\0" +.align 2,0 + +.global gUnknown_8107788 +gUnknown_8107788: @ 8107788 +.byte 0x87, 0x42, 0x00, 0x00 + +.global gUnknown_810778C +gUnknown_810778C: @ 810778C +.byte 0x87, 0x40, 0x00, 0x00 + +.global gUnknown_8107790 +gUnknown_8107790: @ 8107790 +.string "{MOVE_ITEM_0}{MOVE_ITEM_1}\0" +.align 2,0 + +.global gUnknown_8107798 +gUnknown_8107798: @ 8107798 +.string "Info\0" +.align 2,0 +@ dungeon +.string "pksdir0\0" +.align 2,0 + +.global gDungeonFloorCount +gDungeonFloorCount: @ 81077A8 +@ replacing .incbin "baserom.gba", 0x1077A8, 0x40 +.byte 0x04, 0x06, 0x0a, 0x0e, 0x0a, 0x0b, 0x04, 0x0d, 0x0f, 0x0d, 0x04, 0x0a, 0x06, 0x10, 0x06, 0x18 +.byte 0x04, 0x1a, 0x0a, 0x29, 0x64, 0x15, 0x05, 0x64, 0x15, 0x0c, 0x64, 0x64, 0x1a, 0x1a, 0x0d, 0x15 +.byte 0x33, 0x1f, 0x1f, 0x1f, 0x15, 0x1f, 0x10, 0x0d, 0x14, 0x1f, 0x0b, 0x10, 0x15, 0x15, 0x1f, 0x05 +.byte 0x05, 0x0b, 0x03, 0x33, 0x46, 0x10, 0x1f, 0x14, 0x14, 0x0c, 0x64, 0x4c, 0x29, 0x64, 0x64, 0x02 + +.global gUnknown_81077E8 +gUnknown_81077E8: @ 81077E8 +@ replacing .incbin "baserom.gba", 0x1077E8, 0x40 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + +.global gUnknown_8107828 +gUnknown_8107828: @ 8107828 +@ replacing .incbin "baserom.gba", 0x107828, 0x85C +.byte 0x02, 0x09, 0x00, 0x00, 0x03, 0x0d, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x0a, 0x03, 0x00, 0x00 +.byte 0x0c, 0x05, 0x00, 0x00, 0x0e, 0x05, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0x10, 0x03, 0x00, 0x00 +.byte 0x12, 0x09, 0x00, 0x00, 0x13, 0x28, 0x00, 0x00, 0x14, 0x63, 0x00, 0x00, 0x15, 0x14, 0x00, 0x00 +.byte 0x17, 0x3b, 0x00, 0x00, 0x17, 0x63, 0x00, 0x00, 0x1a, 0x14, 0x00, 0x00, 0x1a, 0x32, 0x00, 0x00 +.byte 0x1a, 0x63, 0x00, 0x00, 0x1b, 0x0f, 0x00, 0x00, 0x1b, 0x19, 0x00, 0x00, 0x1b, 0x23, 0x00, 0x00 +.byte 0x1b, 0x2d, 0x00, 0x00, 0x1b, 0x3c, 0x00, 0x00, 0x1b, 0x46, 0x00, 0x00, 0x1b, 0x50, 0x00, 0x00 +.byte 0x1d, 0x19, 0x00, 0x00, 0x21, 0x14, 0x00, 0x00, 0x21, 0x1e, 0x00, 0x00, 0x22, 0x1e, 0x00, 0x00 +.byte 0x23, 0x14, 0x00, 0x00, 0x23, 0x1e, 0x00, 0x00, 0x24, 0x0a, 0x00, 0x00, 0x24, 0x0f, 0x00, 0x00 +.byte 0x24, 0x14, 0x00, 0x00, 0x25, 0x1e, 0x00, 0x00, 0x29, 0x0f, 0x00, 0x00, 0x29, 0x19, 0x00, 0x00 +.byte 0x2a, 0x0a, 0x00, 0x00, 0x31, 0x01, 0x00, 0x00, 0x31, 0x02, 0x00, 0x00, 0x31, 0x03, 0x00, 0x00 +.byte 0x31, 0x04, 0x00, 0x00, 0x31, 0x05, 0x00, 0x00, 0x31, 0x06, 0x00, 0x00, 0x31, 0x07, 0x00, 0x00 +.byte 0x31, 0x08, 0x00, 0x00, 0x31, 0x09, 0x00, 0x00, 0x31, 0x0a, 0x00, 0x00, 0x34, 0x03, 0x00, 0x00 +.byte 0x34, 0x06, 0x00, 0x00, 0x34, 0x09, 0x00, 0x00, 0x34, 0x0c, 0x00, 0x00, 0x34, 0x0f, 0x00, 0x00 +.byte 0x34, 0x12, 0x00, 0x00, 0x34, 0x15, 0x00, 0x00, 0x34, 0x18, 0x00, 0x00, 0x34, 0x1b, 0x00, 0x00 +.byte 0x34, 0x1e, 0x00, 0x00, 0x34, 0x21, 0x00, 0x00, 0x34, 0x24, 0x00, 0x00, 0x34, 0x27, 0x00, 0x00 +.byte 0x34, 0x2a, 0x00, 0x00, 0x34, 0x2d, 0x00, 0x00, 0x34, 0x30, 0x00, 0x00, 0x34, 0x33, 0x00, 0x00 +.byte 0x34, 0x36, 0x00, 0x00, 0x34, 0x39, 0x00, 0x00, 0x34, 0x3c, 0x00, 0x00, 0x34, 0x3f, 0x00, 0x00 +.byte 0x34, 0x42, 0x00, 0x00, 0x34, 0x45, 0x00, 0x00, 0x35, 0x0f, 0x00, 0x00, 0x3b, 0x32, 0x00, 0x00 +.byte 0x3b, 0x48, 0x00, 0x00, 0x3c, 0x1e, 0x00, 0x00, 0x3c, 0x28, 0x00, 0x00, 0x3e, 0x63, 0x00, 0x00 +.byte 0x3f, 0xff, 0x00, 0x00 + +.global gUnknown_810795C +gUnknown_810795C: @ 810795C +.byte 0x00, 0x01, 0x01, 0x01 + +.global gUnknown_8107960 +gUnknown_8107960: @ 8107960 +.byte 0x00, 0x01, 0x01, 0x01, 0x01, 0x01 + +.global gUnknown_8107966 +gUnknown_8107966: @ 8107966 +.byte 0x00, 0x01 +.byte 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 + +.global gUnknown_8107970 +gUnknown_8107970: @ 8107970 +.byte 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02 +.byte 0x02, 0x02, 0x02, 0x02, 0x02, 0x02 + +.global gUnknown_810797E +gUnknown_810797E: @ 810797E +.byte 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03 + +.global gUnknown_8107988 +gUnknown_8107988: @ 8107988 +.byte 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03 + +.global gUnknown_8107993 +gUnknown_8107993: @ 8107993 +.byte 0x00, 0x03, 0x03, 0x03 + +.global gUnknown_8107997 +gUnknown_8107997: @ 8107997 +.byte 0x00 +.byte 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 + +.global gUnknown_81079A4 +gUnknown_81079A4: @ 81079A4 +.byte 0x00, 0x04, 0x04, 0x04 +.byte 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 + +.global gUnknown_81079B3 +gUnknown_81079B3: @ 81079B3 +.byte 0x00, 0x04, 0x04, 0x04, 0x04 +.byte 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 + +.global gUnknown_81079C0 +gUnknown_81079C0: @ 81079C0 +.byte 0x00, 0x04, 0x04, 0x04 + +.global gUnknown_81079C4 +gUnknown_81079C4: @ 81079C4 +.byte 0x00, 0x04, 0x04, 0x04 +.byte 0x04, 0x04, 0x05, 0x05, 0x05, 0x05 + +.global gUnknown_81079CE +gUnknown_81079CE: @ 81079CE +.byte 0x00, 0x05, 0x05, 0x05, 0x05, 0x05 + +.global gUnknown_81079D4 +gUnknown_81079D4: @ 81079D4 +.byte 0x00, 0x05, 0x05, 0x05 +.byte 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05 + +.global gUnknown_81079E4 +gUnknown_81079E4: @ 81079E4 +.byte 0x00, 0x05, 0x05, 0x05 +.byte 0x05, 0x05 + +.global gUnknown_81079EA +gUnknown_81079EA: @ 81079EA +.byte 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06 +.byte 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06 + +.global gUnknown_8107A02 +gUnknown_8107A02: @ 8107A02 +.byte 0x00, 0x06, 0x06, 0x06 + +.global gUnknown_8107A06 +gUnknown_8107A06: @ 8107A06 +.byte 0x00, 0x06 +.byte 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06 +.byte 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06 + +.global gUnknown_8107A20 +gUnknown_8107A20: @ 8107A20 +.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 +.byte 0x07, 0x07 + +.global gUnknown_8107A2A +gUnknown_8107A2A: @ 8107A2A +.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 +.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 +.byte 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09 + +.global gUnknown_8107A53 +gUnknown_8107A53: @ 8107A53 +.byte 0x00, 0x07, 0x07, 0x07, 0x07 +.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08 +.byte 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0a +.byte 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a +.byte 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b +.byte 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b +.byte 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b + +.global gUnknown_8107AB7 +gUnknown_8107AB7: @ 8107AB7 +.byte 0x00 +.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 +.byte 0x08, 0x08, 0x08, 0x08 + +.global gUnknown_8107ACC +gUnknown_8107ACC: @ 8107ACC +.byte 0x00, 0x05, 0x05, 0x05, 0x05 + +.global gUnknown_8107AD1 +gUnknown_8107AD1: @ 8107AD1 +.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 +.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08 +.byte 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0a, 0x0a, 0x0a +.byte 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a +.byte 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b +.byte 0x0b, 0x0b, 0x0b, 0x0b, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c +.byte 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c + +.global gUnknown_8107B35 +gUnknown_8107B35: @ 8107B35 +.byte 0x00, 0x07, 0x07 +.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 +.byte 0x08, 0x08 + +.global gUnknown_8107B4A +gUnknown_8107B4A: @ 8107B4A +.byte 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 + +.global gUnknown_8107B56 +gUnknown_8107B56: @ 8107B56 +.byte 0x00, 0x07 +.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 +.byte 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x09, 0x09, 0x09, 0x09 +.byte 0x09, 0x09, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a +.byte 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b +.byte 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c +.byte 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c +.byte 0x0c, 0x0c + +.global gUnknown_8107BBA +gUnknown_8107BBA: @ 8107BBA +.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 +.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 +.byte 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a +.byte 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0b, 0x0b +.byte 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0c, 0x0c, 0x0c +.byte 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c +.byte 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c + +.global gUnknown_8107C1E +gUnknown_8107C1E: @ 8107C1E +.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 +.byte 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09 + +.global gUnknown_8107C38 +gUnknown_8107C38: @ 8107C38 +.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 +.byte 0x08, 0x08, 0x08, 0x08, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09 + +.global gUnknown_8107C52 +gUnknown_8107C52: @ 8107C52 +.byte 0x00, 0x01, 0x01, 0x01, 0x01, 0x01 +.byte 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 + +.global gUnknown_8107C5F +gUnknown_8107C5F: @ 8107C5F +.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 +.byte 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 + +.global gUnknown_8107C74 +gUnknown_8107C74: @ 8107C74 +.byte 0x00, 0x07, 0x07, 0x07 +.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 +.byte 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09 +.byte 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09 + +.global gUnknown_8107CA7 +gUnknown_8107CA7: @ 8107CA7 +.byte 0x00 +.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 +.byte 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x09 + +.global gUnknown_8107CC6 +gUnknown_8107CC6: @ 8107CC6 +.byte 0x00, 0x07 +.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 +.byte 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x09 + +.global gUnknown_8107CE5 +gUnknown_8107CE5: @ 8107CE5 +.byte 0x00, 0x07, 0x07 +.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 +.byte 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x09 + +.global gUnknown_8107D04 +gUnknown_8107D04: @ 8107D04 +.byte 0x00, 0x07, 0x07, 0x07 +.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 +.byte 0x08 + +.global gUnknown_8107D19 +gUnknown_8107D19: @ 8107D19 +.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 +.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x09 + +.global gUnknown_8107D38 +gUnknown_8107D38: @ 8107D38 +.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 + +.global gUnknown_8107D48 +gUnknown_8107D48: @ 8107D48 +.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08 + +.global gUnknown_8107D55 +gUnknown_8107D55: @ 8107D55 +.byte 0x00, 0x07, 0x07 +.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 +.byte 0x08 + +.global gUnknown_8107D69 +gUnknown_8107D69: @ 8107D69 +.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08 +.byte 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 + +.global gUnknown_8107D88 +gUnknown_8107D88: @ 8107D88 +.byte 0x00, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05 + +.global gUnknown_8107D93 +gUnknown_8107D93: @ 8107D93 +.byte 0x00, 0x07, 0x07, 0x07, 0x07 +.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 + +.global gUnknown_8107DA3 +gUnknown_8107DA3: @ 8107DA3 +.byte 0x00, 0x07, 0x07, 0x07, 0x07 +.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 + +.global gUnknown_8107DB8 +gUnknown_8107DB8: @ 8107DB8 +.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 +.byte 0x07, 0x07, 0x07, 0x07, 0x08 + +.global gUnknown_8107DCD +gUnknown_8107DCD: @ 8107DCD +.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 +.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 +.byte 0x08, 0x08, 0x08, 0x09 + +.global gUnknown_8107DEC +gUnknown_8107DEC: @ 8107DEC +.byte 0x00, 0x01, 0x01, 0x01, 0x01 + +.global gUnknown_8107DF1 +gUnknown_8107DF1: @ 8107DF1 +.byte 0x00, 0x01, 0x01, 0x01, 0x01 + +.global gUnknown_8107DF6 +gUnknown_8107DF6: @ 8107DF6 +.byte 0x00, 0x01 +.byte 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 + +.global gUnknown_8107E01 +gUnknown_8107E01: @ 8107E01 +.byte 0x00, 0x01, 0x01 + +.global gUnknown_8107E04 +gUnknown_8107E04: @ 8107E04 +.byte 0x00, 0x0f, 0x0f, 0x0f +.byte 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f +.byte 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f +.byte 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f + +.global gUnknown_8107E37 +gUnknown_8107E37: @ 8107E37 +.byte 0x00 +.byte 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 +.byte 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 +.byte 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 +.byte 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 +.byte 0x01, 0x01, 0x01, 0x01, 0x01 + +.global gUnknown_8107E7D +gUnknown_8107E7D: @ 8107E7D +.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 +.byte 0x07, 0x07, 0x07, 0x07, 0x07 + +.global gUnknown_8107E8D +gUnknown_8107E8D: @ 8107E8D +.byte 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 +.byte 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 +.byte 0x01, 0x01, 0x01, 0x01 + +.global gUnknown_8107EAC +gUnknown_8107EAC: @ 8107EAC +.byte 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 +.byte 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 + +.global gUnknown_8107EC0 +gUnknown_8107EC0: @ 8107EC0 +.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 +.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 + +.global gUnknown_8107ED4 +gUnknown_8107ED4: @ 8107ED4 +.byte 0x00, 0x07, 0x07, 0x07 +.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 + +.global gUnknown_8107EE0 +gUnknown_8107EE0: @ 8107EE0 +.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 +.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08 +.byte 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0a, 0x0a, 0x0a, 0x0a +.byte 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a +.byte 0x0a, 0x0a, 0x0a, 0x0a, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b +.byte 0x0b, 0x0b, 0x0b, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c +.byte 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c + +.global gUnknown_8107F44 +gUnknown_8107F44: @ 8107F44 +.byte 0x00, 0x07, 0x07, 0x07 +.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 +.byte 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09 +.byte 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a +.byte 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b +.byte 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0c + +.global gUnknown_8107F90 +gUnknown_8107F90: @ 8107F90 +.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 +.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08 +.byte 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0a, 0x0a, 0x0a, 0x0a +.byte 0x0a + +.global gUnknown_8107FB9 +gUnknown_8107FB9: @ 8107FB9 +.byte 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 +.byte 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x09 +.byte 0x09, 0x09, 0x09, 0x09, 0x09, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a +.byte 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0b, 0x0b, 0x0b +.byte 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0c, 0x0c, 0x0c, 0x0c +.byte 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c +.byte 0x0c, 0x0c, 0x0c, 0x0c, 0x0c + +.global gUnknown_810801D +gUnknown_810801D: @ 810801D +.byte 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 +.byte 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0a, 0x0a +.byte 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b +.byte 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b +.byte 0x0b, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c +.byte 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0e, 0x0e +.byte 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e + +.global gUnknown_8108081 +gUnknown_8108081: @ 8108081 +.byte 0x00, 0x07, 0x00 + +.global gUnknown_8108084 +gUnknown_8108084: @ 8108084 +@ replacing .incbin "baserom.gba", 0x108084, 0xDD4 +.4byte gUnknown_810795C +.4byte gUnknown_8107960 +.4byte gUnknown_8107966 +.4byte gUnknown_8107970 +.4byte gUnknown_810797E +.4byte gUnknown_8107988 +.4byte gUnknown_8107993 +.4byte gUnknown_8107997 +.4byte gUnknown_81079A4 +.4byte gUnknown_81079B3 +.4byte gUnknown_81079C0 +.4byte gUnknown_81079C4 +.4byte gUnknown_81079CE +.4byte gUnknown_81079D4 +.4byte gUnknown_81079E4 +.4byte gUnknown_81079EA +.4byte gUnknown_8107A02 +.4byte gUnknown_8107A06 +.4byte gUnknown_8107A20 +.4byte gUnknown_8107A2A +.4byte gUnknown_8107A53 +.4byte gUnknown_8107AB7 +.4byte gUnknown_8107ACC +.4byte gUnknown_8107AD1 +.4byte gUnknown_8107B35 +.4byte gUnknown_8107B4A +.4byte gUnknown_8107B56 +.4byte gUnknown_8107BBA +.4byte gUnknown_8107C1E +.4byte gUnknown_8107C38 +.4byte gUnknown_8107C52 +.4byte gUnknown_8107C5F +.4byte gUnknown_8107C74 +.4byte gUnknown_8107CA7 +.4byte gUnknown_8107CC6 +.4byte gUnknown_8107CE5 +.4byte gUnknown_8107D04 +.4byte gUnknown_8107D19 +.4byte gUnknown_8107D38 +.4byte gUnknown_8107D48 +.4byte gUnknown_8107D55 +.4byte gUnknown_8107D69 +.4byte gUnknown_8107D88 +.4byte gUnknown_8107D93 +.4byte gUnknown_8107DA3 +.4byte gUnknown_8107DB8 +.4byte gUnknown_8107DCD +.4byte gUnknown_8107DEC +.4byte gUnknown_8107DF1 +.4byte gUnknown_8107DF6 +.4byte gUnknown_8107E01 +.4byte gUnknown_8107E04 +.4byte gUnknown_8107E37 +.4byte gUnknown_8107E7D +.4byte gUnknown_8107E8D +.4byte gUnknown_8107EAC +.4byte gUnknown_8107EC0 +.4byte gUnknown_8107ED4 +.4byte gUnknown_8107EE0 +.4byte gUnknown_8107F44 +.4byte gUnknown_8107F90 +.4byte gUnknown_8107FB9 +.4byte gUnknown_810801D +.4byte gUnknown_8108081 + +.global gUnknown_8108184 +gUnknown_8108184: @ 8108184 +.byte 0x31, 0x75, 0xa0, 0x0f, 0x10, 0x27, 0x40, 0x75, 0x10, 0x27, 0x62, 0x75, 0xa0, 0x0f, 0x38, 0x75 +.byte 0x70, 0x17, 0x39, 0x75, 0x10, 0x27, 0xd2, 0x75 + +.global gUnknown_810819C +gUnknown_810819C: @ 810819C +.byte 0x31, 0x75, 0x98, 0x04, 0x62, 0x12, 0x2b, 0x20 +.byte 0x10, 0x27, 0x3e, 0x75, 0x10, 0x27, 0x3b, 0x75, 0x05, 0x0d, 0x0b, 0x1a, 0x3c, 0x75, 0x10, 0x27 +.byte 0x43, 0x75, 0xd0, 0x07, 0x34, 0x75, 0xa0, 0x0f, 0x38, 0x75, 0x70, 0x17, 0x39, 0x75, 0x10, 0x27 +.byte 0x38, 0x75, 0x4c, 0x02, 0x98, 0x04, 0xe5, 0x06, 0x31, 0x09, 0x7d, 0x0b, 0xc9, 0x0d, 0x16, 0x10 +.byte 0x62, 0x12, 0xae, 0x14, 0xfa, 0x16, 0x47, 0x19, 0x93, 0x1b, 0xdf, 0x1d, 0x2b, 0x20, 0x78, 0x22 +.byte 0xc4, 0x24, 0x10, 0x27, 0xb9, 0x75 + +.global gUnknown_81081EA +gUnknown_81081EA: @ 81081EA +.byte 0x31, 0x75, 0x20, 0x03, 0x80, 0x0c, 0x40, 0x1f, 0xf0, 0x23 +.byte 0x10, 0x27, 0x3d, 0x75, 0x10, 0x27, 0x3a, 0x75, 0xc4, 0x09, 0x88, 0x13, 0x4c, 0x1d, 0x3c, 0x75 +.byte 0x10, 0x27, 0x43, 0x75, 0xc4, 0x09, 0x34, 0x75, 0x88, 0x13, 0x42, 0x75, 0x10, 0x27, 0x38, 0x75 +.byte 0x4c, 0x02, 0x98, 0x04, 0xe5, 0x06, 0x31, 0x09, 0x7d, 0x0b, 0xc9, 0x0d, 0x16, 0x10, 0x62, 0x12 +.byte 0xae, 0x14, 0xfa, 0x16, 0x47, 0x19, 0x93, 0x1b, 0xdf, 0x1d, 0x2b, 0x20, 0x78, 0x22, 0xc4, 0x24 +.byte 0x10, 0x27, 0x49, 0x75, 0x65, 0x01, 0x2f, 0x04, 0x33, 0x75, 0x95, 0x05, 0x5f, 0x08, 0x31, 0x75 +.byte 0x29, 0x0b, 0x8e, 0x0c, 0x32, 0x75, 0xf3, 0x0d, 0x34, 0x75, 0x59, 0x0f, 0x32, 0x75, 0xbe, 0x10 +.byte 0x32, 0x75, 0x23, 0x12, 0x88, 0x13, 0x32, 0x75, 0xed, 0x14, 0x31, 0x75, 0x52, 0x16, 0xb7, 0x17 +.byte 0x36, 0x75, 0x82, 0x1a, 0x4c, 0x1d, 0x16, 0x20, 0x7b, 0x21, 0x46, 0x24, 0x10, 0x27, 0x75, 0x75 + +.global gUnknown_8108274 +gUnknown_8108274: @ 8108274 +.byte 0x31, 0x75, 0x01, 0x03, 0x05, 0x0c, 0x0c, 0x1e, 0x8e, 0x22, 0x10, 0x27, 0x3d, 0x75, 0x10, 0x27 +.byte 0x3a, 0x75, 0xd0, 0x07, 0xa0, 0x0f, 0x70, 0x17, 0x3c, 0x75, 0x40, 0x1f, 0x3b, 0x75, 0x10, 0x27 +.byte 0x37, 0x75, 0x05, 0x0d, 0x34, 0x75, 0x0b, 0x1a, 0x42, 0x75, 0x10, 0x27, 0x38, 0x75, 0x4c, 0x02 +.byte 0x98, 0x04, 0xe5, 0x06, 0x31, 0x09, 0x7d, 0x0b, 0xc9, 0x0d, 0x16, 0x10, 0x62, 0x12, 0xae, 0x14 +.byte 0xfa, 0x16, 0x47, 0x19, 0x93, 0x1b, 0xdf, 0x1d, 0x2b, 0x20, 0x78, 0x22, 0xc4, 0x24, 0x10, 0x27 +.byte 0x49, 0x75, 0x65, 0x01, 0x2f, 0x04, 0x33, 0x75, 0x95, 0x05, 0x5f, 0x08, 0x31, 0x75, 0x29, 0x0b +.byte 0x8e, 0x0c, 0x32, 0x75, 0xf3, 0x0d, 0x34, 0x75, 0x59, 0x0f, 0x32, 0x75, 0xbe, 0x10, 0x32, 0x75 +.byte 0x23, 0x12, 0x88, 0x13, 0x32, 0x75, 0xed, 0x14, 0x31, 0x75, 0x52, 0x16, 0xb7, 0x17, 0x36, 0x75 +.byte 0x82, 0x1a, 0x4c, 0x1d, 0x16, 0x20, 0x7b, 0x21, 0x46, 0x24, 0x10, 0x27, 0x75, 0x75 + +.global gUnknown_8108302 +gUnknown_8108302: @ 8108302 +.byte 0x32, 0x75 +.byte 0xd0, 0x07, 0x70, 0x17, 0x40, 0x1f, 0x10, 0x27, 0x40, 0x75, 0x83, 0x06, 0x37, 0x75, 0x05, 0x0d +.byte 0x88, 0x13, 0x0b, 0x1a, 0x3c, 0x75, 0x8d, 0x20, 0x3b, 0x75, 0x10, 0x27, 0x37, 0x75, 0x05, 0x0d +.byte 0x34, 0x75, 0x0b, 0x1a, 0x42, 0x75, 0x10, 0x27, 0x38, 0x75, 0x4c, 0x02, 0x98, 0x04, 0xe5, 0x06 +.byte 0x31, 0x09, 0x7d, 0x0b, 0xc9, 0x0d, 0x16, 0x10, 0x62, 0x12, 0xae, 0x14, 0xfa, 0x16, 0x47, 0x19 +.byte 0x93, 0x1b, 0xdf, 0x1d, 0x2b, 0x20, 0x78, 0x22, 0xc4, 0x24, 0x10, 0x27, 0x49, 0x75, 0x65, 0x01 +.byte 0x2f, 0x04, 0x33, 0x75, 0x95, 0x05, 0x5f, 0x08, 0x31, 0x75, 0x29, 0x0b, 0x8e, 0x0c, 0x32, 0x75 +.byte 0xf3, 0x0d, 0x34, 0x75, 0x59, 0x0f, 0x32, 0x75, 0xbe, 0x10, 0x32, 0x75, 0x23, 0x12, 0x88, 0x13 +.byte 0x32, 0x75, 0xed, 0x14, 0x31, 0x75, 0x52, 0x16, 0xb7, 0x17, 0x36, 0x75, 0x82, 0x1a, 0x4c, 0x1d +.byte 0x16, 0x20, 0x7b, 0x21, 0x46, 0x24, 0x10, 0x27, 0x75, 0x75 + +.global gUnknown_810838E +gUnknown_810838E: @ 810838E +.byte 0x32, 0x75, 0x04, 0x09, 0x09, 0x15 +.byte 0x0c, 0x1e, 0x10, 0x27, 0x40, 0x75, 0x83, 0x06, 0x37, 0x75, 0x05, 0x0d, 0x88, 0x13, 0x0b, 0x1a +.byte 0x3c, 0x75, 0x8d, 0x20, 0x3b, 0x75, 0x10, 0x27, 0x37, 0x75, 0x05, 0x0d, 0x34, 0x75, 0x0b, 0x1a +.byte 0x42, 0x75, 0x10, 0x27, 0x38, 0x75, 0x4c, 0x02, 0x98, 0x04, 0xe5, 0x06, 0x31, 0x09, 0x7d, 0x0b +.byte 0xc9, 0x0d, 0x16, 0x10, 0x62, 0x12, 0xae, 0x14, 0xfa, 0x16, 0x47, 0x19, 0x93, 0x1b, 0xdf, 0x1d +.byte 0x2b, 0x20, 0x78, 0x22, 0xc4, 0x24, 0x10, 0x27, 0x46, 0x75, 0x4f, 0x00, 0x32, 0x75, 0x8d, 0x01 +.byte 0x08, 0x04, 0x57, 0x04, 0x32, 0x75, 0x95, 0x05, 0x0f, 0x08, 0x31, 0x75, 0x8a, 0x0a, 0xc8, 0x0b +.byte 0x32, 0x75, 0x05, 0x0d, 0x32, 0x75, 0x55, 0x0d, 0xa4, 0x0d, 0xe2, 0x0e, 0x31, 0x0f, 0x31, 0x75 +.byte 0x6e, 0x10, 0x31, 0x75, 0xbe, 0x10, 0xfb, 0x11, 0x39, 0x13, 0x88, 0x13, 0xd7, 0x13, 0x15, 0x15 +.byte 0x31, 0x75, 0x52, 0x16, 0x90, 0x17, 0xcd, 0x18, 0x32, 0x75, 0x1d, 0x19, 0x31, 0x75, 0x6c, 0x19 +.byte 0xe7, 0x1b, 0x62, 0x1e, 0xdd, 0x20, 0x1a, 0x22, 0x95, 0x24, 0x10, 0x27, 0x75, 0x75 + +.global gUnknown_8108432 +gUnknown_8108432: @ 8108432 +.byte 0x32, 0x75 +.byte 0xc4, 0x09, 0x88, 0x13, 0x4c, 0x1d, 0x10, 0x27, 0x40, 0x75, 0x83, 0x06, 0x37, 0x75, 0x05, 0x0d +.byte 0x88, 0x13, 0x0b, 0x1a, 0x3c, 0x75, 0x8d, 0x20, 0x3b, 0x75, 0x10, 0x27, 0x37, 0x75, 0x05, 0x0d +.byte 0x34, 0x75, 0x0b, 0x1a, 0x42, 0x75, 0x10, 0x27, 0x38, 0x75, 0x4c, 0x02, 0x98, 0x04, 0xe5, 0x06 +.byte 0x31, 0x09, 0x7d, 0x0b, 0xc9, 0x0d, 0x16, 0x10, 0x62, 0x12, 0xae, 0x14, 0xfa, 0x16, 0x47, 0x19 +.byte 0x93, 0x1b, 0xdf, 0x1d, 0x2b, 0x20, 0x78, 0x22, 0xc4, 0x24, 0x10, 0x27, 0x46, 0x75, 0x4f, 0x00 +.byte 0x32, 0x75, 0x8d, 0x01, 0x08, 0x04, 0x57, 0x04, 0x32, 0x75, 0x95, 0x05, 0x0f, 0x08, 0x31, 0x75 +.byte 0x8a, 0x0a, 0xc8, 0x0b, 0x32, 0x75, 0x05, 0x0d, 0x32, 0x75, 0x55, 0x0d, 0xa4, 0x0d, 0xe2, 0x0e +.byte 0x31, 0x0f, 0x31, 0x75, 0x6e, 0x10, 0x31, 0x75, 0xbe, 0x10, 0xfb, 0x11, 0x39, 0x13, 0x88, 0x13 +.byte 0xd7, 0x13, 0x15, 0x15, 0x31, 0x75, 0x52, 0x16, 0x90, 0x17, 0xcd, 0x18, 0x32, 0x75, 0x1d, 0x19 +.byte 0x31, 0x75, 0x6c, 0x19, 0xe7, 0x1b, 0x62, 0x1e, 0xdd, 0x20, 0x1a, 0x22, 0x95, 0x24, 0x10, 0x27 +.byte 0x75, 0x75 + +.global gUnknown_81084D6 +gUnknown_81084D6: @ 81084D6 +.byte 0x32, 0x75, 0xc4, 0x09, 0x88, 0x13, 0x4c, 0x1d, 0x10, 0x27, 0x40, 0x75, 0x95, 0x05 +.byte 0x37, 0x75, 0x29, 0x0b, 0xbe, 0x10, 0x52, 0x16, 0x3c, 0x75, 0xe7, 0x1b, 0x33, 0x75, 0x7b, 0x21 +.byte 0x37, 0x75, 0x10, 0x27, 0x37, 0x75, 0x05, 0x0d, 0x34, 0x75, 0x0b, 0x1a, 0x42, 0x75, 0x10, 0x27 +.byte 0x38, 0x75, 0x4c, 0x02, 0x98, 0x04, 0xe5, 0x06, 0x31, 0x09, 0x7d, 0x0b, 0xc9, 0x0d, 0x16, 0x10 +.byte 0x62, 0x12, 0xae, 0x14, 0xfa, 0x16, 0x47, 0x19, 0x93, 0x1b, 0xdf, 0x1d, 0x2b, 0x20, 0x78, 0x22 +.byte 0xc4, 0x24, 0x10, 0x27, 0x46, 0x75, 0x4f, 0x00, 0x32, 0x75, 0x8d, 0x01, 0x08, 0x04, 0x57, 0x04 +.byte 0x32, 0x75, 0x95, 0x05, 0x0f, 0x08, 0x31, 0x75, 0x8a, 0x0a, 0xc8, 0x0b, 0x32, 0x75, 0x05, 0x0d +.byte 0x32, 0x75, 0x55, 0x0d, 0xa4, 0x0d, 0xe2, 0x0e, 0x31, 0x0f, 0x31, 0x75, 0x6e, 0x10, 0x31, 0x75 +.byte 0xbe, 0x10, 0xfb, 0x11, 0x39, 0x13, 0x88, 0x13, 0xd7, 0x13, 0x15, 0x15, 0x31, 0x75, 0x52, 0x16 +.byte 0x90, 0x17, 0xcd, 0x18, 0x32, 0x75, 0x1d, 0x19, 0x31, 0x75, 0x6c, 0x19, 0xe7, 0x1b, 0x62, 0x1e +.byte 0xdd, 0x20, 0x1a, 0x22, 0x95, 0x24, 0x10, 0x27, 0x75, 0x75 + +.global gUnknown_810857E +gUnknown_810857E: @ 810857E +.byte 0x32, 0x75, 0xc4, 0x09, 0x88, 0x13 +.byte 0x4c, 0x1d, 0x10, 0x27, 0x40, 0x75, 0x57, 0x04, 0x37, 0x75, 0xae, 0x08, 0x05, 0x0d, 0x5c, 0x11 +.byte 0x39, 0x75, 0xb4, 0x15, 0x32, 0x75, 0x0b, 0x1a, 0x62, 0x1e, 0x32, 0x75, 0xb9, 0x22, 0x37, 0x75 +.byte 0x10, 0x27, 0x37, 0x75, 0x05, 0x0d, 0x34, 0x75, 0x0b, 0x1a, 0x42, 0x75, 0x10, 0x27, 0x38, 0x75 +.byte 0x4c, 0x02, 0x98, 0x04, 0xe5, 0x06, 0x31, 0x09, 0x7d, 0x0b, 0xc9, 0x0d, 0x16, 0x10, 0x62, 0x12 +.byte 0xae, 0x14, 0xfa, 0x16, 0x47, 0x19, 0x93, 0x1b, 0xdf, 0x1d, 0x2b, 0x20, 0x78, 0x22, 0xc4, 0x24 +.byte 0x10, 0x27, 0x46, 0x75, 0x4f, 0x00, 0x32, 0x75, 0x8d, 0x01, 0x08, 0x04, 0x57, 0x04, 0x32, 0x75 +.byte 0x95, 0x05, 0x0f, 0x08, 0x31, 0x75, 0x8a, 0x0a, 0xc8, 0x0b, 0x32, 0x75, 0x05, 0x0d, 0x32, 0x75 +.byte 0x55, 0x0d, 0xa4, 0x0d, 0xe2, 0x0e, 0x31, 0x0f, 0x31, 0x75, 0x6e, 0x10, 0x31, 0x75, 0xbe, 0x10 +.byte 0xfb, 0x11, 0x39, 0x13, 0x88, 0x13, 0xd7, 0x13, 0x15, 0x15, 0x31, 0x75, 0x52, 0x16, 0x90, 0x17 +.byte 0xcd, 0x18, 0x32, 0x75, 0x1d, 0x19, 0x31, 0x75, 0x6c, 0x19, 0xe7, 0x1b, 0x62, 0x1e, 0xdd, 0x20 +.byte 0x1a, 0x22, 0x95, 0x24, 0x10, 0x27, 0x75, 0x75 + +.global gUnknown_810862C +gUnknown_810862C: @ 810862C +.byte 0x32, 0x75, 0x56, 0x0c, 0x31, 0x75, 0xac, 0x18 +.byte 0x02, 0x25, 0x34, 0x75, 0x10, 0x27, 0x3b, 0x75, 0x57, 0x04, 0x37, 0x75, 0xae, 0x08, 0x05, 0x0d +.byte 0x5c, 0x11, 0x39, 0x75, 0xb4, 0x15, 0x32, 0x75, 0x0b, 0x1a, 0x62, 0x1e, 0x32, 0x75, 0xb9, 0x22 +.byte 0x37, 0x75, 0x10, 0x27, 0x37, 0x75, 0xc4, 0x09, 0x34, 0x75, 0x88, 0x13, 0x3f, 0x75, 0x4c, 0x1d +.byte 0x32, 0x75, 0x10, 0x27, 0x5f, 0x75, 0x4f, 0x00, 0x32, 0x75, 0x8d, 0x01, 0x08, 0x04, 0x57, 0x04 +.byte 0x32, 0x75, 0x95, 0x05, 0x0f, 0x08, 0x31, 0x75, 0x8a, 0x0a, 0xc8, 0x0b, 0x32, 0x75, 0x05, 0x0d +.byte 0x32, 0x75, 0x55, 0x0d, 0xa4, 0x0d, 0xe2, 0x0e, 0x31, 0x0f, 0x31, 0x75, 0x6e, 0x10, 0x31, 0x75 +.byte 0xbe, 0x10, 0xfb, 0x11, 0x39, 0x13, 0x88, 0x13, 0xd7, 0x13, 0x15, 0x15, 0x31, 0x75, 0x52, 0x16 +.byte 0x90, 0x17, 0xcd, 0x18, 0x32, 0x75, 0x1d, 0x19, 0x31, 0x75, 0x6c, 0x19, 0xe7, 0x1b, 0x62, 0x1e +.byte 0xdd, 0x20, 0x1a, 0x22, 0x95, 0x24, 0x10, 0x27, 0x6d, 0x75, 0xb4, 0x15, 0x31, 0x75, 0x62, 0x1e +.byte 0x10, 0x27, 0x34, 0x75 + +.global gUnknown_81086C8 +gUnknown_81086C8: @ 81086C8 +.byte 0x32, 0x75, 0x56, 0x0c, 0x31, 0x75, 0xac, 0x18, 0x02, 0x25, 0x34, 0x75 +.byte 0x10, 0x27, 0x3b, 0x75, 0xe8, 0x03, 0x37, 0x75, 0xd0, 0x07, 0xb8, 0x0b, 0xa0, 0x0f, 0x88, 0x13 +.byte 0x38, 0x75, 0x70, 0x17, 0x32, 0x75, 0x58, 0x1b, 0x40, 0x1f, 0x32, 0x75, 0x28, 0x23, 0x37, 0x75 +.byte 0x10, 0x27, 0x37, 0x75, 0xc4, 0x09, 0x34, 0x75, 0x88, 0x13, 0x3f, 0x75, 0x4c, 0x1d, 0x32, 0x75 +.byte 0x10, 0x27, 0x5f, 0x75, 0x4f, 0x00, 0x32, 0x75, 0x8d, 0x01, 0x08, 0x04, 0x57, 0x04, 0x32, 0x75 +.byte 0x95, 0x05, 0x0f, 0x08, 0x31, 0x75, 0x8a, 0x0a, 0xc8, 0x0b, 0x32, 0x75, 0x05, 0x0d, 0x32, 0x75 +.byte 0x55, 0x0d, 0xa4, 0x0d, 0xe2, 0x0e, 0x31, 0x0f, 0x31, 0x75, 0x6e, 0x10, 0x31, 0x75, 0xbe, 0x10 +.byte 0xfb, 0x11, 0x39, 0x13, 0x88, 0x13, 0xd7, 0x13, 0x15, 0x15, 0x31, 0x75, 0x52, 0x16, 0x90, 0x17 +.byte 0xcd, 0x18, 0x32, 0x75, 0x1d, 0x19, 0x31, 0x75, 0x6c, 0x19, 0xe7, 0x1b, 0x62, 0x1e, 0xdd, 0x20 +.byte 0x1a, 0x22, 0x95, 0x24, 0x10, 0x27, 0x6d, 0x75, 0xb4, 0x15, 0x31, 0x75, 0x62, 0x1e, 0x10, 0x27 +.byte 0x34, 0x75 + +.global gUnknown_8108766 +gUnknown_8108766: @ 8108766 +.byte 0x32, 0x75, 0x35, 0x05, 0x31, 0x75, 0xd5, 0x14, 0x75, 0x24, 0x34, 0x75, 0x10, 0x27 +.byte 0x3b, 0x75, 0xe8, 0x03, 0x37, 0x75, 0xd0, 0x07, 0xb8, 0x0b, 0xa0, 0x0f, 0x88, 0x13, 0x38, 0x75 +.byte 0x70, 0x17, 0x32, 0x75, 0x58, 0x1b, 0x40, 0x1f, 0x32, 0x75, 0x28, 0x23, 0x37, 0x75, 0x10, 0x27 +.byte 0x37, 0x75, 0xc4, 0x09, 0x34, 0x75, 0x88, 0x13, 0x3f, 0x75, 0x4c, 0x1d, 0x32, 0x75, 0x10, 0x27 +.byte 0x5f, 0x75, 0x4f, 0x00, 0x32, 0x75, 0x8d, 0x01, 0x08, 0x04, 0x57, 0x04, 0x32, 0x75, 0x95, 0x05 +.byte 0x0f, 0x08, 0x31, 0x75, 0x8a, 0x0a, 0xc8, 0x0b, 0x32, 0x75, 0x05, 0x0d, 0x32, 0x75, 0x55, 0x0d +.byte 0xa4, 0x0d, 0xe2, 0x0e, 0x31, 0x0f, 0x31, 0x75, 0x6e, 0x10, 0x31, 0x75, 0xbe, 0x10, 0xfb, 0x11 +.byte 0x39, 0x13, 0x88, 0x13, 0xd7, 0x13, 0x15, 0x15, 0x31, 0x75, 0x52, 0x16, 0x90, 0x17, 0xcd, 0x18 +.byte 0x32, 0x75, 0x1d, 0x19, 0x31, 0x75, 0x6c, 0x19, 0xe7, 0x1b, 0x62, 0x1e, 0xdd, 0x20, 0x1a, 0x22 +.byte 0x95, 0x24, 0x10, 0x27, 0x6d, 0x75, 0xb4, 0x15, 0x31, 0x75, 0x62, 0x1e, 0x10, 0x27, 0x34, 0x75 + +.global gUnknown_8108804 +gUnknown_8108804: @ 8108804 +.byte 0x32, 0x75, 0x35, 0x05, 0x31, 0x75, 0xd5, 0x14, 0x75, 0x24, 0x34, 0x75, 0x10, 0x27, 0x3b, 0x75 +.byte 0xe8, 0x03, 0x37, 0x75, 0xd0, 0x07, 0xb8, 0x0b, 0xa0, 0x0f, 0x88, 0x13, 0x38, 0x75, 0x70, 0x17 +.byte 0x32, 0x75, 0x58, 0x1b, 0x40, 0x1f, 0x32, 0x75, 0x28, 0x23, 0x37, 0x75, 0x10, 0x27, 0x37, 0x75 +.byte 0xc4, 0x09, 0x34, 0x75, 0x88, 0x13, 0x3f, 0x75, 0x4c, 0x1d, 0x32, 0x75, 0x10, 0x27, 0x5f, 0x75 +.byte 0x4f, 0x00, 0x32, 0x75, 0x8d, 0x01, 0x08, 0x04, 0x57, 0x04, 0x32, 0x75, 0x95, 0x05, 0x0f, 0x08 +.byte 0x31, 0x75, 0x8a, 0x0a, 0xc8, 0x0b, 0x32, 0x75, 0x05, 0x0d, 0x32, 0x75, 0x55, 0x0d, 0xa4, 0x0d +.byte 0xe2, 0x0e, 0x31, 0x0f, 0x31, 0x75, 0x6e, 0x10, 0x31, 0x75, 0xbe, 0x10, 0xfb, 0x11, 0x39, 0x13 +.byte 0x88, 0x13, 0xd7, 0x13, 0x15, 0x15, 0x31, 0x75, 0x52, 0x16, 0x90, 0x17, 0xcd, 0x18, 0x32, 0x75 +.byte 0x1d, 0x19, 0x31, 0x75, 0x6c, 0x19, 0xe7, 0x1b, 0x62, 0x1e, 0xdd, 0x20, 0x1a, 0x22, 0x95, 0x24 +.byte 0x10, 0x27, 0x6d, 0x75, 0xb4, 0x15, 0x31, 0x75, 0x62, 0x1e, 0x10, 0x27, 0x34, 0x75 + +.global gUnknown_81088A2 +gUnknown_81088A2: @ 81088A2 +.byte 0x32, 0x75 +.byte 0x35, 0x05, 0x31, 0x75, 0xd5, 0x14, 0x75, 0x24, 0x34, 0x75, 0x10, 0x27, 0x3b, 0x75, 0xe8, 0x03 +.byte 0x37, 0x75, 0xd0, 0x07, 0xb8, 0x0b, 0xa0, 0x0f, 0x88, 0x13, 0x38, 0x75, 0x70, 0x17, 0x32, 0x75 +.byte 0x58, 0x1b, 0x40, 0x1f, 0x32, 0x75, 0x28, 0x23, 0x37, 0x75, 0x10, 0x27, 0x4c, 0x75, 0xd0, 0x07 +.byte 0x33, 0x75, 0xa0, 0x0f, 0x70, 0x17, 0x40, 0x1f, 0x10, 0x27, 0x5b, 0x75, 0x4f, 0x00, 0x32, 0x75 +.byte 0x8d, 0x01, 0x08, 0x04, 0x57, 0x04, 0x32, 0x75, 0x95, 0x05, 0x0f, 0x08, 0x31, 0x75, 0x8a, 0x0a +.byte 0xc8, 0x0b, 0x32, 0x75, 0x05, 0x0d, 0x32, 0x75, 0x55, 0x0d, 0xa4, 0x0d, 0xe2, 0x0e, 0x31, 0x0f +.byte 0x31, 0x75, 0x6e, 0x10, 0x31, 0x75, 0xbe, 0x10, 0xfb, 0x11, 0x39, 0x13, 0x88, 0x13, 0xd7, 0x13 +.byte 0x15, 0x15, 0x31, 0x75, 0x52, 0x16, 0x90, 0x17, 0xcd, 0x18, 0x32, 0x75, 0x1d, 0x19, 0x31, 0x75 +.byte 0x6c, 0x19, 0xe7, 0x1b, 0x62, 0x1e, 0xdd, 0x20, 0x1a, 0x22, 0x95, 0x24, 0x10, 0x27, 0x6d, 0x75 +.byte 0xb4, 0x15, 0x31, 0x75, 0x62, 0x1e, 0x10, 0x27, 0x34, 0x75 + +.global gUnknown_810893E +gUnknown_810893E: @ 810893E +.byte 0x32, 0x75, 0x35, 0x05, 0x31, 0x75 +.byte 0xd5, 0x14, 0x75, 0x24, 0x34, 0x75, 0x10, 0x27, 0x3b, 0x75, 0xe8, 0x03, 0x37, 0x75, 0xd0, 0x07 +.byte 0xb8, 0x0b, 0xa0, 0x0f, 0x88, 0x13, 0x38, 0x75, 0x70, 0x17, 0x32, 0x75, 0x58, 0x1b, 0x40, 0x1f +.byte 0x32, 0x75, 0x28, 0x23, 0x37, 0x75, 0x10, 0x27, 0x4c, 0x75, 0xd0, 0x07, 0x33, 0x75, 0xa0, 0x0f +.byte 0x70, 0x17, 0x40, 0x1f, 0x10, 0x27, 0x5b, 0x75, 0x4f, 0x00, 0x32, 0x75, 0x8d, 0x01, 0x08, 0x04 +.byte 0x57, 0x04, 0x32, 0x75, 0x95, 0x05, 0x0f, 0x08, 0x31, 0x75, 0x8a, 0x0a, 0xc8, 0x0b, 0x32, 0x75 +.byte 0x05, 0x0d, 0x32, 0x75, 0x55, 0x0d, 0xa4, 0x0d, 0xe2, 0x0e, 0x31, 0x0f, 0x31, 0x75, 0x6e, 0x10 +.byte 0x31, 0x75, 0xbe, 0x10, 0xfb, 0x11, 0x39, 0x13, 0x88, 0x13, 0xd7, 0x13, 0x15, 0x15, 0x31, 0x75 +.byte 0x52, 0x16, 0x90, 0x17, 0xcd, 0x18, 0x32, 0x75, 0x1d, 0x19, 0x31, 0x75, 0x6c, 0x19, 0xe7, 0x1b +.byte 0x62, 0x1e, 0xdd, 0x20, 0x1a, 0x22, 0x95, 0x24, 0x10, 0x27, 0x6d, 0x75, 0xb4, 0x15, 0x31, 0x75 +.byte 0x62, 0x1e, 0x10, 0x27, 0x34, 0x75 + +.global gUnknown_81089DA +gUnknown_81089DA: @ 81089DA +.byte 0x31, 0x75, 0xe2, 0x04, 0x6a, 0x18, 0x10, 0x27, 0x3f, 0x75 +.byte 0x10, 0x27, 0x5f, 0x75, 0x83, 0x06, 0x32, 0x75, 0xa6, 0x0e, 0x34, 0x75, 0xe7, 0x11, 0x32, 0x75 +.byte 0x29, 0x15, 0x6a, 0x18, 0x31, 0x75, 0xab, 0x1b, 0x31, 0x75, 0x4c, 0x1d, 0x8d, 0x20, 0x33, 0x75 +.byte 0xcf, 0x23, 0x10, 0x27, 0x34, 0x75, 0x88, 0x13, 0x10, 0x27, 0xcc, 0x75 + +.global gUnknown_8108A10 +gUnknown_8108A10: @ 8108A10 +.byte 0x35, 0x75, 0xc4, 0x09 +.byte 0x33, 0x75, 0x10, 0x27, 0xb2, 0x75, 0x65, 0x01, 0x2f, 0x04, 0x33, 0x75, 0x95, 0x05, 0x5f, 0x08 +.byte 0x31, 0x75, 0x29, 0x0b, 0x8e, 0x0c, 0x32, 0x75, 0xf3, 0x0d, 0x34, 0x75, 0x59, 0x0f, 0x32, 0x75 +.byte 0xbe, 0x10, 0x32, 0x75, 0x23, 0x12, 0x88, 0x13, 0x32, 0x75, 0xed, 0x14, 0x31, 0x75, 0x52, 0x16 +.byte 0xb7, 0x17, 0x36, 0x75, 0x82, 0x1a, 0x4c, 0x1d, 0x16, 0x20, 0x7b, 0x21, 0x46, 0x24, 0x10, 0x27 +.byte 0x3b, 0x75, 0xca, 0x02, 0x5f, 0x08, 0x29, 0x0b, 0x34, 0x75, 0xf3, 0x0d, 0x3a, 0x75, 0xe7, 0x1b +.byte 0xb1, 0x1e, 0x7b, 0x21, 0x3f, 0x75, 0x10, 0x27, 0x45, 0x75 + +.global gUnknown_8108A6E +gUnknown_8108A6E: @ 8108A6E +.byte 0xe8, 0x03, 0xd0, 0x07, 0x70, 0x17 +.byte 0x28, 0x23, 0x10, 0x27, 0x39, 0x75, 0x8d, 0x20, 0x10, 0x27, 0x33, 0x75, 0x10, 0x27, 0x32, 0x75 +.byte 0x95, 0x05, 0x36, 0x75, 0x29, 0x0b, 0xbe, 0x10, 0x52, 0x16, 0xe7, 0x1b, 0x7b, 0x21, 0x39, 0x75 +.byte 0x10, 0x27, 0x45, 0x75, 0x95, 0x05, 0x34, 0x75, 0xbe, 0x10, 0x38, 0x75, 0x52, 0x16, 0x31, 0x75 +.byte 0xe7, 0x1b, 0x31, 0x75, 0x7b, 0x21, 0x35, 0x75, 0x10, 0x27, 0x37, 0x75, 0x10, 0x27, 0xca, 0x75 + +.global gUnknown_8108AB4 +gUnknown_8108AB4: @ 8108AB4 +.byte 0x35, 0x75, 0xc4, 0x09, 0x33, 0x75, 0x10, 0x27, 0xb2, 0x75, 0x65, 0x01, 0x2f, 0x04, 0x33, 0x75 +.byte 0x95, 0x05, 0x5f, 0x08, 0x31, 0x75, 0x29, 0x0b, 0x8e, 0x0c, 0x32, 0x75, 0xf3, 0x0d, 0x34, 0x75 +.byte 0x59, 0x0f, 0x32, 0x75, 0xbe, 0x10, 0x32, 0x75, 0x23, 0x12, 0x88, 0x13, 0x32, 0x75, 0xed, 0x14 +.byte 0x71, 0x02, 0x52, 0x16, 0xb7, 0x17, 0x34, 0x75, 0xe2, 0x04, 0x31, 0x75, 0x82, 0x1a, 0x4c, 0x1d +.byte 0x16, 0x20, 0x7b, 0x21, 0x46, 0x24, 0x10, 0x27, 0x3b, 0x75, 0x53, 0x07, 0x35, 0x0c, 0xa6, 0x0e +.byte 0x34, 0x75, 0x17, 0x11, 0x3a, 0x75, 0x4c, 0x1d, 0xbd, 0x1f, 0x2e, 0x22, 0x3f, 0x75, 0x10, 0x27 +.byte 0x45, 0x75 + +.global gUnknown_8108B16 +gUnknown_8108B16: @ 8108B16 +.byte 0xe8, 0x03, 0xd0, 0x07, 0x70, 0x17, 0x28, 0x23, 0x10, 0x27, 0x39, 0x75, 0x8d, 0x20 +.byte 0x10, 0x27, 0x33, 0x75, 0x10, 0x27, 0x32, 0x75, 0x95, 0x05, 0x36, 0x75, 0x29, 0x0b, 0xbe, 0x10 +.byte 0x52, 0x16, 0xe7, 0x1b, 0x7b, 0x21, 0x39, 0x75, 0x10, 0x27, 0x45, 0x75, 0x95, 0x05, 0x34, 0x75 +.byte 0xbe, 0x10, 0x38, 0x75, 0x52, 0x16, 0x31, 0x75, 0xe7, 0x1b, 0x31, 0x75, 0x7b, 0x21, 0x35, 0x75 +.byte 0x10, 0x27, 0x37, 0x75, 0x10, 0x27, 0xca, 0x75 + +.global gUnknown_8108B5C +gUnknown_8108B5C: @ 8108B5C +.byte 0x35, 0x75, 0x6a, 0x18, 0x33, 0x75, 0x10, 0x27 +.byte 0xb2, 0x75, 0x59, 0x01, 0x0a, 0x04, 0x33, 0x75, 0x63, 0x05, 0x15, 0x08, 0x31, 0x75, 0xc7, 0x0a +.byte 0x1f, 0x0c, 0x32, 0x75, 0x78, 0x0d, 0x34, 0x75, 0xd1, 0x0e, 0x32, 0x75, 0x2a, 0x10, 0x32, 0x75 +.byte 0x83, 0x11, 0xdc, 0x12, 0x32, 0x75, 0x34, 0x14, 0x71, 0x02, 0x8d, 0x15, 0xe6, 0x16, 0x3f, 0x18 +.byte 0x33, 0x75, 0xe2, 0x04, 0x31, 0x75, 0xf1, 0x1a, 0xa2, 0x1d, 0x54, 0x20, 0xad, 0x21, 0x5e, 0x24 +.byte 0x10, 0x27, 0x3b, 0x75, 0x53, 0x07, 0x35, 0x0c, 0xa6, 0x0e, 0x34, 0x75, 0x17, 0x11, 0x3a, 0x75 +.byte 0x4c, 0x1d, 0xbd, 0x1f, 0x2e, 0x22, 0x3f, 0x75, 0x10, 0x27, 0x45, 0x75 + +.global gUnknown_8108BC0 +gUnknown_8108BC0: @ 8108BC0 +.byte 0xe8, 0x03, 0xd0, 0x07 +.byte 0x58, 0x1b, 0x28, 0x23, 0x10, 0x27, 0x39, 0x75, 0x8d, 0x20, 0x10, 0x27, 0x33, 0x75, 0x10, 0x27 +.byte 0x32, 0x75, 0x57, 0x04, 0x36, 0x75, 0xae, 0x08, 0x05, 0x0d, 0x5c, 0x11, 0xb4, 0x15, 0x0b, 0x1a +.byte 0x62, 0x1e, 0x3a, 0x75, 0xb9, 0x22, 0x3a, 0x75, 0xe4, 0x24, 0x10, 0x27, 0x37, 0x75, 0xe5, 0x02 +.byte 0x34, 0x75, 0xae, 0x08, 0x34, 0x75, 0x78, 0x0e, 0x41, 0x14, 0x32, 0x75, 0x0b, 0x1a, 0x36, 0x75 +.byte 0x7d, 0x1b, 0x31, 0x75, 0x47, 0x21, 0x10, 0x27, 0x37, 0x75, 0x10, 0x27, 0xca, 0x75 + +.global gUnknown_8108C12 +gUnknown_8108C12: @ 8108C12 +.byte 0x35, 0x75 +.byte 0x88, 0x13, 0x33, 0x75, 0x10, 0x27, 0xb2, 0x75, 0x59, 0x01, 0x0a, 0x04, 0x31, 0x75, 0xa1, 0x01 +.byte 0x31, 0x75, 0x63, 0x05, 0x15, 0x08, 0x41, 0x03, 0xc7, 0x0a, 0x1f, 0x0c, 0x32, 0x75, 0x78, 0x0d +.byte 0x31, 0x75, 0xe2, 0x04, 0x32, 0x75, 0xd1, 0x0e, 0x32, 0x75, 0x2a, 0x10, 0x32, 0x75, 0x83, 0x11 +.byte 0xdc, 0x12, 0x32, 0x75, 0x34, 0x14, 0x83, 0x06, 0x8d, 0x15, 0xe6, 0x16, 0x3f, 0x18, 0x31, 0x75 +.byte 0x23, 0x08, 0x31, 0x75, 0xc4, 0x09, 0x31, 0x75, 0xf1, 0x1a, 0xa2, 0x1d, 0x54, 0x20, 0xad, 0x21 +.byte 0x5e, 0x24, 0x10, 0x27, 0x38, 0x75, 0x65, 0x0b, 0x32, 0x75, 0x05, 0x0d, 0x47, 0x10, 0xe7, 0x11 +.byte 0x88, 0x13, 0x33, 0x75, 0x29, 0x15, 0x35, 0x75, 0x6a, 0x18, 0xab, 0x1b, 0x34, 0x75, 0x4c, 0x1d +.byte 0xed, 0x1e, 0x8d, 0x20, 0x2e, 0x22, 0xcf, 0x23, 0x3c, 0x75, 0x10, 0x27, 0x45, 0x75 + +.global gUnknown_8108C92 +gUnknown_8108C92: @ 8108C92 +.byte 0x01, 0x03 +.byte 0x02, 0x06, 0x0a, 0x18, 0x0b, 0x1b, 0x0c, 0x1e, 0x34, 0x75, 0x10, 0x27, 0x33, 0x75, 0xb6, 0x16 +.byte 0x56, 0x24, 0x10, 0x27, 0x33, 0x75, 0x58, 0x1b, 0x10, 0x27, 0x40, 0x75, 0x10, 0x27, 0x50, 0x75 +.byte 0x88, 0x13, 0x42, 0x75, 0x10, 0x27, 0x38, 0x75, 0x4c, 0x02, 0x98, 0x04, 0xe5, 0x06, 0x31, 0x09 +.byte 0x7d, 0x0b, 0xc9, 0x0d, 0x16, 0x10, 0x62, 0x12, 0xae, 0x14, 0xfa, 0x16, 0x47, 0x19, 0x93, 0x1b +.byte 0xdf, 0x1d, 0x2b, 0x20, 0x78, 0x22, 0xc4, 0x24, 0x10, 0x27, 0x7c, 0x75, 0x81, 0x01, 0x32, 0x75 +.byte 0x01, 0x03, 0x02, 0x06, 0x83, 0x07, 0x04, 0x09, 0x84, 0x0a, 0x31, 0x75, 0x86, 0x0d, 0x06, 0x0f +.byte 0x87, 0x10, 0x88, 0x13, 0x33, 0x75, 0x89, 0x16, 0x8a, 0x19, 0x8c, 0x1c, 0x31, 0x75, 0x0c, 0x1e +.byte 0x31, 0x75, 0x8d, 0x1f, 0x0e, 0x21, 0x34, 0x75, 0x8e, 0x22, 0x33, 0x75, 0x0f, 0x24, 0x36, 0x75 +.byte 0x10, 0x27, 0x45, 0x75 + +.global gUnknown_8108D18 +gUnknown_8108D18: @ 8108D18 +.byte 0x56, 0x0c, 0x31, 0x75, 0x81, 0x12, 0x9d, 0x16, 0xba, 0x1a, 0xd7, 0x1e +.byte 0x33, 0x75, 0xf3, 0x22, 0x10, 0x27, 0x35, 0x75, 0x05, 0x0d, 0x0b, 0x1a, 0x10, 0x27, 0x33, 0x75 +.byte 0xb3, 0x01, 0x66, 0x03, 0x31, 0x75, 0x18, 0x05, 0xcb, 0x06, 0x32, 0x75, 0x7e, 0x08, 0x31, 0x0a +.byte 0xe3, 0x0b, 0x96, 0x0d, 0x49, 0x0f, 0xfc, 0x10, 0x36, 0x75, 0xaf, 0x12, 0x61, 0x14, 0x14, 0x16 +.byte 0xc7, 0x17, 0x7a, 0x19, 0x2d, 0x1b, 0x33, 0x75, 0xdf, 0x1c, 0x92, 0x1e, 0x45, 0x20, 0xf8, 0x21 +.byte 0xaa, 0x23, 0x31, 0x75, 0x5d, 0x25, 0x10, 0x27, 0x3c, 0x75, 0x05, 0x0d, 0x3f, 0x75, 0x0b, 0x1a +.byte 0x32, 0x75, 0x10, 0x27, 0x49, 0x75, 0x10, 0x27, 0x45, 0x75, 0x4f, 0x00, 0x32, 0x75, 0x8d, 0x01 +.byte 0x08, 0x04, 0x57, 0x04, 0xc4, 0x00, 0x31, 0x75, 0x95, 0x05, 0x0f, 0x08, 0x88, 0x01, 0x8a, 0x0a +.byte 0xc8, 0x0b, 0x32, 0x75, 0x05, 0x0d, 0x31, 0x75, 0x4c, 0x02, 0x55, 0x0d, 0xa4, 0x0d, 0xe2, 0x0e +.byte 0x31, 0x0f, 0x31, 0x75, 0x6e, 0x10, 0x31, 0x75, 0xbe, 0x10, 0xfb, 0x11, 0x39, 0x13, 0x88, 0x13 +.byte 0xd7, 0x13, 0x15, 0x15, 0x10, 0x03, 0x52, 0x16, 0x90, 0x17, 0xcd, 0x18, 0x31, 0x75, 0xd4, 0x03 +.byte 0x1d, 0x19, 0x98, 0x04, 0x6c, 0x19, 0xe7, 0x1b, 0x62, 0x1e, 0xdd, 0x20, 0x1a, 0x22, 0x95, 0x24 +.byte 0x10, 0x27, 0x32, 0x75, 0x5d, 0x05, 0x35, 0x75, 0x21, 0x06, 0xe5, 0x06, 0xa9, 0x07, 0x6d, 0x08 +.byte 0xf5, 0x09, 0xb9, 0x0a, 0x7d, 0x0b, 0x41, 0x0c, 0x05, 0x0d, 0x8d, 0x0e, 0x52, 0x0f, 0x16, 0x10 +.byte 0x9e, 0x11, 0x62, 0x12, 0x26, 0x13, 0x31, 0x75, 0xae, 0x14, 0x36, 0x16, 0xbe, 0x17, 0x83, 0x18 +.byte 0x47, 0x19, 0x0b, 0x1a, 0xcf, 0x1a, 0x93, 0x1b, 0x57, 0x1c, 0x1b, 0x1d, 0xdf, 0x1d, 0x31, 0x75 +.byte 0xa3, 0x1e, 0x33, 0x75, 0x67, 0x1f, 0x2b, 0x20, 0xef, 0x20, 0xb3, 0x21, 0x78, 0x22, 0x32, 0x75 +.byte 0x00, 0x24, 0xc4, 0x24, 0x31, 0x75, 0x88, 0x25, 0x4c, 0x26, 0x10, 0x27, 0x38, 0x75, 0x10, 0x27 +.byte 0x37, 0x75 + +.global gUnknown_8108E36 +gUnknown_8108E36: @ 8108E36 +.byte 0x33, 0x75, 0x83, 0x06, 0x34, 0x75, 0x8d, 0x20, 0x10, 0x27, 0x99, 0x75, 0x10, 0x27 +.byte 0x34, 0x75, 0xc4, 0x09, 0x32, 0x75, 0x88, 0x13, 0x4c, 0x1d, 0x3a, 0x75, 0x10, 0x27, 0x89, 0x75 +.byte 0x10, 0x27, 0x4a, 0x75 + +.global gUnknown_8108E58 +gUnknown_8108E58: @ 8108E58 +@ replacing .incbin "baserom.gba", 0x00108e58, 0x68 +@ u16*s +.4byte gUnknown_8108184 +.4byte gUnknown_810819C +.4byte gUnknown_81081EA +.4byte gUnknown_8108274 +.4byte gUnknown_8108302 +.4byte gUnknown_810838E +.4byte gUnknown_8108432 +.4byte gUnknown_81084D6 +.4byte gUnknown_810857E +.4byte gUnknown_810862C +.4byte gUnknown_81086C8 +.4byte gUnknown_8108766 +.4byte gUnknown_8108804 +.4byte gUnknown_81088A2 +.4byte gUnknown_810893E +.4byte gUnknown_81089DA +.4byte gUnknown_8108A10 +.4byte gUnknown_8108A6E +.4byte gUnknown_8108AB4 +.4byte gUnknown_8108B16 +.4byte gUnknown_8108B5C +.4byte gUnknown_8108BC0 +.4byte gUnknown_8108C12 +.4byte gUnknown_8108C92 +.4byte gUnknown_8108D18 +.4byte gUnknown_8108E36 + +.global gUnknown_8108EC0 +gUnknown_8108EC0: @ 8108EC0 +@ replacing .incbin "baserom.gba", 0x108EC0, 0x50 +.byte 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f +.byte 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x10, 0x17, 0x18, 0x19, 0x14, 0x17, 0x1c, 0x1d, 0x1e, 0x1f +.byte 0x20, 0x21, 0x1c, 0x23, 0x24, 0x25, 0x1e, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f +.byte 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x2d, 0x2d, 0x3b, 0x3c, 0x30, 0x3e, 0x3f +.byte 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f + +.global gUnknown_8108F10 +gUnknown_8108F10: @ 8108F10 +.string "{color YELLOW_D}%s{reset}\0" +.align 2,0 + +.global gUnknown_8108F18 +gUnknown_8108F18: @ 8108F18 +.string "{color YELLOW_D}%s{reset} {color CYAN}%d{reset}F\0" +.align 2,0 + +.global gUnknown_8108F2C +gUnknown_8108F2C: @ 8108F2C +.string "{color YELLOW_D}%s{reset} B{color CYAN}%d{reset}F\0" +.align 2,0 + +.global gUnknown_8108F40 +gUnknown_8108F40: @ 8108F40 +.byte 0x00, 0x00 + +.global gUnknown_8108F42 +gUnknown_8108F42: @ 8108F42 +.byte 0x99, 0x00, 0x9c, 0x00, 0x9e, 0x00, 0xdb, 0x00 + +.global gUnknown_8108F4A +gUnknown_8108F4A: @ 8108F4A +.byte 0xe1, 0xe7, 0xe6, 0xe2, 0x00, 0x00 + +.global gUnknown_8108F50 +gUnknown_8108F50: @ 8108F50 +.string "No problem.\0" +.align 2,0 +@ items.c +.string "pksdir0\0" +.align 2,0 + +.global gUnknown_8108F64 +gUnknown_8108F64: @ 8108F64 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +.byte 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x2c, 0x01, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +.byte 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x0c, 0x21, 0x40, 0x10, 0x00, 0x02, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x21, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x84, 0x0c, 0x21, 0x44, 0xff, 0x03, 0x02, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x11, 0x00, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x80, 0x00, 0x08, 0x00, 0x02, 0x00, 0x80, 0x80, 0x0c, 0x21, 0xc4, 0x55, 0x1d, 0x02, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x80, 0x00, 0x08, 0x02, 0x02, 0x00, 0x80, 0x00, 0x0c, 0x21, 0xc4, 0xfd, 0x25, 0x02, 0x00, 0x00 +.byte 0x66, 0x81, 0x83, 0x4d, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x21, 0xc0, 0xfe, 0x44, 0x02, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +.byte 0x80, 0x00, 0x08, 0x00, 0x02, 0x00, 0x80, 0x80, 0x0c, 0x21, 0xc4, 0xfc, 0x45, 0x02, 0x00, 0x00 +.byte 0x66, 0x81, 0x83, 0x4d, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00 +.byte 0x80, 0x00, 0x18, 0x82, 0x00, 0x00, 0x80, 0x00, 0x0c, 0x21, 0xc4, 0xfd, 0x45, 0x02, 0x00, 0x00 +.byte 0x66, 0x81, 0x83, 0x4d, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00 +.byte 0x80, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x70, 0x64, 0x02, 0x00, 0x00 +.byte 0x66, 0x81, 0x83, 0x4d, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x02, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +.byte 0x80, 0x00, 0x18, 0x80, 0x02, 0x00, 0x80, 0x00, 0x0c, 0x21, 0x44, 0xfd, 0x61, 0x02, 0x00, 0x00 +.byte 0x66, 0x81, 0x83, 0x4d, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x08, 0x20, 0x00, 0x09, 0x00, 0x02, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +.byte 0x84, 0x04, 0x38, 0x80, 0x02, 0x00, 0x80, 0x04, 0x0c, 0x21, 0x44, 0xfd, 0x7d, 0x02, 0x00, 0x00 +.byte 0x66, 0x83, 0x93, 0x4d, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x08, 0x20, 0x40, 0xfd, 0x45, 0x02, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +.byte 0x8c, 0x14, 0x7e, 0xa2, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x64, 0x02, 0x00, 0x20 +.byte 0x66, 0x81, 0xd7, 0xcd, 0xf4, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +.byte 0x0c, 0x14, 0x7e, 0xa2, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xa8, 0x0c, 0x02, 0x00, 0x20 +.byte 0x67, 0x93, 0xd7, 0xef, 0xf4, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00 +.byte 0x00, 0x14, 0x7f, 0xa0, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20 +.byte 0x67, 0x93, 0xd7, 0xef, 0xf4, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +.byte 0x80, 0x3c, 0x7e, 0xc2, 0x08, 0x10, 0xa0, 0x20, 0xbe, 0x21, 0xc0, 0xff, 0x7f, 0x02, 0x00, 0x20 +.byte 0x67, 0x93, 0xd7, 0x7f, 0xf0, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x8c, 0x3c, 0x7e, 0xc2, 0x08, 0x10, 0xa0, 0x80, 0xbc, 0x20, 0x10, 0x01, 0x00, 0x02, 0x00, 0x20 +.byte 0x67, 0x93, 0xd7, 0x7f, 0xf0, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x08, 0x20, 0x40, 0xfd, 0x45, 0x02, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x84, 0x3c, 0xe1, 0x03, 0x00, 0x00, 0x02, 0x00, 0x08 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +.byte 0x8e, 0x02, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x21, 0x9a, 0x21, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x8e, 0x02, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x21, 0x9a, 0x21, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x8e, 0xbe, 0x7e, 0xe9, 0x4e, 0x3c, 0xa0, 0xa7, 0xbf, 0x39, 0x20, 0x00, 0x00, 0x02, 0x00, 0x20 +.byte 0x67, 0x93, 0xd7, 0xff, 0xfc, 0x27, 0xfc, 0xff, 0xbb, 0x9f, 0x79, 0xec, 0x00, 0x01, 0x00, 0x00 +.byte 0x8e, 0xfe, 0x7e, 0xe9, 0x4e, 0x34, 0xa0, 0xa7, 0xbf, 0x39, 0x04, 0x00, 0x00, 0x02, 0x00, 0x20 +.byte 0x67, 0x93, 0xd7, 0xff, 0xfc, 0x27, 0xfc, 0xff, 0xbb, 0x9f, 0x59, 0xec, 0x00, 0x01, 0x00, 0x00 +.byte 0x8c, 0x14, 0x7f, 0xe2, 0x00, 0x00, 0xa0, 0x84, 0x0f, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20 +.byte 0x67, 0x93, 0xd7, 0xff, 0xf4, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00 +.byte 0x8c, 0x14, 0x7f, 0xe2, 0x00, 0x00, 0xa0, 0x84, 0x0f, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20 +.byte 0x67, 0x93, 0xd7, 0xff, 0xf4, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00 +.byte 0x8e, 0xff, 0xff, 0xeb, 0xef, 0x77, 0xa0, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x80, 0x04, 0x38, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x28 +.byte 0x67, 0x93, 0xd7, 0xff, 0xf4, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x80, 0xc0, 0x03, 0x69, 0x46, 0x00, 0xa0, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x00, 0x02, 0x08, 0x20 +.byte 0x67, 0x93, 0xd7, 0xff, 0xf4, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x8e, 0xc0, 0x03, 0x69, 0x46, 0x10, 0xa0, 0xae, 0xbf, 0x39, 0x08, 0x00, 0x00, 0x02, 0x20, 0x60 +.byte 0x67, 0x93, 0xd7, 0xff, 0xf4, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x8e, 0xc0, 0x03, 0x69, 0x46, 0x00, 0xa0, 0xae, 0xbf, 0xf9, 0x07, 0x00, 0x00, 0x02, 0x02, 0x20 +.byte 0x67, 0x93, 0xd7, 0xff, 0xf4, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x8e, 0xc0, 0x03, 0x69, 0x46, 0x00, 0xa0, 0xae, 0xbf, 0xf9, 0x07, 0x00, 0x00, 0x02, 0x04, 0x20 +.byte 0x67, 0x93, 0xd7, 0xff, 0xf4, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x82, 0x3c, 0x06, 0xc0, 0x0c, 0x30, 0xa0, 0x00, 0x0d, 0x21, 0x00, 0x00, 0x00, 0x82, 0x01, 0x28 +.byte 0x67, 0x93, 0xd7, 0xff, 0xf4, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00 +.byte 0x8e, 0xc0, 0x03, 0x69, 0x46, 0x00, 0xa0, 0xae, 0xbf, 0xf9, 0x07, 0x00, 0x00, 0x12, 0x00, 0x20 +.byte 0x67, 0x93, 0xd7, 0xff, 0xf4, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x8e, 0xfd, 0x7f, 0xe9, 0xcf, 0x37, 0xa0, 0x84, 0x3c, 0x21, 0x10, 0x00, 0x00, 0x02, 0x00, 0x20 +.byte 0x67, 0x93, 0xd7, 0xef, 0xf4, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +.byte 0x8e, 0xff, 0xff, 0xeb, 0xef, 0x77, 0xa0, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +.byte 0x80, 0x35, 0x7b, 0xab, 0xc9, 0x01, 0x20, 0x28, 0x38, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20 +.byte 0x67, 0x93, 0xd7, 0x7f, 0xf0, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x20, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x0c, 0x01, 0x04, 0x02, 0x02, 0x03, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +.byte 0x80, 0x00, 0x08, 0x40, 0x06, 0x00, 0xa0, 0x80, 0x0c, 0x21, 0xc4, 0x55, 0x1d, 0x02, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x80, 0x00, 0x08, 0x40, 0x06, 0x00, 0xa0, 0x80, 0x0c, 0x21, 0xc4, 0x55, 0x1d, 0x02, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x80, 0x35, 0xfb, 0xab, 0xc9, 0x01, 0x20, 0x28, 0x38, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x80, 0x35, 0xfb, 0xab, 0xc9, 0x01, 0x20, 0x28, 0x38, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x0d, 0x21, 0x08, 0x00, 0x00, 0x02, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x0d, 0x21, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x8c, 0x14, 0x7f, 0xe2, 0x00, 0x00, 0xa0, 0x84, 0x0f, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x8e, 0xff, 0xff, 0xeb, 0xef, 0x77, 0xa0, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x8e, 0x34, 0xfb, 0xab, 0xc9, 0x01, 0xa0, 0xad, 0xbf, 0x39, 0xfc, 0xff, 0xff, 0x03, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x04, 0x8c, 0x21, 0xc4, 0xff, 0x7f, 0x00, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0xac, 0x1c, 0x19, 0x04, 0x56, 0x02, 0x02, 0x00, 0x20 +.byte 0x67, 0x93, 0xd7, 0xff, 0xf4, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00 +.byte 0x8e, 0xff, 0xff, 0xeb, 0xef, 0x77, 0xa0, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x8e, 0xff, 0xff, 0xeb, 0xef, 0x77, 0xa0, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x8c, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +.byte 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x8e, 0xc5, 0x7f, 0x88, 0x8e, 0x1b, 0xa0, 0xad, 0xbf, 0xe5, 0x2b, 0x00, 0x00, 0x02, 0x00, 0x20 +.byte 0xef, 0xd3, 0xd7, 0xff, 0xfe, 0x07, 0xf4, 0xff, 0xb9, 0xff, 0xf9, 0xee, 0x00, 0x01, 0x00, 0x00 +.byte 0x80, 0x35, 0xfb, 0xab, 0xc9, 0x01, 0x20, 0x28, 0x38, 0x00, 0x00, 0x00, 0x00, 0x62, 0x00, 0x28 +.byte 0x67, 0x93, 0xd7, 0x7f, 0xf0, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x39, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +.byte 0x8e, 0xff, 0xff, 0xeb, 0xef, 0x77, 0xa0, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 +.byte 0x8e, 0xfd, 0xff, 0xeb, 0xef, 0x3f, 0xa0, 0xfb, 0xbf, 0x3f, 0x1c, 0x00, 0x00, 0x02, 0x00, 0x20 +.byte 0xef, 0xd3, 0xd7, 0xff, 0xfe, 0x27, 0xfc, 0xff, 0xfb, 0xff, 0xf9, 0xee, 0x00, 0x01, 0x00, 0x00 +.byte 0x8e, 0xff, 0xff, 0xeb, 0xef, 0x7f, 0xa0, 0xfb, 0xbf, 0x3f, 0x1c, 0x00, 0x00, 0x02, 0x00, 0x20 +.byte 0x67, 0x93, 0xd7, 0xff, 0xf4, 0x07, 0xd0, 0xa1, 0x03, 0x37, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 + +.global gItemParaFileName +gItemParaFileName: @ 8109764 +.string "itempara\0" +.align 2,0 + +.global gUnknown_8109770 +gUnknown_8109770: @ 8109770 +.string "%s %d\0" +.align 2,0 + +.global gUnknown_8109778 +gUnknown_8109778: @ 8109778 +.string "%s\0" +.align 2,0 + +.global gUnknown_810977C +gUnknown_810977C: @ 810977C +@ replacing .incbin "baserom.gba", 0x0010977c, 0x8 +.string "%d {POKE}\0" + +.global gUnknown_8109784 +gUnknown_8109784: @ 8109784 +@ replacing .incbin "baserom.gba", 0x00109784, 0x8 +.byte 0x87, 0x44 +.asciz "%s\0" +.align 2,0 + +.global gUnknown_810978C +gUnknown_810978C: @ 810978C +@ replacing .incbin "baserom.gba", 0x0010978c, 0x8 +.byte 0x87, 0x41 +.asciz "%s\0" +.align 2,0 + +.global gUnknown_8109794 +gUnknown_8109794: @ 8109794 +@ replacing .incbin "baserom.gba", 0x00109794, 0x10 +.string "%s{UNK_MACRO_3D}%c{COLOR GREEN_RAW}%s{RESET}\0" +.align 2, 0 + +.global gUnknown_81097A4 +gUnknown_81097A4: @ 81097A4 +@ replacing .incbin "baserom.gba", 0x001097a4, 0xc +.string "%s{COLOR GREEN_RAW}%s{RESET}\0" +.align 2, 0 + +.global gPowersOfTen +gPowersOfTen: @ 81097B0 +@ replacing .incbin "baserom.gba", 0x001097b0, 0x14 +.byte 0xa0, 0x86, 0x01, 0x00, 0x10, 0x27, 0x00, 0x00, 0xe8, 0x03, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00 + +.global gHighDigits +gHighDigits: @ 81097C4 +.byte 0x83 + +.global gUnknown_81097C5 +gUnknown_81097C5: @ 81097C5 +.byte 0x9f, 0x83, 0xa0, 0x83, 0xa1, 0x83, 0xa2, 0x83, 0xa3, 0x83, 0xa4, 0x83, 0xa5, 0x83, 0xa6, 0x83, 0xa7, 0x83, 0xa8, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x97, 0x10, 0x08 + +.global gGummiStatBoostLUT +gGummiStatBoostLUT: @ 81097E0 +.2byte 1 +.2byte 2 +.2byte 4 +.2byte 8 + +.global gUnknown_81097E8 +gUnknown_81097E8: @ 81097E8 +.byte 0x10, 0x00, 0x00, 0x00 +.byte 0x12, 0x00, 0x00, 0x00 +.byte 0x14, 0x00, 0x00, 0x00 +.byte 0x16, 0x00, 0x00, 0x00 + +.global gUnknown_81097F8 +gUnknown_81097F8: @ 81097F8 +.byte 0x11, 0x00, 0x00, 0x00 +.byte 0x13, 0x00, 0x00, 0x00 +.byte 0x15, 0x00, 0x00, 0x00 +.byte 0x17, 0x00, 0x00, 0x00 +@ START rescue_team_info.c +.string "pksdir0\0" + +.global gRescueRankMaxPoints +gRescueRankMaxPoints: @ 8109810 +.4byte 50 +.4byte 500 +.4byte 1500 +.4byte 3000 +.4byte 7500 +.4byte 15000 +.4byte 100000000 + +.global gTeamNamePlaceholder +gTeamNamePlaceholder: @ 810982C +.string "Pokémon\0" +@ END rescue_team_info.c +@ text_util +.string "pksdir0\0" + +.global gUnknown_810983C +gUnknown_810983C: @ 810983C +.4byte gUnknown_8109888 +.4byte gUnknown_8109884 +.4byte gUnknown_8109880 +.4byte gUnknown_810987C +.4byte gUnknown_8109878 +.4byte gUnknown_8109874 +.4byte gUnknown_8109870 +.4byte gUnknown_810986C +.4byte gUnknown_8109868 +.4byte gUnknown_8109864 + +.global gUnknown_8109864 +gUnknown_8109864: @ 8109864 +.byte 0x82, 0x58, 0x00, 0x00 + +.global gUnknown_8109868 +gUnknown_8109868: @ 8109868 +.byte 0x82, 0x57, 0x00, 0x00 + +.global gUnknown_810986C +gUnknown_810986C: @ 810986C +.byte 0x82, 0x56, 0x00, 0x00 + +.global gUnknown_8109870 +gUnknown_8109870: @ 8109870 +.byte 0x82, 0x55, 0x00, 0x00 + +.global gUnknown_8109874 +gUnknown_8109874: @ 8109874 +.byte 0x82, 0x54, 0x00, 0x00 + +.global gUnknown_8109878 +gUnknown_8109878: @ 8109878 +.byte 0x82, 0x53, 0x00, 0x00 + +.global gUnknown_810987C +gUnknown_810987C: @ 810987C +.byte 0x82, 0x52, 0x00, 0x00 + +.global gUnknown_8109880 +gUnknown_8109880: @ 8109880 +.byte 0x82, 0x51, 0x00, 0x00 + +.global gUnknown_8109884 +gUnknown_8109884: @ 8109884 +.byte 0x82, 0x50, 0x00, 0x00 + +.global gUnknown_8109888 +gUnknown_8109888: @ 8109888 +.byte 0x82, 0x4f, 0x00, 0x00 +@ ??? +.string "pksdir0\0" +@ ??? +.string "pksdir0\0" +@ START friend_area.c +.string "pksdir0\0" + +.global sUnknown_81098A4 +sUnknown_81098A4: @ 81098A4 +.string "{color GREEN_RAW}%s{reset}\0" +.align 2,0 + +.global sUnknown_81098AC +sUnknown_81098AC: @ 81098AC +.string "%s{UNK_MACRO_3D}%c{COLOR GREEN_RAW}%s{RESET}\0" +.align 2,0 +@ END friend_area.c +@ moves.c +.string "pksdir0" +.align 2,0 + +.global gUnknown_81098C4 +gUnknown_81098C4: @ 81098C4 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + +.global gUnknown_81098D0 +gUnknown_81098D0: @ 81098D0 +.string "wazapara\0" +.align 2,0 + +.global gUnknown_81098DC +gUnknown_81098DC: @ 81098DC +.string "%+d\0" + +.global gUnknown_81098E0 +gUnknown_81098E0: @ 81098E0 +.string "{color}%c%s%s{reset}\0" +.align 2,0 + +.global gUnknown_81098EC +gUnknown_81098EC: @ 81098EC +.string "{color}%c#:%s%s%s#;%c%2d/%2d{reset}\0" +.align 2,0 + +.global gUnknown_8109908 +gUnknown_8109908: @ 8109908 +.byte 0x87, 0x41, 0x00, 0x00 @ apparently shows A in memory viewer + +.global gUnknown_810990C +gUnknown_810990C: @ 810990C +.byte 0x87, 0x40, 0x00, 0x00 @ apparently shows @ in memory viewer + +.global gUnknown_8109910 +gUnknown_8109910: @ 8109910 +.string "{color}%c%s%s%s{UNK_MACRO_3D}%c%2d/%2d{reset}\0" +.align 2,0 + +.global gUnknown_8109928 +gUnknown_8109928: @ 8109928 +.byte 0x87, 0x42, 0x00 @ apparently shows B in memory viewer + +.global gUnknown_810992B +gUnknown_810992B: @ 810992B +.byte 0x00 + +.global gUnknown_810992C +gUnknown_810992C: @ 810992C +.string "%s\0" +.align 2,0 + +.global gUnknown_8109930 +gUnknown_8109930: @ 8109930 +.string "{POKEMON_0}\0" +.align 2,0 +@ ??? +.string "pksdir0\0" +.align 2,0 +@ ??? +.string "pksdir0\0" +.align 2,0 +@ ??? +.string "pksdir0\0" +.align 2,0 diff --git a/data/move/move_names.s b/data/move/move_names.s index e6e22777..de1baa25 100644 --- a/data/move/move_names.s +++ b/data/move/move_names.s @@ -275,7 +275,7 @@ MoveUseTextBide: .global MoveNameBide2 MoveNameBide2: -.string "がみん\0" +.string "がまん\0" .align 2,0 .global MoveDescriptionIsWatching @@ -285,7 +285,7 @@ MoveDescriptionIsWatching: .global MoveNameIsWatching MoveNameIsWatching: -.string "ようすをまる\0" +.string "ようすをみる\0" .align 2,0 .global MoveUseTextRegularAttack diff --git a/include/code_800F958.h b/include/code_800F958.h new file mode 100644 index 00000000..884e9a7f --- /dev/null +++ b/include/code_800F958.h @@ -0,0 +1,8 @@ +#ifndef GUARD_CODE_800F958_H +#define GUARD_CODE_800F958_H + +#include "structs/str_position.h" + +void AddPokemonDungeonSprite(s32 id, s16 species, Position *pos, u32); + +#endif // GUARD_CODE_800F958_H \ No newline at end of file diff --git a/include/code_8041AD0.h b/include/code_8041AD0.h index 626fe14b..0a0a1ac1 100644 --- a/include/code_8041AD0.h +++ b/include/code_8041AD0.h @@ -4,6 +4,7 @@ #include "structs/dungeon_entity.h" #include "structs/str_damage.h" -void sub_80420E8(Entity *pokemon, struct DamageStruct *dmgStruct); +void sub_80420E8(Entity *pokemon, DamageStruct *dmgStruct); +void sub_80421C0(Entity *pokemon, u16); -#endif +#endif // GUARD_CODE_8041AD0_H \ No newline at end of file diff --git a/include/code_8045A00.h b/include/code_8045A00.h index df17445c..7649e997 100644 --- a/include/code_8045A00.h +++ b/include/code_8045A00.h @@ -5,4 +5,6 @@ void SetMessageArgument(u8 *buffer, Entity *entity, u32 param_3); -#endif // GUARD_CODE_8045A00_H +void sub_8045ACC(void); + +#endif // GUARD_CODE_8045A00_H \ No newline at end of file diff --git a/include/code_8092334.h b/include/code_8092334.h index 3a2fe8e5..3c7e6c1e 100644 --- a/include/code_8092334.h +++ b/include/code_8092334.h @@ -1,14 +1,7 @@ #ifndef GUARD_CODE_8092334_H #define GUARD_CODE_8092334_H -// size: 0x10 -typedef struct DataSerializer -{ - u8 *stream; - u8 *end; // exclusive end of the stream - u32 count; // Used to count bits between ReadBits functions, or count bytes between ReadBytes functions - u32 unkC; // Seems to be a temporary 32 bit storage -} DataSerializer; +#include "data_serializer.h" void nullsub_102(DataSerializer *seri); void ReadBits(DataSerializer *seri, void *dst, s32 numBits); diff --git a/include/data_serializer.h b/include/data_serializer.h new file mode 100644 index 00000000..4398a28d --- /dev/null +++ b/include/data_serializer.h @@ -0,0 +1,13 @@ +#ifndef GUARD_DATA_SERIALIZER_H +#define GUARD_DATA_SERIALIZER_H + +// size: 0x10 +typedef struct DataSerializer +{ + u8 *stream; + u8 *end; // Exclusive end of the stream + u32 count; // Used to count bits between ReadBits functions, or count bytes between ReadBytes functions + u32 unkC; // Seems to be a temporary 32 bit storage +} DataSerializer; + +#endif // GUARD_DATA_SERIALIZER_H \ No newline at end of file diff --git a/include/dungeon_map_access.h b/include/dungeon_map_access.h index 45ea6a24..d95b1201 100644 --- a/include/dungeon_map_access.h +++ b/include/dungeon_map_access.h @@ -10,6 +10,8 @@ typedef struct unkStruct_202F190 Tile *GetTile(s32 x, s32 y); Tile *GetTileSafe(s32 x, s32 y); + +void sub_8049ED4(void); void sub_804AC20(Position *pos); -#endif +#endif // GUARD_DUNGEON_MAP_ACCESS_H \ No newline at end of file diff --git a/include/dungeon_serializer.h b/include/dungeon_serializer.h new file mode 100644 index 00000000..93955b4d --- /dev/null +++ b/include/dungeon_serializer.h @@ -0,0 +1,11 @@ +#ifndef GUARD_DUNGEON_SERIALIZER_H +#define GUARD_DUNGEON_SERIALIZER_H + +#include "data_serializer.h" + +void ReadDungeonState(u8 *buffer, u32 bufLen); +void SaveDungeonState(u8 *buffer, u32 bufLen); + +void sub_8082B40(void); + +#endif // GUARD_DUNGEON_SERIALIZER_H \ No newline at end of file diff --git a/include/pokemon.h b/include/pokemon.h index 2424fb24..ec99ed9f 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -36,7 +36,7 @@ void LoadMonsterParameters(void); unkStruct_203B45C *GetRecruitedPokemon(void); void InitializeRecruitedPokemon(void); -// These two need to be overridden in status_actions.c +// This needs to be overridden in status_actions.c // Uncomment when fixed //u8 GetBodySize(s16 index); diff --git a/include/structs/dungeon_entity.h b/include/structs/dungeon_entity.h index 8bed713a..712807bb 100644 --- a/include/structs/dungeon_entity.h +++ b/include/structs/dungeon_entity.h @@ -2,6 +2,7 @@ #define GUARD_DUNGEON_ENTITY_H #include "constants/global.h" +#include "constants/dungeon_action.h" #include "structs/str_position.h" #include "sprite.h" #include "structs/str_items.h" @@ -28,10 +29,11 @@ #define NUM_PICKED_IQ_SKILLS 3 +// size: 0x8 typedef struct unkStruct_8044CC8 { - u8 actionUseIndex; - Position lastItemThrowPosition; + /* 0x0 */ u8 actionUseIndex; + /* 0x4 */ Position lastItemThrowPosition; } unkStruct_8044CC8; // size: 0x18 @@ -46,18 +48,21 @@ typedef struct ActionContainer /* 0x14 */ Position itemTargetPosition; } ActionContainer; +// size: 0x4 typedef struct HiddenPower { /* 0x0 */ s16 hiddenPowerBasePower; /* 0x2 */ u8 hiddenPowerType; } HiddenPower; +// size: 0x4 typedef struct JoinedAt { /* 0x0 */ u8 joinedAt; /* 0x1 */ u8 unk1; } JoinedAt; +// size: 0x14 typedef struct AITarget { /* 0x0 */ u8 aiObjective; @@ -68,15 +73,16 @@ typedef struct AITarget /* 0x8 */ struct Entity *aiTarget; /* 0xC */ u32 unkC; /* 0x10 */ Position aiTargetPos; - } AITarget; +// size: 0x4 typedef struct Sleep { /* 0x0 */ u8 sleep; /* 0x1 */ u8 sleepTurns; } Sleep; +// size: 0x4 typedef struct NonVolatile { /* 0x0 */ u8 nonVolatileStatus; @@ -85,6 +91,7 @@ typedef struct NonVolatile /* 0x3 */ u8 unk4; } NonVolatile; +// size: 0xC typedef struct Immobilize { /* 0x0 */ u8 immobilizeStatus; @@ -93,12 +100,14 @@ typedef struct Immobilize /* 0x9 */ u8 immobilizeStatusDamageCountdown; } Immobilize; +// size: 0x4 typedef struct Volatile { /* 0x0 */ u8 volatileStatus; /* 0x1 */ u8 volatileStatusTurns; } Volatile; +// size: 0x4 typedef struct Charging { /* 0x0 */ u8 chargingStatus; @@ -106,60 +115,68 @@ typedef struct Charging /* 0x2 */ u8 chargingStatusMoveIndex; // The position of the move in the Pokémon's moveset that triggered the status. } Charging; +// size: 0x4 typedef struct Protection { /* 0x0 */ u8 protectionStatus; /* 0x1 */ u8 protectionStatusTurns; } Protection; +// size: 0x8 typedef struct Waiting { - /* 0xC8 */ u8 waitingStatus; - /* 0xC9 */ bool8 enemyDecoy; // True if the Pokémon is a decoy and a wild Pokémon (i.e., not an allied Pokémon). - u8 unkCA; - /* 0xCB */ u8 waitingStatusTurns; - /* 0xCC */ u8 curseDamageCountdown; + /* 0x0 */ u8 waitingStatus; + /* 0x1 */ bool8 enemyDecoy; // True if the Pokémon is a decoy and a wild Pokémon (i.e., not an allied Pokémon). + /* 0x2 */ bool8 unk2; + /* 0x3 */ u8 waitingStatusTurns; + /* 0x4 */ u8 curseDamageCountdown; } Waiting; +// size: 0xC typedef struct Linked { - /* 0xD0 */ u8 linkedStatus; - /* 0xD4 */ u32 unkD4; - /* 0xD8 */ u8 unkD8; - /* 0xD9 */ u8 linkedStatusTurns; - /* 0xDA */ u8 linkedStatusDamageCountdown; + /* 0x0 */ u8 linkedStatus; + /* 0x4 */ u32 unk4; + /* 0x8 */ u8 unk8; + /* 0x9 */ u8 linkedStatusTurns; + /* 0xA */ u8 linkedStatusDamageCountdown; } Linked; - +// size: 0x4 typedef struct MoveStatus { - /* 0xDC */ u8 moveStatus; - /* 0xDD */ u8 moveStatusTurns; + /* 0x0 */ u8 moveStatus; + /* 0x0 */ u8 moveStatusTurns; } MoveStatus; +// size: 0x4 typedef struct ItemStatus { - /* 0xE0 */ u8 itemStatus; + /* 0x0 */ u8 itemStatus; } ItemStatus; +// size: 0x4 typedef struct TransformStatus { - /* 0xE4 */ u8 transformStatus; - /* 0xE5 */ u8 transformStatusTurns; + /* 0x0 */ u8 transformStatus; + /* 0x0 */ u8 transformStatusTurns; } TransformStatus; +// size: 0x4 typedef struct EyesightStatus { - /* 0xE8 */ u8 eyesightStatus; - /* 0xE9 */ u8 eyesightStatusTurns; + /* 0x0 */ u8 eyesightStatus; + /* 0x0 */ u8 eyesightStatusTurns; } EyesightStatus; +// size: 0x4 typedef struct Muzzled { - /* 0xEC */ bool8 muzzled; - /* 0xED */ u8 muzzledTurns; + /* 0x0 */ bool8 muzzled; + /* 0x1 */ u8 muzzledTurns; } Muzzled; +// size: 0x1C typedef struct Unk_Entity_x184 { /* 0x184 - 0x0 */ Position previousTargetMovePosition1; @@ -169,12 +186,13 @@ typedef struct Unk_Entity_x184 /* 0x194 - 0x10*/ Position32 lastMoveIncrement; /* 0x19C - 0x18 */ s16 walkAnimFramesLeft; // Set when the Pokémon starts moving, and counts down until the Pokémon's walk animation stops. /* 0x19e - 0x1a */ u8 unk1A; -} Unk_Entity_x184 ; +} Unk_Entity_x184; +// size: 0x24 typedef struct Moves { - /* 0x118 */ Move moves[MAX_MON_MOVES]; - /* 0x138 */ u8 struggleMoveFlags; + /* 0x0 */ Move moves[MAX_MON_MOVES]; + /* 0x20 */ u8 struggleMoveFlags; } Moves; // size: 0x208 diff --git a/include/structs/str_damage.h b/include/structs/str_damage.h index 6003f0df..571d4d76 100644 --- a/include/structs/str_damage.h +++ b/include/structs/str_damage.h @@ -1,7 +1,8 @@ #ifndef GUARD_STR_DAMAGE_H #define GUARD_STR_DAMAGE_H -struct DamageStruct +// size: 0x10 +typedef struct DamageStruct { s32 dmg; s32 residualDmgType; @@ -10,6 +11,6 @@ struct DamageStruct bool8 isCrit; u8 unkE; bool8 tookNoDamage; -}; +} DamageStruct; -#endif +#endif // GUARD_STR_DAMAGE_H \ No newline at end of file diff --git a/include/structs/str_dungeon.h b/include/structs/str_dungeon.h index 3ea209be..08200e67 100644 --- a/include/structs/str_dungeon.h +++ b/include/structs/str_dungeon.h @@ -24,17 +24,17 @@ typedef struct DungeonLocation /* 0x1 */ u8 floor; } DungeonLocation; +// size: 0x18 typedef struct Weather { - /* 0xE264 */ u8 weather; // Uses the weather constants in weather.h. - u8 unkE265; // Uses the weather constants in weather.h - /* 0xE266 */ u8 weatherDamageCounter; // Timer for applying sandstorm/hail damage periodically. - /* 0xE267 */ u8 unkE267[8]; - /* 0xE26F */ u8 naturalWeather[8]; // The weather at the start of the floor. If the weather changes, then expires, revert back to the starting weather. - /* 0xE277 */ u8 mudSportTurns; - /* 0xE278 */ u8 waterSportTurns; - /* 0xE279 */ bool8 nullifyWeather; // Air Lock and Cloud Nine toggle this to disable weather effects - + /* 0x0 */ u8 weather; // Uses the weather constants in weather.h. + /* 0x1 */ u8 unkE265; // Uses the weather constants in weather.h + /* 0x2 */ u8 weatherDamageCounter; // Timer for applying sandstorm/hail damage periodically. + /* 0x3 */ u8 unkE267[8]; + /* 0xB */ u8 naturalWeather[8]; // The weather at the start of the floor. If the weather changes, then expires, revert back to the starting weather. + /* 0x13 */ u8 mudSportTurns; + /* 0x14 */ u8 waterSportTurns; + /* 0x15 */ bool8 nullifyWeather; // Air Lock and Cloud Nine toggle this to disable weather effects } Weather; // size: 0x30 @@ -66,6 +66,8 @@ typedef struct DungeonMusicPlayer /* 0x0 */ u32 state; /* 0x4 */ u32 fadeOutSpeed; /* 0x8 */ u16 fadeInSpeed; + + // dungeon_serializer.c refers to these 3 as s16, but they are almost always handled as u16 /* 0xA */ u16 songIndex; /* 0xC */ u16 pastSongIndex; /* 0xE */ u16 queuedSongIndex; @@ -85,15 +87,15 @@ typedef struct UnkDungeonGlobal_unk181E8_sub u8 unk18208; // x20 /* 0x18209 */ u8 visibilityRange; // x21 Dungeon light level. /* 0x1820A */ bool8 blinded; // x22 Blacks out the screen when the player has the Blinker status. - u8 unk1820B; // x23 - u8 unk1820C; // x24 - u8 unk1820D; // x25 - u8 unk1820E; // x26 - u8 unk1820F; // x27 + bool8 unk1820B; // x23 + bool8 unk1820C; // x24 + bool8 unk1820D; // x25 + bool8 unk1820E; // x26 + bool8 unk1820F; // x27 /* 0x18210 */ bool8 hallucinating; // x28 Displays Substitute and flower sprites when the player has the Cross-Eyed status. - u8 unk18211; // x29 + bool8 unk18211; // x29 u8 unk18212; // x2A - u8 unk18213; // x2B + bool8 unk18213; // x2B u8 unk18214; // x2C u8 unk18215; // x2D u8 unk18216; // x2E @@ -281,6 +283,22 @@ typedef struct unkDungeon644 /* 0x55 */ u8 unk55; } unkDungeon644; +// size: 0x10 +typedef struct unkDungeonE240 +{ + /* 0x0 */ u32 unk0; + /* 0x4 */ u32 unk4; + /* 0x8 */ u32 unk8; + /* 0xC */ u32 unkC; +} unkDungeonE240; + +// size: 0x4 +typedef struct unkDungeonE260 +{ + /* 0x0 */ u16 unk0; + /* 0x2 */ u16 unk2; +} unkDungeonE260; + // size: 0x1CEDC typedef struct Dungeon { @@ -315,7 +333,7 @@ typedef struct Dungeon /* 0x5C0 */ s32 unk5C0; /* 0x5C4 */ struct unkStruct_Dungeon5C4_sub unk5C4[3]; /* 0x5F4 */ u8 faintStringBuffer[80]; - unkDungeon644 unk644; // This data persists between save/reload. See sub_8080B90 and sub_8081C50 + unkDungeon644 unk644; EntityInfo unk69C[MAX_TEAM_MEMBERS]; EntityInfo unkEBC[DUNGEON_MAX_WILD_POKEMON_BODY_SIZE]; u8 fill2F3C[0x343C - 0x2F3C]; @@ -331,17 +349,18 @@ typedef struct Dungeon /* 0x37F8 */ bool8 plusIsActive[2]; // Index 0: Enemy , Index 1: Team /* 0x37FA */ bool8 minusIsActive[2]; // Index 0: Enemy , Index 1: Team /* 0x37FC */ bool8 decoyActive; - /* 0x37FD */ u8 unk37FD; + /* 0x37FD */ bool8 unk37FD; /* 0x37FE */ bool8 deoxysDefeat; // Flag set for deoxys in Meteor Cave - /* 0x37FE */ u8 unk37FF; - s16 unk3800; - EntityInfo *unk3804[DUNGEON_MAX_ITEMS]; + /* 0x37FE */ bool8 unk37FF; + // dungeon_serializer.c refers to this as a u16 but elsewhere it's handled as a s16 + /* 0x3800 */ s16 deoxysForm; + EntityInfo *unk3804[DUNGEON_MAX_ITEMS]; // TODO: ItemInfo[DUNGEON_MAX_ITEMS] /* 0x3904 */ s16 unk3904; - EntityInfo *unk3908[DUNGEON_MAX_TRAPS]; - /* 0x3A08 */ u8 unk3A08; - /* 0x3A09 */ u8 unk3A09; - /* 0x3A0A */ u8 unk3A0A; - /* 0x3A0B */ u8 unk3A0B; + EntityInfo *unk3908[DUNGEON_MAX_TRAPS]; // TODO: TrapInfo[DUNGEON_MAX_TRAPS] + /* 0x3A08 */ bool8 unk3A08; + /* 0x3A09 */ bool8 unk3A09; + /* 0x3A0A */ bool8 unk3A0A; + /* 0x3A0B */ bool8 unk3A0B; u8 unk3A0C; /* 0x3A0D */ u8 unk3A0D; /* 0x3A0E */ s16 tileset; @@ -353,9 +372,9 @@ typedef struct Dungeon Position unkE218; Position unkE21C; // stair location? Position unkE220[8]; - u32 unkE240[4]; - u32 unkE250[4]; - u16 unkE260[2]; + unkDungeonE240 unkE240; + unkDungeonE240 unkE250; + unkDungeonE260 unkE260; /* 0xE264 */ Weather weather; // Uses the weather constants in weather.h. /* 0xE27C */ Tile unkE27C[8][8]; /* 0xE87C */ u8 unkE87C[8][8]; diff --git a/ld_script.txt b/ld_script.txt index 19b2ea34..ab9d054e 100755 --- a/ld_script.txt +++ b/ld_script.txt @@ -278,8 +278,7 @@ SECTIONS { src/trap.o(.text); asm/code_807FCD4.o(.text); src/trap_1.o(.text); - asm/code_8080CF0.o(.text); - src/code_8083288.o(.text); + src/dungeon_serializer.o(.text); src/dungeon_range.o(.text); src/code_808333C.o(.text); src/dungeon_leader.o(.text); @@ -557,6 +556,8 @@ SECTIONS { src/dungeon_capabilities.o(.rodata); src/dungeon_ai_targeting.o(.rodata); data/data_8107010.o(.rodata); + src/dungeon_serializer.o(.rodata); + data/data_8107224.o(.rodata); src/game_options.o(.rodata); data/data_8109964.o(.rodata); src/code_80972F4.o(.rodata); diff --git a/src/code_800F958.c b/src/code_800F958.c index fbce6748..1538ea51 100644 --- a/src/code_800F958.c +++ b/src/code_800F958.c @@ -1,4 +1,5 @@ #include "global.h" +#include "code_800F958.h" #include "dungeon_pokemon_sprites.h" #include "memory.h" @@ -7,7 +8,8 @@ extern DungeonPokemonSprite* GetDungeonPokemonSprite(s32 id); extern Position gUnknown_80D3564; -void AddPokemonDungeonSprite(s32 id, s16 species, Position *pos, u32 r3) { +void AddPokemonDungeonSprite(s32 id, s16 species, Position *pos, u32 r3) +{ DungeonPokemonSprite *dSprite; DungeonPokemonSprite *newSprite; Position newPos; diff --git a/src/code_803E724.c b/src/code_803E724.c index e8c45e0a..7c923320 100644 --- a/src/code_803E724.c +++ b/src/code_803E724.c @@ -64,7 +64,6 @@ extern u32 gUnknown_3001018[]; extern void sub_8040A84(); extern void sub_8083D44(void); -extern void sub_8049ED4(void); extern void sub_8040A84(void); extern void sub_80400D4(void); extern void sub_8041888(u8 param_1); diff --git a/src/code_8040094.c b/src/code_8040094.c index e54661ad..d59122eb 100644 --- a/src/code_8040094.c +++ b/src/code_8040094.c @@ -19,7 +19,6 @@ extern OpenedFile *gUnknown_202EE04; extern void sub_803F7BC(void); extern void sub_803F580(u32); -extern void sub_8049ED4(); extern void sub_8040A84(); extern const char *gUnknown_80FD040; // It became brighter on the floor diff --git a/src/code_8041AD0.c b/src/code_8041AD0.c index c9f2733c..9a0baa45 100644 --- a/src/code_8041AD0.c +++ b/src/code_8041AD0.c @@ -37,7 +37,6 @@ extern void PlaySoundEffect(u32); extern u8 sub_803F428(Position *pos); extern void sub_8041550(Entity *pokemon, u32, u32, u32, u32, u32); -void sub_80421C0(Entity *pokemon, u16 r1); void EntityUpdateStatusSprites(Entity *entity); extern s32 gDungeonBrightness; diff --git a/src/code_804267C.c b/src/code_804267C.c index 6af03624..20379e4e 100644 --- a/src/code_804267C.c +++ b/src/code_804267C.c @@ -1,6 +1,6 @@ #include "global.h" +#include "code_8041AD0.h" #include "code_804267C.h" - #include "code_803E46C.h" #include "code_803E668.h" #include "code_8045A00.h" @@ -24,7 +24,6 @@ extern void sub_8040238(void); extern void sub_804151C(Entity *pokemon, u32 r1, u8 r2); extern void sub_804178C(u32); extern void sub_80416A4(Position *r0, u32 r1, bool8 r2); -extern void sub_80421C0(Entity *pokemon, u16 r1); extern void sub_80429A0(Entity *); extern void sub_8042B34(u32, u32, u32); extern bool8 sub_8042CC0(void); diff --git a/src/code_8042B34.c b/src/code_8042B34.c index 84f43a33..ddc1fe7c 100644 --- a/src/code_8042B34.c +++ b/src/code_8042B34.c @@ -35,6 +35,7 @@ #include "constants/dungeon.h" #include "constants/monster.h" #include "constants/trap.h" +#include "dungeon_serializer.h" extern void sub_800EE5C(s32); extern void sub_800EF64(void); @@ -243,7 +244,7 @@ void sub_8042EC8(Entity *a0, s32 a1) } extern u8 gUnknown_203B40C; -extern u16 gUnknown_203B410; +extern Position gUnknown_203B410; extern u8 *gSerializedData_203B41C; struct Substruct_xxx_dungeon_8042F6C @@ -332,13 +333,11 @@ extern void sub_80521D0(void); extern void sub_803F27C(u8); extern void sub_807E7FC(u8); extern void sub_80095CC(u32, u32); -extern void ReadDungeonState(u8 *r0, u32 r1); extern bool8 IsLevelResetTo1(u8 dungeon); extern void sub_8068A84(PokemonStruct1 *pokemon); extern void sub_807EAA0(u32, u32); extern void sub_803D4D0(void); extern void sub_80842F0(void); -extern void sub_8082B40(void); extern void sub_80427AC(void); extern void sub_806AA70(void); extern void sub_803D8F0(void); @@ -357,7 +356,6 @@ extern void sub_8045CB0(void); extern void sub_807FA18(void); extern void sub_806A974(void); extern void sub_806CF60(void); -extern void sub_8049ED4(void); extern void sub_8049884(void); extern void sub_8068F80(void); extern bool8 sub_8044B28(void); @@ -371,7 +369,6 @@ extern void sub_803EAF0(u32, u32); extern void sub_806A914(u8 a0, u8 a1, u8 a2); extern void sub_803F4A0(Entity *a0); extern void sub_8083AB0(s16 param_0, Entity * target, Entity * entity); -extern void WriteDungeonState(u8 *param_1,u32 param_2); extern void sub_8046F84(s32 itemFlag); extern bool8 sub_8083C50(void); extern void sub_8068FE0(Entity *, u32, Entity *r2); @@ -400,7 +397,7 @@ extern const u8 *const gUnknown_80F89B4; extern const u8 *const gUnknown_80F89D4; extern const u8 *const gUnknown_80F89D8; -extern const s16 gUnknown_80F6850[]; +extern const s16 gUnknown_80F6850[4]; extern const s16 gDungeonMusic[]; extern OpenedFile *gDungeonNameBannerPalette; @@ -433,8 +430,8 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) dungeonPtr[i] = 0; } - gUnknown_203B410 = 0; // Needed to match - gUnknown_203B410 = 100; + gUnknown_203B410.x = 0; // Needed to match + gUnknown_203B410.x = 100; if (!r6) { gDungeon->unk644.unk34 = r8->unkF; @@ -565,7 +562,7 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) rnd = DungeonRandInt(4); gDungeon->unk37FD = 0; gDungeon->deoxysDefeat = FALSE; - gDungeon->unk3800 = gUnknown_80F6850[rnd]; + gDungeon->deoxysForm = gUnknown_80F6850[rnd]; gDungeon->unk37FF = 0; gDungeon->unk644.unk31 = 0; } @@ -824,7 +821,7 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) gUnknown_203B40C = 0; if (gDungeon->unk3 != 0) { - WriteDungeonState(gSerializedData_203B41C, 0x4800); + SaveDungeonState(gSerializedData_203B41C, 0x4800); r8->unk7C = 3; r8->unk80 = gDungeon->unk644.dungeonLocation; check = FALSE; @@ -834,7 +831,7 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) s16 var; if (gDungeon->unk6 != 0) { - WriteDungeonState(gSerializedData_203B41C, 0x4800); + SaveDungeonState(gSerializedData_203B41C, 0x4800); } else { sub_8046F84(ITEM_FLAG_IN_SHOP); diff --git a/src/code_8048480.c b/src/code_8048480.c index 50a17f16..0ebdbd50 100644 --- a/src/code_8048480.c +++ b/src/code_8048480.c @@ -1,5 +1,6 @@ #include "global.h" #include "code_803E668.h" +#include "code_8041AD0.h" #include "code_8045A00.h" #include "dungeon_message.h" #include "code_8077274_1.h" @@ -85,7 +86,6 @@ extern u8 *gUnknown_80F9BD8[]; #include "data/code_8048480.h" -extern void sub_80421C0(Entity *r0, u16 r1); extern void sub_8078B5C(Entity *, Entity *, u32, u32, u32); extern u8 sub_806A538(s32); extern void sub_8051E7C(Entity *pokemon); diff --git a/src/code_805D8C8.c b/src/code_805D8C8.c index f1fe58cc..c81938b6 100644 --- a/src/code_805D8C8.c +++ b/src/code_805D8C8.c @@ -2,6 +2,7 @@ #include "code_805D8C8.h" #include "structs/str_dungeon.h" #include "dungeon_util.h" +#include "pokemon.h" // monster_sbin.s extern const struct FileArchive gMonsterFileArchive; @@ -35,14 +36,14 @@ void sub_80687AC(void) OpenedFile *GetSpriteData(s16 species) { - s32 species32 = species; + s32 species32 = SpeciesId(species); return gDungeon->sprites[species32]; } -static void EnsureSpriteLoaded(s32 _id) +static void EnsureSpriteLoaded(s32 _id) // TODO: Should this param be s16? If so, the castform part of LoadPokemonSprite is preventing us { - u8 name [12]; - s32 id = (s16)_id; + u8 name[12]; + s32 id = SpeciesId(_id); if (gDungeon->sprites[id] == NULL) { sprintf(name, gUnknown_8106EA0, id); @@ -52,20 +53,35 @@ static void EnsureSpriteLoaded(s32 _id) void LoadPokemonSprite(s16 id, bool32 a1) { - s32 id_s32 = id; + s32 id_s32 = SpeciesId(id); bool8 param_2 = a1; - if (!param_2 && - (id_s32 == MONSTER_DEOXYS_NORMAL || id_s32 == MONSTER_DEOXYS_ATTACK || id_s32 == MONSTER_DEOXYS_DEFENSE || id_s32 == MONSTER_DEOXYS_SPEED)) { + if (!param_2 && (id_s32 == MONSTER_DEOXYS_NORMAL || id_s32 == MONSTER_DEOXYS_ATTACK || id_s32 == MONSTER_DEOXYS_DEFENSE || id_s32 == MONSTER_DEOXYS_SPEED)) { EnsureDeoxysLoaded(); } else { EnsureSpriteLoaded(id_s32); - // >= MONSTER_CASTFORM && <= MONSTER_CASTFORM_RAINY + if ((u16)(id_s32 - MONSTER_CASTFORM) < 4) EnsureCastformLoaded(); } } +/*void LoadPokemonSprite(s16 id, bool8 a1) +{ + s32 id_s32 = SpeciesId(id); + + if (!a1 && (id_s32 == MONSTER_DEOXYS_NORMAL || id_s32 == MONSTER_DEOXYS_ATTACK || id_s32 == MONSTER_DEOXYS_DEFENSE || id_s32 == MONSTER_DEOXYS_SPEED)) { + EnsureDeoxysLoaded(); + } + else { + EnsureSpriteLoaded(id); + + // TODO: >= MONSTER_CASTFORM && <= MONSTER_CASTFORM_RAINY + if (id_s32 == MONSTER_CASTFORM || id_s32 == MONSTER_CASTFORM_SNOWY || id_s32 == MONSTER_CASTFORM_SUNNY || id_s32 == MONSTER_CASTFORM_RAINY) + //if ((u16)(id_s32 - MONSTER_CASTFORM) < 4) + EnsureCastformLoaded(); + } +}*/ static void EnsureCastformLoaded(void) { @@ -77,7 +93,7 @@ static void EnsureCastformLoaded(void) static void EnsureDeoxysLoaded(void) { - EnsureSpriteLoaded(gDungeon->unk3800); + EnsureSpriteLoaded(gDungeon->deoxysForm); } void CloseAllSpriteFiles(void) diff --git a/src/code_805D8C8_1.c b/src/code_805D8C8_1.c index ee7b804a..bc9c07e9 100644 --- a/src/code_805D8C8_1.c +++ b/src/code_805D8C8_1.c @@ -79,7 +79,6 @@ void sub_805E738(Entity *a0); void sub_803E708(s32 a0, s32 a1); void sub_8040A78(void); void sub_805E804(void); -void sub_8049ED4(void); void sub_8064BE0(void); void sub_8075680(u32); void sub_8094C88(void); diff --git a/src/code_8069E0C.c b/src/code_8069E0C.c index 20741ab5..3b228e59 100644 --- a/src/code_8069E0C.c +++ b/src/code_8069E0C.c @@ -23,12 +23,13 @@ struct unkStruct_80F520C { - u8 unk0; - u8 unk1; - s16 unk2; + u8 unk0; // types0 + u8 unk1; // Most likely just padding and should be removed + s16 unk2; // monsterID }; -extern struct unkStruct_80F520C gUnknown_80F520C[]; +// Castform Forecast ability data +extern struct unkStruct_80F520C gUnknown_80F520C[WEATHER_RANDOM]; extern u8 gUnknown_80F51E4[]; extern u8 *gUnknown_80FCC7C[]; @@ -93,17 +94,15 @@ void TriggerWeatherAbilities(void) } } -s32 sub_8069F54(Entity *pokemon, s16 param_2) +s32 GetMonsterApparentID(Entity *pokemon, s16 id) { - if ((((param_2 * 0x10000) + 0xfe880000U) >> 0x10) < 4) { - if (HasAbility(pokemon, ABILITY_FORECAST)) { - return gUnknown_80F520C[GetApparentWeather(pokemon)].unk2; + if (id == MONSTER_CASTFORM || id == MONSTER_CASTFORM_SNOWY || id == MONSTER_CASTFORM_SUNNY || id == MONSTER_CASTFORM_RAINY) { + if (HasAbility(pokemon, ABILITY_FORECAST)) + return gUnknown_80F520C[GetApparentWeather(pokemon)].unk2; + return MONSTER_CASTFORM; } - else { - return 0x178; - } - } - return param_2; + + return id; } static inline u8 sub_8069F9C_sub(Entity *pokemon) diff --git a/src/code_806CD90.c b/src/code_806CD90.c index a0414a9c..c0cea7dc 100644 --- a/src/code_806CD90.c +++ b/src/code_806CD90.c @@ -35,6 +35,7 @@ #include "code_8041AD0.h" #include "type_chart.h" #include "dungeon_message.h" +#include "dungeon_map_access.h" extern u8 gUnknown_202F221; @@ -288,7 +289,6 @@ extern bool8 DoEnemiesEvolveWhenKOed(u8 dungeon); extern bool8 sub_806FA5C(Entity *, Entity *, struct unkStruct_8069D4C *); extern void EntityUpdateStatusSprites(Entity *); extern bool8 sub_8045888(Entity *r0); -extern void sub_8049ED4(void); extern const s32 gUnknown_8106A4C; extern const s16 gUnknown_80F4E10; @@ -473,11 +473,11 @@ void HandleDealingDamage(Entity *attacker, Entity *target, struct DamageStruct * if (r9) { EntityInfo *targetInfo = GetEntInfo(target); if (targetInfo->linked.linkedStatus == STATUS_DESTINY_BOND) { - Entity *destBondTarget = gDungeon->allPokemon[targetInfo->linked.unkD8]; + Entity *destBondTarget = gDungeon->allPokemon[targetInfo->linked.unk8]; if (destBondTarget == NULL) { targetInfo->linked.linkedStatus = 0; } - else if (GetEntInfo(destBondTarget)->unk98 != targetInfo->linked.unkD4) { + else if (GetEntInfo(destBondTarget)->unk98 != targetInfo->linked.unk4) { targetInfo->linked.linkedStatus = 0; } else { diff --git a/src/code_80718D8.c b/src/code_80718D8.c index 93d57df0..c8402277 100644 --- a/src/code_80718D8.c +++ b/src/code_80718D8.c @@ -4,6 +4,7 @@ #include "dungeon_pokemon_attributes.h" #include "dungeon_leader.h" #include "dungeon_message.h" +#include "code_8041AD0.h" #include "code_8045A00.h" #include "code_8077274_1.h" #include "constants/dungeon.h" @@ -50,7 +51,6 @@ extern u8 *gUnknown_80FF730[]; extern u8 gUnknown_8107010[8]; extern u8 *gUnknown_8107018[3]; -extern void sub_80421C0(Entity *pokemon, u16 r1); void sub_8083D58(void); void sub_8072778(Entity *, Entity *, u8, u8); bool8 sub_80725A4(Entity *, Entity *); diff --git a/src/code_8073CF0.c b/src/code_8073CF0.c index 8d5df8ff..a924f102 100644 --- a/src/code_8073CF0.c +++ b/src/code_8073CF0.c @@ -529,7 +529,7 @@ void sub_8074094(Entity *entity) if (entityInfo->linked.linkedStatus == STATUS_LEECH_SEED) { if (entityInfo->linked.linkedStatusDamageCountdown == 0 || --entityInfo->linked.linkedStatusDamageCountdown == 0) { s32 hp = gUnknown_80F4FB4; - Entity *target = gDungeon->allPokemon[entityInfo->linked.unkD8]; + Entity *target = gDungeon->allPokemon[entityInfo->linked.unk8]; entityInfo->linked.linkedStatusDamageCountdown = gUnknown_80F4F40; if (target == NULL) { @@ -537,7 +537,7 @@ void sub_8074094(Entity *entity) } else { EntityInfo *targetInfo = GetEntInfo(target); - if (targetInfo->unk98 != entityInfo->linked.unkD4) { + if (targetInfo->unk98 != entityInfo->linked.unk4) { entityInfo->linked.linkedStatus = 0; } else { diff --git a/src/code_8075708.c b/src/code_8075708.c index c4afc842..6f4d959e 100644 --- a/src/code_8075708.c +++ b/src/code_8075708.c @@ -17,7 +17,6 @@ #include "position_util.h" #include "trap.h" -extern void sub_8049ED4(void); extern void sub_8073D14(Entity *); void sub_8075680(void) diff --git a/src/code_8077274_1.c b/src/code_8077274_1.c index 4c42d26a..502961be 100644 --- a/src/code_8077274_1.c +++ b/src/code_8077274_1.c @@ -22,6 +22,7 @@ #include "status_checks_1.h" #include "structs/dungeon_entity.h" #include "structs/str_dungeon.h" +#include "dungeon_map_access.h" extern u8 *gUnknown_80FA8BC[]; extern u8 *gUnknown_80FA824[]; @@ -165,12 +166,11 @@ extern s16 gUnknown_80F4F1C[]; extern u8 *gUnknown_80FBF68[]; extern u8 *gUnknown_80FBF84[]; -extern void sub_8049ED4(); extern void sub_8040A84(); extern void EntityUpdateStatusSprites(Entity *); extern void sub_8042A74(Entity *r0); extern void sub_807EC28(bool8); -extern s32 sub_8069F54(Entity *param_1, s16 param_2); +extern s32 GetMonsterApparentID(Entity *param_1, s16 param_2); extern void sub_806A898(Entity *, u32, u32); extern void HealTargetHP(Entity *pokemon, Entity *r1, s16, s16, u32); extern void DealDamageToEntity(Entity *, s16, u32, u32); @@ -260,7 +260,7 @@ void TransformStatusTarget(Entity * pokemon, Entity * target) for (index = 0; index < DUNGEON_MAX_POKEMON; index++) { species = ExtractSpeciesIndex(&auStack544[DungeonRandInt(iVar5) * 2]); - apparentID_s16 = sub_8069F54(target, species); + apparentID_s16 = GetMonsterApparentID(target, species); apparentID = apparentID_s16; if (apparentID != entityInfo->apparentID && sub_806AA0C(apparentID, 1)) { @@ -1427,7 +1427,7 @@ void SendLinkedEndMessage(Entity * pokemon, Entity * target) break; } entityInfo->linked.linkedStatus = STATUS_NONE; - entityInfo->linked.unkD8 = 0xff; + entityInfo->linked.unk8 = 0xff; EntityUpdateStatusSprites(target); } } @@ -1486,7 +1486,7 @@ void SendTransformEndMessage(Entity * pokemon, Entity *target) TryDisplayDungeonLoggableMessage(target,*gUnknown_80FABBC); break; case STATUS_TRANSFORMED: - entityInfo->apparentID = sub_8069F54(target, entityInfo->id); + entityInfo->apparentID = GetMonsterApparentID(target, entityInfo->id); target->axObj.spriteFile = GetSpriteData(entityInfo->apparentID); uVar3 = sub_806CEBC(target); sub_806CCB4(target,uVar3); diff --git a/src/code_807CD9C.c b/src/code_807CD9C.c index 99f295bb..b6e98798 100644 --- a/src/code_807CD9C.c +++ b/src/code_807CD9C.c @@ -18,6 +18,7 @@ #include "move_effects_target.h" #include "moves.h" #include "move_util.h" +#include "code_8041AD0.h" extern u32 gUnknown_202EDCC; @@ -38,7 +39,6 @@ bool8 ExposeTrap(s32 x, s32 y); void sub_8040A84(); void sub_8049ED4(); void sub_806A5B8(Entity *); -void sub_80421C0(Entity *, u32); u8 sub_8045888(Entity *); void sub_807EC28(u32); void sub_80694C0(Entity *, s32, s32, s32); diff --git a/src/code_8083288.c b/src/code_8083288.c deleted file mode 100644 index 28df1423..00000000 --- a/src/code_8083288.c +++ /dev/null @@ -1,548 +0,0 @@ -#include "global.h" -#include "constants/dungeon_action.h" -#include "code_805D8C8.h" -#include "code_806CD90.h" -#include "code_8092334.h" -#include "dungeon_map_access.h" -#include "dungeon_util.h" -#include "structs/dungeon_entity.h" -#include "structs/str_dungeon.h" -#include "structs/str_position.h" - - -u16 ReadU16(DataSerializer *param_1); -s16 ReadS16(DataSerializer *param_1); -u8 ReadU8(DataSerializer *param_1); -u32 sub_80831A0(DataSerializer *param_1); -bool8 ReadBool8(DataSerializer *param_1); -void ReadBytes(DataSerializer *param_1, void *param_2, s32 size); -void ReadPosition8(DataSerializer *param_1,Position *param_2); - -void AddPokemonDungeonSprite(u32, s16, Position *, u32); - -void sub_8082B40(void) -{ - EntityInfo *info; - Entity *entity; - int index; - Position pos; - - for(index = 0; index < DUNGEON_MAX_POKEMON; index++) - { - entity = gDungeon->allPokemon[index]; - if (EntityExists(entity)) { - info = GetEntInfo(entity); - entity->axObj.spriteFile = GetSpriteData(info->apparentID); - sub_806CCB4(entity,sub_806CEBC(entity)); - pos = entity->pos; - AddPokemonDungeonSprite(info->unk98,info->apparentID,&pos,3); - entity->room = GetTileSafe(entity->pos.x,entity->pos.y)->room; - } - } -} - - - - - - - - -// Seems to be a new file (regarding serialization) starting here - - - - - - - - -s16 sub_8082BC0(DataSerializer *param_1) -{ - s16 temp[2]; - - temp[0] = 0; - - ReadBytes(param_1, temp, 2); - return temp[0]; -} - -u8 sub_8082BE0(DataSerializer *param_1) -{ - u8 temp[4]; - - temp[0] = 0; - - ReadBytes(param_1, temp, 1); - return temp[0]; -} - -u8 sub_8082BFC(DataSerializer *param_1) -{ - u8 temp[4]; - - temp[0] = 0; - - ReadBytes(param_1, temp, 1); - return temp[0]; -} - -u8 sub_8082C18(DataSerializer *param_1) -{ - u8 temp[4]; - - temp[0] = 0; - - ReadBytes(param_1, temp, 1); - return temp[0]; -} - -u8 sub_8082C34(DataSerializer *param_1) -{ - u8 temp[4]; - - temp[0] = 0; - - ReadBytes(param_1, temp, 1); - return temp[0]; -} - -u8 sub_8082C50(DataSerializer *param_1) -{ - u8 temp[4]; - - temp[0] = 0; - - ReadBytes(param_1, temp, 1); - return temp[0]; -} - -// Read some enum ? -u32 sub_8082C6C(DataSerializer *param_1) -{ - u32 temp; - - temp = 0; - - ReadBytes(param_1, &temp, 4); - return temp; -} - -u8 sub_8082C84(DataSerializer *param_1) -{ - u8 temp[4]; - - temp[0] = 0; - - ReadBytes(param_1, temp, 1); - return temp[0]; -} - -u8 sub_8082CA0(DataSerializer *param_1) -{ - u8 temp[4]; - - temp[0] = 0; - - ReadBytes(param_1, temp, 1); - return temp[0]; -} - -void ReadActionContainer(DataSerializer *param_1, ActionContainer *action) -{ - action->action = ACTION_NOTHING; - ReadBytes(param_1, &action->direction, 1); - action->unk3 = 7; - ReadPosition8(param_1, &action->itemTargetPosition); -} - -void ReadAITarget(DataSerializer *param_1, AITarget *aitarget) -{ - ReadBytes(param_1, &aitarget->aiObjective, 1); - aitarget->aiNotNextToTarget = ReadBool8(param_1); - aitarget->aiTargetingEnemy = ReadBool8(param_1); - aitarget->aiTurningAround = ReadBool8(param_1); - aitarget->aiTargetSpawnGenID = ReadU16(param_1); - aitarget->aiTarget = NULL; - aitarget->unkC = 0; - ReadPosition8(param_1, &aitarget->aiTargetPos); -} - -void Read3Bytes(DataSerializer *param_1, u8 *dst) -{ - ReadBytes(param_1, dst, 3); -} - -void ReadSleep(DataSerializer *param_1, Sleep *sleep) -{ - ReadBytes(param_1, &sleep->sleep, 1); - sleep->sleepTurns = ReadU8(param_1); -} - -void ReadNonVolatile(DataSerializer *param_1, NonVolatile *nonvolatile) -{ - ReadBytes(param_1, &nonvolatile->nonVolatileStatus, 1); - nonvolatile->nonVolatileStatusTurns = ReadU8(param_1); - nonvolatile->nonVolatileStatusDamageCountdown = ReadU8(param_1); - nonvolatile->unk4 = ReadU8(param_1); -} - -void ReadImmobilize(DataSerializer *param_1, Immobilize *immobilize) -{ - ReadBytes(param_1, &immobilize->immobilizeStatus, 1); - immobilize->immobilizeStatusTurns = ReadU8(param_1); - immobilize->immobilizeStatusDamageCountdown = ReadU8(param_1); - immobilize->unk4 = sub_80831A0(param_1); -} - -void ReadVolatileStatus(DataSerializer *param_1, Volatile *volatileStatus) -{ - ReadBytes(param_1, &volatileStatus->volatileStatus, 1); - volatileStatus->volatileStatusTurns = ReadU8(param_1); -} - -void ReadCharging(DataSerializer *param_1, Charging *charging) -{ - ReadBytes(param_1, &charging->chargingStatus, 1); - charging->chargingStatusTurns = ReadU8(param_1); - charging->chargingStatusMoveIndex = ReadU8(param_1); -} - -void ReadProtection(DataSerializer *param_1, Protection *protect) -{ - ReadBytes(param_1, &protect->protectionStatus, 1); - protect->protectionStatusTurns = ReadU8(param_1); -} - -void ReadWaiting(DataSerializer *param_1, Waiting *waiting) -{ - ReadBytes(param_1, &waiting->waitingStatus, 1); - waiting->enemyDecoy = ReadBool8(param_1); - waiting->unkCA = ReadBool8(param_1); - waiting->waitingStatusTurns = ReadU8(param_1); - waiting->curseDamageCountdown = ReadU8(param_1); -} - -void ReadLinked(DataSerializer *param_1, Linked *linked) -{ - ReadBytes(param_1, &linked->linkedStatus, 1); - linked->unkD4 = sub_80831A0(param_1); - linked->unkD8 = ReadU8(param_1); - linked->linkedStatusTurns = ReadU8(param_1); - linked->linkedStatusDamageCountdown = ReadU8(param_1); -} - -void ReadMoveStatus(DataSerializer *param_1, MoveStatus *moveStatus) -{ - ReadBytes(param_1, &moveStatus->moveStatus, 1); - moveStatus->moveStatusTurns = ReadU8(param_1); -} - -void sub_8082E88(DataSerializer *param_1, void *dst, s32 param_3) -{ - ReadBytes(param_1, dst, 1); -} - -void ReadTransformStatus(DataSerializer *param_1, TransformStatus *transform) -{ - ReadBytes(param_1, &transform->transformStatus, 1); - transform->transformStatusTurns = ReadU8(param_1); -} - -void ReadEyesightStatus(DataSerializer *param_1, EyesightStatus *eyesight) -{ - ReadBytes(param_1, &eyesight->eyesightStatus, 1); - eyesight->eyesightStatusTurns = ReadU8(param_1); -} - -void ReadMuzzled(DataSerializer *param_1, Muzzled *muzzle) -{ - ReadBytes(param_1, &muzzle->muzzled, 1); - muzzle->muzzledTurns = ReadU8(param_1); -} - -void RestoreDungeonPokemonMove(DataSerializer *param_1, Move *move) -{ - move->moveFlags = ReadU8(param_1); - move->moveFlags2 = ReadU8(param_1); - ReadBytes(param_1, &move->id, 2); - move->PP = ReadU8(param_1); - move->ginseng = ReadU8(param_1); -} - -void ReadMoves(DataSerializer *param_1, Moves *moves) -{ - s32 index; - Move *move; - - for (index = 0; index < MAX_MON_MOVES; index++) { - move = &moves->moves[index]; - RestoreDungeonPokemonMove(param_1, move); - } - - moves->struggleMoveFlags = ReadU8(param_1); -} - -// TODO: R1 struct -void sub_8082F48(DataSerializer *param_1, u16 *r1) -{ - r1[0] = ReadS16(param_1); - r1[1] = ReadS16(param_1); -} - -void ReadJoinedAt(DataSerializer *param_1, JoinedAt *joined) -{ - joined->joinedAt = ReadU8(param_1); - joined->unk1 = ReadU8(param_1); -} - -void ReadHiddenPower(DataSerializer *param_1, HiddenPower *hidden) -{ - hidden->hiddenPowerBasePower = ReadS16(param_1); - hidden->hiddenPowerType = sub_8082BFC(param_1); -} - -void InitByteWriter(DataSerializer *param_1, u8 *dst, u32 capacity) -{ - param_1->stream = dst; - param_1->count = 0; - param_1->end = dst + capacity; -} - -void WriteBytes(DataSerializer *param_1, void *src, s32 numBytes) -{ - u8 *curByte; - - curByte = src; - - while (numBytes != 0) { - *param_1->stream = *curByte; - param_1->stream++; - curByte++; - numBytes--; - param_1->count++; - } -} - -void InitByteReader(DataSerializer *param_1, u8 *src, u32 length) -{ - param_1->stream = src; - param_1->count = 0; - param_1->end = src + length; -} - -void ReadBytes(DataSerializer *param_1, void *dst, s32 numBytes) -{ - u8 *curByte; - - curByte = dst; - - while (numBytes != 0) { - *curByte = *param_1->stream; - param_1->stream++; - curByte++; - numBytes--; - param_1->count++; - } -} - -// Finished reading/writing dungeon -void nullsub_98(DataSerializer *param_1) -{ -} - -void Write8Bytes(DataSerializer *param_1, u8 *src) -{ - WriteBytes(param_1, src, 8); -} - -void sub_8083018(DataSerializer *param_1) -{ - u8 auStack_10 [12]; - - ReadBytes(param_1, auStack_10, 8); - auStack_10[8] = 0; -} - -void WriteU16(DataSerializer *param_1, u16 value) -{ - u16 uStack_8; - - uStack_8 = value; - - WriteBytes(param_1, &uStack_8, 2); -} - -void WriteS16(DataSerializer *param_1, u32 value) -{ - u16 uStack_8; - - uStack_8 = value; - - WriteBytes(param_1, &uStack_8, 2); -} - -void WriteU8(DataSerializer *param_1, u32 value) -{ - u8 uStack_8; - - uStack_8 = value; - - WriteBytes(param_1, &uStack_8, 1); -} - -void WriteU32(DataSerializer *param_1, u32 value) -{ - u32 uStack_8; - - uStack_8 = value; - - WriteBytes(param_1, &uStack_8, 4); -} - -UNUSED void sub_808308C(DataSerializer *param_1, u32 value) -{ - u32 uStack_8; - - uStack_8 = value; - - WriteBytes(param_1, &uStack_8, 4); -} - -void WriteS32(DataSerializer *param_1, u32 value) -{ - u32 uStack_8; - - uStack_8 = value; - - WriteBytes(param_1, &uStack_8, 4); -} - -void WriteBool8(DataSerializer *param_1, bool8 value) -{ - u8 local_8; - - local_8 = value ? -1 : 0; - - WriteBytes(param_1, &local_8, 1); -} - -void WritePosition8(DataSerializer *param_1, Position *param_2) -{ - WriteBytes(param_1, ¶m_2->x, 1); - WriteBytes(param_1, ¶m_2->y, 1); -} - -// TODO: param_2 struct -void sub_80830F8(DataSerializer *param_1, u32 *param_2) -{ - WriteBytes(param_1, ¶m_2[0], 1); - WriteBytes(param_1, ¶m_2[1], 1); - WriteBytes(param_1, ¶m_2[2], 1); - WriteBytes(param_1, ¶m_2[3], 1); -} - -// TODO: param_2 struct -void sub_808312C(DataSerializer *param_1, u16 *param_2) -{ - WriteBytes(param_1, ¶m_2[0], 1); - WriteBytes(param_1, ¶m_2[1], 1); -} - -void xxx_WriteBytes(DataSerializer *param_1, void *src, u32 numBytes) -{ - WriteBytes(param_1, src, numBytes); -} - -u16 ReadU16(DataSerializer *param_1) -{ - u16 local_8; - - ReadBytes(param_1, &local_8, 2); - return local_8; -} - -s16 ReadS16(DataSerializer *param_1) -{ - s16 local_8; - - ReadBytes(param_1, &local_8, 2); - return local_8; -} - -u8 ReadU8(DataSerializer *param_1) -{ - u8 local_8; - - ReadBytes(param_1, &local_8, 1); - return local_8; -} - -// ReadS32 or ReadU32 ? -u32 sub_80831A0(DataSerializer *param_1) -{ - u32 local_8; - - ReadBytes(param_1, &local_8, 4); - return local_8; -} - -UNUSED u32 sub_80831B4(DataSerializer *param_1) -{ - u32 local_8; - - ReadBytes(param_1, &local_8, 4); - return local_8; -} - -// ? -u32 sub_80831C8(DataSerializer *param_1) -{ - u32 local_8; - - ReadBytes(param_1, &local_8, 4); - return local_8; -} - -bool8 ReadBool8(DataSerializer *param_1) -{ - u8 local_8; - - ReadBytes(param_1, &local_8, 1); - return local_8 != 0; -} - -void ReadPosition8(DataSerializer *param_1, Position *param_2) -{ - param_2->x = 0; - param_2->y = 0; - ReadBytes(param_1, ¶m_2->x, 1); - ReadBytes(param_1, ¶m_2->y, 1); -} - -// TODO: param_2 struct -void sub_8083220(DataSerializer *param_1, u32 *param_2) -{ - param_2[0] = 0; - param_2[1] = 0; - param_2[2] = 0; - param_2[3] = 0; - ReadBytes(param_1, ¶m_2[0], 1); - ReadBytes(param_1, ¶m_2[1], 1); - ReadBytes(param_1, ¶m_2[2], 1); - ReadBytes(param_1, ¶m_2[3], 1); -} - -// TODO: param_2 struct -void sub_8083260(DataSerializer *param_1, u16 *param_2) -{ - param_2[0] = 0; - param_2[1] = 0; - ReadBytes(param_1, ¶m_2[0], 1); - ReadBytes(param_1, ¶m_2[1], 1); -} - -void xxx_ReadBytes(DataSerializer *r0, u8 *dst, u32 numBytes) -{ - ReadBytes(r0, dst, numBytes); -} \ No newline at end of file diff --git a/src/data/dungeon_serializer.h b/src/data/dungeon_serializer.h new file mode 100644 index 00000000..e7d1d0fd --- /dev/null +++ b/src/data/dungeon_serializer.h @@ -0,0 +1,10 @@ +// The code assumes these two strings are the same size: + +ALIGNED(4) static const u8 sYayoiSan[] = _("やよい{INVALID_SEQUENCE_976C}"); // 0x82, 0xE2, 0x82, 0xE6, 0x82, 0xA2, 0x97, 0x6C, 0x00 +ALIGNED(4) static const u8 sMisakiSan[] = _("みさき{INVALID_SEQUENCE_976C}"); // 0x82, 0xDD, 0x82, 0xB3, 0x82, 0xAB, 0x97, 0x6C, 0x00 + +// -1 because of the trailing "\0" +#define BLAME_SIZE (sizeof(sYayoiSan) - 1) + +// Should be aligned to 4 bytes. Default blame size is 8, stack size 12. If blame size was 11, stack size should still be 12 +#define BLAME_STACK_SIZE (BLAME_SIZE - (BLAME_SIZE % 4) + 4) \ No newline at end of file diff --git a/src/dungeon_cutscenes.c b/src/dungeon_cutscenes.c index 71e761cb..65b406f9 100644 --- a/src/dungeon_cutscenes.c +++ b/src/dungeon_cutscenes.c @@ -3,6 +3,7 @@ #include "code_800E9A8.h" #include "code_803E46C.h" #include "code_803E668.h" +#include "code_8041AD0.h" #include "code_804267C.h" #include "code_8045A00.h" #include "code_80861A8.h" @@ -377,7 +378,6 @@ extern void DeoxysScreenFlash(void); extern void sub_8085EB0(void); extern void sub_8049884(void); extern void sub_8049B8C(void); -extern void sub_8049ED4(void); extern void sub_8040A84(void); extern void sub_8086A54(Entity *); extern void sub_806BFC0(EntityInfo *, u32); @@ -386,7 +386,6 @@ extern void sub_8041888(u32); extern u32 sub_80861F8(u32, Entity *, u32); extern u8 sub_80860A8(u32); extern void sub_8052D44(s16 *, Entity *, Entity *); -extern void sub_80421C0(Entity *, u32); extern void sub_80464C8(Entity *, Position *, Item *); extern void SetDungeonBGColorRGB(u32, u32, u32, u32, u32); extern u32 sub_8085EC8(u32, u32, u32, Position *, u32); diff --git a/src/dungeon_items.c b/src/dungeon_items.c index 27a7cb2b..b89e7109 100644 --- a/src/dungeon_items.c +++ b/src/dungeon_items.c @@ -2,6 +2,7 @@ #include "dungeon_items.h" #include "code_803E668.h" +#include "code_8041AD0.h" #include "code_8045A00.h" #include "code_80861A8.h" #include "code_80869E4.h" @@ -20,7 +21,6 @@ extern u8 *gUnknown_81053A8[]; extern u8 *gUnknown_8105434[]; extern void sub_80416E0(Position32 *r0, u32, bool8); -extern void sub_80421C0(Entity *, u32); extern void sub_80855E4(void *); extern void PlaySoundEffect(u32); extern void sub_804178C(u32); diff --git a/src/dungeon_move.c b/src/dungeon_move.c index 59976e5d..89e241c0 100644 --- a/src/dungeon_move.c +++ b/src/dungeon_move.c @@ -37,6 +37,7 @@ #include "code_8045A00.h" #include "code_803E668.h" #include "code_803E46C.h" +#include "code_8041AD0.h" extern void sub_80429C8(Entity *r0); extern u8 sub_803F428(Position *); @@ -74,7 +75,6 @@ extern void sub_8042930(Entity *r0); extern void sub_8041B48(Entity *pokemon); extern void sub_8041BA8(Entity *pokemon); extern void sub_8042950(Entity *r0); -extern void sub_80421C0(Entity *pokemon, u16 r1); extern bool8 sub_8057634(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 YawnMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 NightmareMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); diff --git a/src/dungeon_serializer.c b/src/dungeon_serializer.c new file mode 100644 index 00000000..c83df600 --- /dev/null +++ b/src/dungeon_serializer.c @@ -0,0 +1,1816 @@ +#include "global.h" +#include "globaldata.h" +#include "code_800F958.h" +#include "code_8045A00.h" +#include "code_805D8C8.h" +#include "code_806CD90.h" +#include "dungeon_map_access.h" +#include "dungeon_pokemon_attributes.h" +#include "dungeon_serializer.h" +#include "dungeon_util.h" +#include "structs/str_dungeon.h" + +extern u8 gUnknown_202EE70[MAX_TEAM_BODY_SIZE]; +extern u8 gUnknown_202EE76[DUNGEON_MAX_WILD_POKEMON_BODY_SIZE]; + +extern Position gUnknown_203B410; +extern Entity *gLeaderPointer; // 203B450 + +#include "data/dungeon_serializer.h" + +static void InitReader(DataSerializer *seri, u8 *buffer, u32 bufLen); +static void InitWriter(DataSerializer *seri, u8 *buffer, u32 bufLen); +static void FinishSerializer(DataSerializer *seri); + +static u8 ReadAbility(DataSerializer *seri); +static void ReadActionContainer(DataSerializer *seri, ActionContainer *dst); +static void ReadAITarget(DataSerializer *seri, AITarget *dst); +static void ReadBelly(DataSerializer *seri, FixedPoint *dst); +static void ReadBlame(DataSerializer *seri, const u8 *expected); +static bool8 ReadBool8(DataSerializer *seri); +static void ReadBytes(DataSerializer *seri, void *dst, s32 numBytes); +static void ReadCharging(DataSerializer *seri, Charging *dst); +static u8 ReadClientType(DataSerializer *seri); +static void ReadDungeonFloor(DataSerializer *seri); +static void ReadDungeonItems(DataSerializer *seri); +static void ReadDungeonMonsters(DataSerializer *seri); +static void ReadDungeonMusic(DataSerializer *seri); +static void ReadDungeonTraps(DataSerializer *seri); +static void ReadDungeonUnk644(DataSerializer *seri); +static void ReadDungeonUnkE240(DataSerializer *seri, unkDungeonE240 *dst); +static void ReadDungeonUnkE260(DataSerializer *seri, unkDungeonE260 *dst); +static void ReadDungeonVisibility(DataSerializer *seri); +static void ReadEyesightStatus(DataSerializer *seri, EyesightStatus *dst); +static void ReadHiddenPower(DataSerializer *seri, HiddenPower *dst); +static void ReadImmobilize(DataSerializer *seri, Immobilize *dst); +static void ReadIQSkills(DataSerializer *seri, u8 *dst); +static void ReadItem(DataSerializer *seri, Item *dst); +static void ReadItemStatus(DataSerializer *seri, ItemStatus *dst); +static void ReadJoinedAt(DataSerializer *seri, JoinedAt *dst); +static void ReadLinked(DataSerializer *seri, Linked *dst); +static void ReadMonster(DataSerializer *seri, bool8 isTeamMember, s32 index); +static s16 ReadMonsterID(DataSerializer *seri); +static u8 ReadMonsterUnk64(DataSerializer *seri); +static u8 ReadMonsterUnkFF(DataSerializer *seri); +static void ReadMoves(DataSerializer *seri, Moves *dst); +static void ReadMoveStatus(DataSerializer *seri, MoveStatus *dst); +static void ReadMuzzled(DataSerializer *seri, Muzzled *dst); +static void ReadNonVolatile(DataSerializer *seri, NonVolatile *dst); +static void ReadProtection(DataSerializer *seri, Protection *dst); +static s16 ReadS16(DataSerializer *seri); +static s32 ReadS32(DataSerializer *seri); +static void ReadSleep(DataSerializer *seri, Sleep *dst); +static void ReadSpeedCounters(DataSerializer *seri, u8 *dst, u32 numCounters); +static s32 ReadSpeedStage(DataSerializer *seri); +static u8 ReadTactic(DataSerializer *seri); +static u8 ReadTargetingDecoy(DataSerializer *seri); +static void ReadTile(DataSerializer *seri, Tile *dst); +static void ReadTilePos(DataSerializer *seri, Position *dst); +static void ReadTransformStatus(DataSerializer *seri, TransformStatus *dst); +static u8 ReadType(DataSerializer *seri); +static u16 ReadU16(DataSerializer *seri); +static u32 ReadU32(DataSerializer *seri); +static u8 ReadU8(DataSerializer *seri); +static void ReadVolatileStatus(DataSerializer *seri, Volatile *dst); +static void ReadWaiting(DataSerializer *seri, Waiting *dst); +static void ReadWeather(DataSerializer *seri, Weather *dst); + +static void WriteAbility(DataSerializer *seri, u8 value); +static void WriteActionContainer(DataSerializer *seri, ActionContainer *src); +static void WriteAITarget(DataSerializer *seri, AITarget* src); +static void WriteBelly(DataSerializer *seri, FixedPoint *src); +static void WriteBlame(DataSerializer *seri, const u8 *blame); +static void WriteBool8(DataSerializer *seri, bool8 value); +static void WriteBytes(DataSerializer *seri, void *src, s32 numBytes); +static void WriteCharging(DataSerializer *seri, Charging *src); +static void WriteClientType(DataSerializer *seri, u8 value); +static void WriteDungeonFloor(DataSerializer *seri); +static void WriteDungeonItems(DataSerializer *seri); +static void WriteDungeonMonsters(DataSerializer *seri); +static void WriteDungeonMusic(DataSerializer *seri); +static void WriteDungeonTraps(DataSerializer *seri); +static void WriteDungeonUnk644(DataSerializer *seri); +static void WriteDungeonUnkE240(DataSerializer *seri, unkDungeonE240 *src); +static void WriteDungeonUnkE260(DataSerializer *seri, unkDungeonE260 *src); +static void WriteDungeonVisibility(DataSerializer *seri); +static void WriteEyesightStatus(DataSerializer *seri, EyesightStatus *src); +static void WriteHiddenPower(DataSerializer *seri, HiddenPower *src); +static void WriteImmobilize(DataSerializer *seri, Immobilize *src); +static void WriteIQSkills(DataSerializer *seri, u8 *src); +static void WriteItem(DataSerializer *seri, Item *src); +static void WriteItemStatus(DataSerializer *seri, ItemStatus *src); +static void WriteJoinedAt(DataSerializer *seri, JoinedAt *src); +static void WriteLinked(DataSerializer *seri, Linked *src); +static void WriteMonster(DataSerializer *seri, Entity *src); +static void WriteMonsterID(DataSerializer *seri, s16 value); +static void WriteMonsterUnk64(DataSerializer *seri, u8 value); +static void WriteMonsterUnkFF(DataSerializer *seri, u8 value); +static void WriteMoves(DataSerializer *seri, Moves *src); +static void WriteMoveStatus(DataSerializer *seri, MoveStatus* src); +static void WriteMuzzled(DataSerializer *seri, Muzzled *src); +static void WriteNonVolatile(DataSerializer *seri, NonVolatile *src); +static void WriteProtection(DataSerializer *seri, Protection *src); +static void WriteTilePos(DataSerializer *seri, Position *src); +static void WriteS16(DataSerializer *seri, s16 value); +static void WriteS32(DataSerializer *seri, s32 value); +static void WriteSleep(DataSerializer *seri, Sleep* src); +static void WriteSpeedCounters(DataSerializer *seri, u8 *src, u32 numCounters); +static void WriteSpeedStage(DataSerializer *seri, s32 value); +static void WriteTactic(DataSerializer *seri, u8 value); +static void WriteTargetingDecoy(DataSerializer *seri, u8 value); +static void WriteTile(DataSerializer *seri, Tile *src); +static void WriteTransformStatus(DataSerializer *seri, TransformStatus *src); +static void WriteType(DataSerializer *seri, u8 value); +static void WriteU16(DataSerializer *seri, u16 value); +static void WriteU32(DataSerializer *seri, u32 value); +static void WriteU8(DataSerializer *seri, u8 value); +static void WriteVolatile(DataSerializer *seri, Volatile *src); +static void WriteWaiting(DataSerializer *seri, Waiting *src); +static void WriteWeather(DataSerializer *seri, Weather *src); + +static Entity* sub_80828E0(s16 id, s16 apparentID, s32 index); +static Entity* sub_8082A08(s16 id, s16 apparentID, s32 index); + +// These externs are from other files +extern u8 GetBodySize(s16 index); +extern Entity *sub_8045684(u8, Position *, u8); +extern void sub_80460F8(Position *, Item *, u32); + +void SaveDungeonState(u8 *buffer, u32 bufLen) +{ + DataSerializer seri; + + InitWriter(&seri, buffer, bufLen); + + seri.unkC = 0; + WriteBytes(&seri, &seri.unkC, 4); + + WriteDungeonUnk644(&seri); + WriteDungeonFloor(&seri); + WriteDungeonVisibility(&seri); + WriteDungeonMusic(&seri); + WriteDungeonItems(&seri); + WriteDungeonTraps(&seri); + WriteDungeonMonsters(&seri); + + WriteBlame(&seri, sYayoiSan); + FinishSerializer(&seri); +} + +static void WriteDungeonUnk644(DataSerializer *seri) +{ + WriteBlame(seri, sMisakiSan); + WriteBytes(seri, &gDungeon->unk644, sizeof(unkDungeon644)); +} + +static void WriteDungeonItems(DataSerializer *seri) +{ + bool8 notEmpty; + Item *item; + Entity *entity; + s32 i; + u8 emptyItem[5]; + + for (i = 0; i < 5; i++) + emptyItem[i] = 0; + + WriteBlame(seri, sMisakiSan); + + for (i = 0; i < DUNGEON_MAX_ITEMS; i++) { + entity = gDungeon->items[i]; + notEmpty = FALSE; + + if (entity != NULL && GetEntityType(entity) == ENTITY_ITEM) { + item = GetItemData(entity); + WriteItem(seri, item); // 3 bytes + WriteBytes(seri, &entity->pos.x, 1); // 1 byte + WriteBytes(seri, &entity->pos.y, 1); // 1 byte + notEmpty = TRUE; + } + + if (!notEmpty) + WriteBytes(seri, emptyItem, 5); + } +} + +static void WriteDungeonTraps(DataSerializer *seri) +{ + bool8 notEmpty; + Trap *trap; + Entity *entity; + s32 i; + u8 emptyTrap[5]; + + for (i = 0; i < 5; i++) + emptyTrap[i] = -1; + + WriteBlame(seri, sMisakiSan); + + for (i = 0; i < DUNGEON_MAX_TRAPS; i++) { + entity = gDungeon->traps[i]; + notEmpty = FALSE; + + if (entity != NULL && GetEntityType(entity) == ENTITY_TRAP) { + trap = GetTrapData(entity); + WriteBytes(seri, &trap->id, 1); + WriteBytes(seri, &trap->unk1, 1); + WriteBytes(seri, &entity->isVisible, 1); + WriteBytes(seri, &entity->pos.x, 1); + WriteBytes(seri, &entity->pos.y, 1); + notEmpty = TRUE; + } + + if (!notEmpty) + WriteBytes(seri, emptyTrap, 5); + } +} + +static void WriteDungeonMonsters(DataSerializer *seri) +{ + s32 i; + + WriteBlame(seri, sMisakiSan); + WriteU32(seri, gDungeon->unk37F0); + WriteU32(seri, gDungeon->unk37F4); + WriteBool8(seri, gDungeon->plusIsActive[0]); + WriteBool8(seri, gDungeon->plusIsActive[1]); + WriteBool8(seri, gDungeon->minusIsActive[0]); + WriteBool8(seri, gDungeon->minusIsActive[1]); + WriteBool8(seri, gDungeon->decoyActive); + WriteBool8(seri, gDungeon->unk37FD); + WriteBool8(seri, gDungeon->deoxysDefeat); + WriteBool8(seri, gDungeon->unk37FF); + WriteU16(seri, gDungeon->deoxysForm); // Should be S16 + + for (i = 0; i < MAX_TEAM_MEMBERS; i++) + WriteMonster(seri, gDungeon->teamPokemon[i]); + + for (i = 0; i < DUNGEON_MAX_WILD_POKEMON; i++) + WriteMonster(seri, gDungeon->wildPokemon[i]); +} + +// TODO: Rewrite like ReadMonster +static void WriteMonster(DataSerializer *seri, Entity *src) +{ + Position *pos; + EntityInfo *info; + s32 counter; + EntityInfo info2; + u32 uStack_ac; + u32 uStack_a8; + HiddenPower *psStack_a4; + u8 *temp1; + u8 *temp2; + AITarget *temp3; + u8 *puStack_a0; + u32 *puStack_9c; + u32 *puStack_98; + u32 *puStack_94; + u8 *puStack_90; + Sleep *puStack_8c; + NonVolatile *puStack_88; + Immobilize *puStack_84; + Volatile *puStack_80; + Charging *puStack_7c; + Protection *puStack_78; + Waiting *puStack_74; + Linked *puStack_70; + MoveStatus *puStack_6c; + ItemStatus *puStack_68; + TransformStatus *puStack_64; + EyesightStatus *puStack_60; + Muzzled *pbStack_5c; + bool8 *pbStack_58; + bool8 *pbStack_54; + bool8 *pbStack_50; + bool8 *puStack_4c; + bool8 *pbStack_48; + bool8 *pbStack_44; + bool8 *pbStack_40; + bool8 *pbStack_3c; + u8 *puStack_38; + u8 *puStack_34; + bool8 *pbStack_30; + u8 *puStack_2c; + u8 *puStack_28; + u8 *puStack_24; + + + uStack_a8 = 0; + uStack_ac = 1; + WriteU8(seri,0xaa); + WriteU8(seri,0x55); + if (EntityExists(src)) { + info = GetEntInfo(src); + WriteBytes(seri,&uStack_ac,1); + WriteBytes(seri,&src->pos.x,1); + WriteBytes(seri,&src->pos.y,1); + WriteBytes(seri,&src->isVisible,1); + WriteBytes(seri,&src->spawnGenID,2); + } + else { + memset(&info2,0,sizeof(EntityInfo)); + info = &info2; + WriteBytes(seri,&uStack_a8,1); + WriteBytes(seri,&uStack_a8,1); + WriteBytes(seri,&uStack_a8,1); + WriteBytes(seri,&uStack_a8,1); + WriteBytes(seri,&uStack_a8,2); + } + WriteU16(seri,info->flags); + WriteMonsterID(seri,info->apparentID); + WriteMonsterID(seri,info->id); + WriteBool8(seri,info->isNotTeamMember); + WriteBool8(seri,info->isTeamLeader); + WriteU8(seri,info->shopkeeper); + WriteU8(seri,info->level); + WriteU8(seri,info->teamIndex); + WriteJoinedAt(seri,&info->joinedAt); + WriteS16(seri,info->IQ); + WriteS16(seri,info->HP); + WriteS16(seri,info->maxHPStat); + WriteS16(seri,info->originalHP); + WriteU8(seri,info->atk[0]); + WriteU8(seri,info->atk[1]); + WriteU8(seri,info->def[0]); + WriteU8(seri,info->def[1]); + WriteU32(seri,info->exp); + WriteS16(seri,info->offensiveStages[0]); + WriteS16(seri,info->offensiveStages[1]); + WriteS16(seri,info->defensiveStages[0]); + WriteS16(seri,info->defensiveStages[1]); + WriteS16(seri,info->hitChanceStages[0]); + WriteS16(seri,info->hitChanceStages[1]); + WriteS16(seri,info->flashFireBoost); + WriteS32(seri,info->offensiveMultipliers[0]); + WriteS32(seri,info->offensiveMultipliers[1]); + WriteS32(seri,info->defensiveMultipliers[0]); + WriteS32(seri,info->defensiveMultipliers[1]); + WriteActionContainer(seri,&info->action); + WriteType(seri,info->types[0]); + WriteType(seri,info->types[1]); + WriteAbility(seri,info->abilities[0]); + WriteAbility(seri,info->abilities[1]); + WriteItem(seri,&info->heldItem); + WriteMonsterUnk64(seri, info->unk64); + temp3 = &info->aiTarget; + temp2 = info->IQSkillMenuFlags; + temp1 = info->IQSkillFlags; + puStack_a0 = &info->tactic; + psStack_a4 = &info->hiddenPower; + puStack_9c = &info->unk98; + puStack_98 = &info->unk9C; + puStack_94 = &info->unkA0; + puStack_8c = &info->sleep; + puStack_88 = &info->nonVolatile; + puStack_84 = &info->immobilize; + puStack_80 = &info->volatileStatus; + puStack_7c = &info->charging; + puStack_78 = &info->protection; + puStack_74 = &info->waitingStruct; + puStack_70 = &info->linked; + puStack_6c = &info->moveStatus; + puStack_68 = &info->itemStatus; + puStack_64 = &info->transformStatus; + puStack_60 = &info->eyesightStatus; + pbStack_5c = &info->muzzled; + pbStack_58 = &info->powerEars; + pbStack_54 = &info->scanning; + pbStack_50 = &info->stairSpotter; + puStack_4c = &info->unkF3; + pbStack_48 = &info->grudge; + puStack_34 = &info->expMultiplier; + pbStack_44 = &info->exposed; + pbStack_40 = &info->isColorChanged; + pbStack_3c = &info->bossFlag; + puStack_38 = &info->terrifiedTurns; + pbStack_30 = &info->useHeldItem; + puStack_2c = &info->perishSongTurns; + puStack_28 = &info->unkFE; + puStack_24 = &info->unkFF; + puStack_90 = &info->clientType; + + pos = info->prevPos; + for (counter = 0; counter < NUM_PREV_POS; counter++) { + WriteTilePos(seri, pos); + pos++; + } + + WriteAITarget(seri,temp3); + WriteIQSkills(seri,temp2); + WriteIQSkills(seri,temp1); + WriteTactic(seri,*puStack_a0); + WriteHiddenPower(seri,psStack_a4); + WriteU32(seri,*puStack_9c); + WriteU32(seri,*puStack_98); + WriteU32(seri,*puStack_94); + WriteSleep(seri,puStack_8c); + WriteNonVolatile(seri,puStack_88); + WriteImmobilize(seri,puStack_84); + WriteVolatile(seri,puStack_80); + WriteCharging(seri,puStack_7c); + WriteProtection(seri,puStack_78); + WriteWaiting(seri,puStack_74); + WriteLinked(seri,puStack_70); + WriteMoveStatus(seri,puStack_6c); + WriteItemStatus(seri,puStack_68); + WriteTransformStatus(seri,puStack_64); + WriteEyesightStatus(seri,puStack_60); + WriteMuzzled(seri,pbStack_5c); + WriteBool8(seri,*pbStack_58); + WriteBool8(seri,*pbStack_54); + WriteBool8(seri,*pbStack_50); + WriteBool8(seri,*puStack_4c); + WriteBool8(seri,*pbStack_48); + WriteU8(seri,*puStack_34); + WriteBool8(seri,*pbStack_44); + WriteBool8(seri,*pbStack_40); + WriteBool8(seri,*pbStack_3c); + WriteU8(seri,*puStack_38); + WriteBool8(seri,*pbStack_30); + WriteU8(seri,*puStack_2c); + WriteU8(seri,*puStack_28); + WriteMonsterUnkFF(seri,*puStack_24); + WriteTargetingDecoy(seri,info->targetingDecoy); + WriteSpeedStage(seri,info->speedStage); + WriteSpeedCounters(seri,info->speedUpCounters,NUM_SPEED_COUNTERS); + WriteSpeedCounters(seri,info->speedDownCounters,NUM_SPEED_COUNTERS); + WriteU8(seri, info->stockpileStage); + WriteU8(seri, info->unk113); + WriteU8(seri, info->moveRandomly); + WriteMoves(seri, &info->moves); + WriteBelly(seri, &info->belly); + WriteBelly(seri, &info->maxBelly); + WriteBool8(seri,info->aiNextToTarget); + WriteBool8(seri,info->recalculateFollow); + WriteBool8(seri,info->waiting); + WriteBool8(seri,info->unk146); + WriteBool8(seri,info->attacking); + WriteBool8(seri,info->unk149); + WriteBool8(seri,info->unk14A); + WriteBool8(seri,info->unk14B); + WriteBool8(seri,info->unk14C); + WriteU16(seri,info->visualFlags); + WriteU16(seri,info->previousVisualFlags); + WriteBool8(seri,info->unk152); + WriteU8(seri,info->unk153); + WriteBool8(seri,info->unk154); + WriteBool8(seri,info->unk155); + WriteBool8(seri,info->unk156); + WriteU8(seri,info->unk164); + WriteU8(seri,info->unk165); + WriteU8(seri,info->unk166); + WriteU8(seri,info->unk167); + WriteU8(seri,info->unk168); + WriteU8(seri,info->turnsSinceWarpScarfActivation); + WriteTilePos(seri,&(info->targetPos)); + WriteS32(seri, info->unk174); + WriteU16(seri, info->abilityEffectFlags); + WriteS16(seri, info->unk1F8); + WriteS16(seri, info->mobileTurnTimer); + WriteU32(seri, info->expGainedInTurn); + WriteClientType(seri, *puStack_90); +} + +static void WriteDungeonFloor(DataSerializer *seri) +{ + s32 x; + s32 y; + s32 i; + + WriteBlame(seri, sMisakiSan); + WriteBool8(seri, gDungeon->unk3A08); + WriteBool8(seri, gDungeon->unk3A09); + WriteBool8(seri, gDungeon->unk3A0A); + WriteBool8(seri, gDungeon->unk3A0B); + WriteU8(seri, gDungeon->unk3A0C); + WriteU8(seri, gDungeon->unk3A0D); + WriteS16(seri, gDungeon->tileset); + WriteS16(seri,gDungeon->unk3A10); + WriteS16(seri, gDungeon->unk3A12); + WriteS16(seri, gDungeon->bossBattleIndex); + WriteS16(seri, gDungeon->unk3A16); + + for (y = 0; y < DUNGEON_MAX_SIZE_Y; y++) { + for (x = 0; x < DUNGEON_MAX_SIZE_X; x++) { + WriteTile(seri, &gDungeon->tiles[y][x]); + } + } + + WriteTilePos(seri, &gDungeon->unkE218); + WriteTilePos(seri, &gDungeon->unkE21C); + + for (i = 0; i < 8; i++) + WriteTilePos(seri, &gDungeon->unkE220[i]); + + WriteDungeonUnkE240(seri, &gDungeon->unkE240); + WriteDungeonUnkE240(seri, &gDungeon->unkE250); + WriteDungeonUnkE260(seri, &gDungeon->unkE260); + + for (y = 0; y < 8; y++) { + for (x = 0; x < 8; x++) { + WriteTile(seri, &gDungeon->unkE27C[y][x]); + WriteU8(seri, gDungeon->unkE87C[y][x]); + } + } + + WriteWeather(seri, &gDungeon->weather); +} + +static void WriteDungeonVisibility(DataSerializer *seri) +{ + WriteBlame(seri, sMisakiSan); + + WriteU8(seri, gDungeon->unk181e8.unk18208); + WriteU8(seri, gDungeon->unk181e8.visibilityRange); + WriteBool8(seri, gDungeon->unk181e8.blinded); + WriteBool8(seri, gDungeon->unk181e8.unk1820B); + WriteBool8(seri, gDungeon->unk181e8.unk1820C); + WriteBool8(seri, gDungeon->unk181e8.unk1820D); + WriteBool8(seri, gDungeon->unk181e8.unk1820E); + WriteBool8(seri, gDungeon->unk181e8.unk1820F); + WriteBool8(seri, gDungeon->unk181e8.hallucinating); + WriteBool8(seri, gDungeon->unk181e8.unk18211); + WriteBool8(seri, gDungeon->unk181e8.unk18213); +} + +static void WriteDungeonMusic(DataSerializer *seri) +{ + WriteS16(seri, gDungeon->musPlayer.songIndex); + WriteS16(seri, gDungeon->musPlayer.pastSongIndex); + WriteS16(seri, gDungeon->musPlayer.queuedSongIndex); +} + +static void WriteItem(DataSerializer *seri, Item *src) +{ + WriteBytes(seri, &src->flags, 1); + WriteBytes(seri, &src->quantity, 1); + WriteBytes(seri, &src->id, 1); +} + +static void WriteMonsterUnk64(DataSerializer *seri, u8 value) +{ + u8 stack; + + stack = value; + + WriteBytes(seri, &stack, 1); +} + +static void WriteActionContainer(DataSerializer *seri, ActionContainer *src) +{ + WriteBytes(seri, &src->direction, 1); + WriteBytes(seri, &src->itemTargetPosition.x, 1); + WriteBytes(seri, &src->itemTargetPosition.y, 1); +} + +static void WriteMonsterID(DataSerializer *seri, s16 value) +{ + s16 stack; + + stack = value; + + WriteBytes(seri, &stack, 2); +} + +static void WriteType(DataSerializer *seri, u8 value) +{ + u8 stack; + + stack = value; + + WriteBytes(seri, &stack, 1); +} + +static void WriteAbility(DataSerializer *seri, u8 value) +{ + u8 stack; + + stack = value; + + WriteBytes(seri, &stack, 1); +} + +static void WriteMonsterUnkFF(DataSerializer *seri, u8 value) +{ + u8 stack; + + stack = value; + + WriteBytes(seri, &stack, 1); +} + +static void WriteTargetingDecoy(DataSerializer *seri, u8 value) +{ + u8 stack; + + stack = value; + + WriteBytes(seri, &stack, 1); +} + +static void WriteSpeedStage(DataSerializer *seri, s32 value) +{ + WriteBytes(seri, &value, 4); +} + +static void WriteTactic(DataSerializer *seri, u8 value) +{ + WriteBytes(seri, &value, 1); +} + +static void WriteHiddenPower(DataSerializer *seri, HiddenPower *src) +{ + WriteS16(seri, src->hiddenPowerBasePower); + WriteType(seri, src->hiddenPowerType); +} + +static void WriteClientType(DataSerializer *seri, u8 value) +{ + WriteU8(seri, value); +} + +static void WriteJoinedAt(DataSerializer *seri, JoinedAt *src) +{ + WriteU8(seri, src->joinedAt); + WriteU8(seri, src->unk1); +} + +static void WriteAITarget(DataSerializer *seri, AITarget* src) +{ + WriteBytes(seri, &src->aiObjective, 1); + WriteBool8(seri, src->aiNotNextToTarget); + WriteBool8(seri, src->aiTargetingEnemy); + WriteBool8(seri, src->aiTurningAround); + WriteU16(seri, src->aiTargetSpawnGenID); + WriteTilePos(seri, &src->aiTargetPos); +} + +static void WriteSleep(DataSerializer *seri, Sleep* src) +{ + WriteBytes(seri, &src->sleep, 1); + WriteU8(seri, src->sleepTurns); +} + +static void WriteNonVolatile(DataSerializer *seri, NonVolatile *src) +{ + WriteBytes(seri, &src->nonVolatileStatus, 1); + WriteU8(seri, src->nonVolatileStatusTurns); + WriteU8(seri, src->nonVolatileStatusDamageCountdown); + WriteU8(seri, src->unk4); +} + +static void WriteImmobilize(DataSerializer *seri, Immobilize *src) +{ + WriteBytes(seri, &src->immobilizeStatus, 1); + WriteU8(seri, src->immobilizeStatusTurns); + WriteU8(seri, src->immobilizeStatusDamageCountdown); + WriteU32(seri, src->unk4); +} + +static void WriteVolatile(DataSerializer *seri, Volatile *src) +{ + WriteBytes(seri, &src->volatileStatus, 1); + WriteU8(seri, src->volatileStatusTurns); +} + +static void WriteCharging(DataSerializer *seri, Charging *src) +{ + WriteBytes(seri, &src->chargingStatus, 1); + WriteU8(seri, src->chargingStatusTurns); + WriteU8(seri, src->chargingStatusMoveIndex); +} + +static void WriteProtection(DataSerializer *seri, Protection *src) +{ + WriteBytes(seri, &src->protectionStatus, 1); + WriteU8(seri, src->protectionStatusTurns); +} + +static void WriteWaiting(DataSerializer *seri, Waiting *src) +{ + WriteBytes(seri, &src->waitingStatus, 1); + WriteBool8(seri, src->enemyDecoy); + WriteBool8(seri, src->unk2); + WriteU8(seri, src->waitingStatusTurns); + WriteU8(seri, src->curseDamageCountdown); +} + +static void WriteLinked(DataSerializer *seri, Linked *src) +{ + WriteBytes(seri, &src->linkedStatus, 1); + WriteU32(seri, src->unk4); + WriteU8(seri, src->unk8); + WriteU8(seri, src->linkedStatusTurns); + WriteU8(seri, src->linkedStatusDamageCountdown); +} + +static void WriteMoveStatus(DataSerializer *seri, MoveStatus* src) +{ + WriteBytes(seri, &src->moveStatus, 1); + WriteU8(seri, src->moveStatusTurns); +} + +static void WriteItemStatus(DataSerializer *seri, ItemStatus *src) +{ + WriteBytes(seri, &src->itemStatus, 1); +} + +static void WriteTransformStatus(DataSerializer *seri, TransformStatus *src) +{ + WriteBytes(seri, &src->transformStatus, 1); + WriteU8(seri, src->transformStatusTurns); +} + +static void WriteEyesightStatus(DataSerializer *seri, EyesightStatus *src) +{ + WriteBytes(seri, &src->eyesightStatus, 1); + WriteU8(seri, src->eyesightStatusTurns); +} + +static void WriteMuzzled(DataSerializer *seri, Muzzled *src) +{ + WriteBytes(seri, &src->muzzled, 1); + WriteU8(seri, src->muzzledTurns); +} + +static void WriteMove(DataSerializer *seri, Move *src) +{ + WriteU8(seri, src->moveFlags); + WriteU8(seri, src->moveFlags2); + WriteBytes(seri, &src->id, 2); + WriteU8(seri, src->PP); + WriteU8(seri, src->ginseng); +} + +static void WriteMoves(DataSerializer *seri, Moves *src) +{ + s32 i; + + for (i = 0; i < MAX_MON_MOVES; i++) + WriteMove(seri, &src->moves[i]); + + WriteU8(seri, src->struggleMoveFlags); +} + +static void WriteBelly(DataSerializer *seri, FixedPoint *src) +{ + WriteS16(seri, src->unk0); + WriteS16(seri, src->unk2); +} + +static void WriteIQSkills(DataSerializer *seri, u8 *src) +{ + WriteBytes(seri, src, NUM_PICKED_IQ_SKILLS); +} + +static void WriteTile(DataSerializer *seri, Tile *src) +{ + WriteU16(seri, src->terrainType); + WriteU16(seri, src->unk4); + WriteBytes(seri, &src->room, 1); + WriteBytes(seri, &src->unkE, 1); +} + +static void WriteWeather(DataSerializer *seri, Weather *src) +{ + s32 i; + + WriteBytes(seri, &src->weather, 1); + WriteBytes(seri, &src->unkE265, 1); + + for (i = 0; i < 8; i++) { + WriteU8(seri, src->unkE267[i]); + WriteU8(seri, src->naturalWeather[i]); + } + + WriteU8(seri, src->weatherDamageCounter); + WriteU8(seri, src->mudSportTurns); + WriteU8(seri, src->waterSportTurns); + WriteBool8(seri, src->nullifyWeather); +} + + + + + + + +// Read funcs + + + + + + + + + + +void ReadDungeonState(u8 *buffer, u32 bufLen) +{ + DataSerializer seri; + + InitReader(&seri, buffer, bufLen); + + ReadBytes(&seri, &seri.unkC, 4); + + ReadDungeonUnk644(&seri); + ReadDungeonFloor(&seri); + ReadDungeonVisibility(&seri); + ReadDungeonMusic(&seri); + ReadDungeonItems(&seri); + ReadDungeonTraps(&seri); + ReadDungeonMonsters(&seri); + + ReadBlame(&seri, sYayoiSan); + FinishSerializer(&seri); +} + +static void ReadDungeonUnk644(DataSerializer *seri) +{ + ReadBlame(seri, sMisakiSan); + ReadBytes(seri, &gDungeon->unk644, sizeof(unkDungeon644)); +} + +static void ReadDungeonFloor(DataSerializer *seri) +{ + s32 x; + s32 y; + s32 i; + + ReadBlame(seri, sMisakiSan); + + gDungeon->unk3A08 = ReadBool8(seri); + gDungeon->unk3A09 = ReadBool8(seri); + gDungeon->unk3A0A = ReadBool8(seri); + gDungeon->unk3A0B = ReadBool8(seri); + gDungeon->unk3A0C = ReadU8(seri); + gDungeon->unk3A0D = ReadU8(seri); + gDungeon->tileset = ReadS16(seri); + gDungeon->unk3A10 = ReadS16(seri); + gDungeon->unk3A12 = ReadS16(seri); + gDungeon->bossBattleIndex = ReadS16(seri); + gDungeon->unk3A16 = ReadS16(seri); + + for (y = 0; y < DUNGEON_MAX_SIZE_Y; y++) { + for (x = 0; x < DUNGEON_MAX_SIZE_X; x++) { + ReadTile(seri, &gDungeon->tiles[y][x]); + } + } + + ReadTilePos(seri, &gDungeon->unkE218); + ReadTilePos(seri, &gDungeon->unkE21C); + + for (i = 0; i < 8; i++) + ReadTilePos(seri, &gDungeon->unkE220[i]); + + ReadDungeonUnkE240(seri, &gDungeon->unkE240); + ReadDungeonUnkE240(seri, &gDungeon->unkE250); + ReadDungeonUnkE260(seri, &gDungeon->unkE260); + + for (y = 0; y < 8; y++) { + for (x = 0; x < 8; x++) { + ReadTile(seri,&gDungeon->unkE27C[y][x]); + gDungeon->unkE87C[y][x] = ReadU8(seri); + } + } + + ReadWeather(seri, &gDungeon->weather); +} + +static void ReadTile(DataSerializer *seri, Tile *dst) +{ + memset(dst, 0, sizeof(Tile)); + + dst->terrainType = ReadU16(seri); + dst->unk4 = ReadU16(seri); + + ReadBytes(seri, &dst->room, 1); + ReadBytes(seri, &dst->unkE, 1); + + dst->monster = NULL; + dst->object = NULL; +} + +static void ReadWeather(DataSerializer *seri, Weather *dst) +{ + s32 i; + + memset(dst, 0, sizeof(Weather)); + + ReadBytes(seri, &dst->weather, 1); + ReadBytes(seri, &dst->unkE265, 1); + + for (i = 0; i < 8; i++) { + dst->unkE267[i] = ReadU8(seri); + dst->naturalWeather[i] = ReadU8(seri); + } + + dst->weatherDamageCounter = ReadU8(seri); + dst->mudSportTurns = ReadU8(seri); + dst->waterSportTurns = ReadU8(seri); + dst->nullifyWeather = ReadBool8(seri); +} + +static void ReadDungeonVisibility(DataSerializer *seri) +{ + ReadBlame(seri, sMisakiSan); + + gDungeon->unk181e8.cameraTarget = NULL; + gDungeon->unk181e8.unk18208 = ReadU8(seri); + gDungeon->unk181e8.visibilityRange = ReadU8(seri); + gDungeon->unk181e8.blinded = ReadBool8(seri); + gDungeon->unk181e8.unk1820B = ReadBool8(seri); + gDungeon->unk181e8.unk1820C = ReadBool8(seri); + gDungeon->unk181e8.unk1820D = ReadBool8(seri); + gDungeon->unk181e8.unk1820E = ReadBool8(seri); + gDungeon->unk181e8.unk1820F = ReadBool8(seri); + gDungeon->unk181e8.hallucinating = ReadBool8(seri); + gDungeon->unk181e8.unk18211 = ReadBool8(seri); + gDungeon->unk181e8.unk18213 = ReadBool8(seri); +} + +static void ReadDungeonMusic(DataSerializer *seri) +{ + gDungeon->musPlayer.songIndex = ReadS16(seri); + gDungeon->musPlayer.pastSongIndex = ReadS16(seri); + gDungeon->musPlayer.queuedSongIndex = ReadS16(seri); +} + +static void ReadDungeonItems(DataSerializer *seri) +{ + s32 i; + Item item; + Position pos; + + ReadBlame(seri, sMisakiSan); + + for (i = 0; i < DUNGEON_MAX_ITEMS; i++) { + ReadItem(seri, &item); + ReadTilePos(seri, &pos); + + if (item.flags & ITEM_FLAG_EXISTS) + sub_80460F8(&pos, &item, 0); + } +} + +static void ReadItem(DataSerializer *seri, Item *dst) +{ + memset(dst, 0, sizeof(Item)); + ReadBytes(seri, &dst->flags, 1); + ReadBytes(seri, &dst->quantity, 1); + ReadBytes(seri, &dst->id, 1); +} + +static void ReadDungeonTraps(DataSerializer *seri) +{ + s32 counter; + Tile *tile; + Entity *entity; + Position pos; + u8 isVisible; + u8 unk1; + u8 trapID; + + ReadBlame(seri, sMisakiSan); + + for (counter = 0; counter < DUNGEON_MAX_TRAPS; counter++) { + trapID = TRAP_WARP_TRAP; + unk1 = 0; + ReadBytes(seri, &trapID, 1); + ReadBytes(seri, &unk1, 1); + isVisible = ReadBool8(seri); + ReadTilePos(seri, &pos); + + if (trapID != 0xFF) { + tile = GetTileSafe(pos.x, pos.y); + entity = sub_8045684(trapID, &pos, unk1); + if (entity) { + tile->object = entity; + entity->isVisible = isVisible; + } + } + } +} + +static void ReadDungeonMonsters(DataSerializer *seri) +{ + s32 i; + + ReadBlame(seri, sMisakiSan); + + gDungeon->unk37F0 = ReadU32(seri); + gDungeon->unk37F4 = ReadU32(seri); + gDungeon->plusIsActive[0] = ReadBool8(seri); + gDungeon->plusIsActive[1] = ReadBool8(seri); + gDungeon->minusIsActive[0] = ReadBool8(seri); + gDungeon->minusIsActive[1] = ReadBool8(seri); + gDungeon->decoyActive = ReadBool8(seri); + gDungeon->unk37FD = ReadBool8(seri); + gDungeon->deoxysDefeat = ReadBool8(seri); + gDungeon->unk37FF = ReadBool8(seri); + gDungeon->deoxysForm = ReadU16(seri); // Should be S16 + + for (i = 0; i < MAX_TEAM_MEMBERS; i++) + ReadMonster(seri, TRUE, i); + + for (i = 0; i < DUNGEON_MAX_WILD_POKEMON; i++) + ReadMonster(seri, FALSE, i); +} + +static void ReadMonster(DataSerializer *seri, bool8 isTeamMember, s32 index) +{ + Entity *mon; + Tile *tile; + s32 i; + EntityInfo *monEntInfo; + EntityInfo entInfo = {0}; + Position monPos; + bool8 shouldSpawnMon; + u32 monIsVisible; + u32 spawnGenID; + + ReadU8(seri); // 0xAA + ReadU8(seri); // 0x55 + shouldSpawnMon = ReadU8(seri); + ReadTilePos(seri, &monPos); + monIsVisible = ReadBool8(seri); + spawnGenID = ReadU16(seri); + gLeaderPointer = NULL; + + entInfo.flags = ReadU16(seri); + entInfo.apparentID = ReadMonsterID(seri); + entInfo.id = ReadMonsterID(seri); + entInfo.isNotTeamMember = ReadBool8(seri); + entInfo.isTeamLeader = ReadBool8(seri); + entInfo.shopkeeper = ReadU8(seri); + entInfo.level = ReadU8(seri); + entInfo.teamIndex = ReadU8(seri); + ReadJoinedAt(seri, &entInfo.joinedAt); + entInfo.IQ = ReadS16(seri); + entInfo.HP = ReadS16(seri); + entInfo.maxHPStat = ReadS16(seri); + entInfo.originalHP = ReadS16(seri); + entInfo.atk[0] = ReadU8(seri); + entInfo.atk[1] = ReadU8(seri); + entInfo.def[0] = ReadU8(seri); + entInfo.def[1] = ReadU8(seri); + entInfo.exp = ReadU32(seri); + entInfo.offensiveStages[0] = ReadS16(seri); + entInfo.offensiveStages[1] = ReadS16(seri); + entInfo.defensiveStages[0] = ReadS16(seri); + entInfo.defensiveStages[1] = ReadS16(seri); + entInfo.hitChanceStages[0] = ReadS16(seri); + entInfo.hitChanceStages[1] = ReadS16(seri); + entInfo.flashFireBoost = ReadS16(seri); + entInfo.offensiveMultipliers[0] = ReadS32(seri); + entInfo.offensiveMultipliers[1] = ReadS32(seri); + entInfo.defensiveMultipliers[0] = ReadS32(seri); + entInfo.defensiveMultipliers[1] = ReadS32(seri); + ReadActionContainer(seri, &entInfo.action); + entInfo.types[0] = ReadType(seri); + entInfo.types[1] = ReadType(seri); + entInfo.abilities[0] = ReadAbility(seri); + entInfo.abilities[1] = ReadAbility(seri); + ReadItem(seri, &entInfo.heldItem); + entInfo.unk64 = ReadMonsterUnk64(seri); + + for (i = 0; i < NUM_PREV_POS; i++) + ReadTilePos(seri, &entInfo.prevPos[i]); + + ReadAITarget(seri, &entInfo.aiTarget); + ReadIQSkills(seri, entInfo.IQSkillMenuFlags); + ReadIQSkills(seri, entInfo.IQSkillFlags); + entInfo.tactic = ReadTactic(seri); + ReadHiddenPower(seri, &entInfo.hiddenPower); + entInfo.unk98 = ReadU32(seri); + entInfo.unk9C = ReadU32(seri); + entInfo.unkA0 = ReadU32(seri); + ReadSleep(seri, &entInfo.sleep); + ReadNonVolatile(seri,&entInfo. nonVolatile); + ReadImmobilize(seri, &entInfo.immobilize); + ReadVolatileStatus(seri, &entInfo.volatileStatus); + ReadCharging(seri, &entInfo.charging); + ReadProtection(seri, &entInfo.protection); + ReadWaiting(seri, &entInfo.waitingStruct); + ReadLinked(seri, &entInfo.linked); + ReadMoveStatus(seri, &entInfo.moveStatus); + ReadItemStatus(seri, &entInfo.itemStatus); + ReadTransformStatus(seri, &entInfo.transformStatus); + ReadEyesightStatus(seri, &entInfo.eyesightStatus); + ReadMuzzled(seri, &entInfo.muzzled); + entInfo.powerEars = ReadBool8(seri); + entInfo.scanning = ReadBool8(seri); + entInfo.stairSpotter = ReadBool8(seri); + entInfo.unkF3 = ReadBool8(seri); + entInfo.grudge = ReadBool8(seri); + entInfo.expMultiplier = ReadU8(seri); + entInfo.exposed = ReadBool8(seri); + entInfo.isColorChanged = ReadBool8(seri); + entInfo.bossFlag = ReadBool8(seri); + entInfo.terrifiedTurns = ReadU8(seri); + entInfo.useHeldItem = ReadBool8(seri); + entInfo.perishSongTurns = ReadU8(seri); + entInfo.unkFE = ReadU8(seri); + entInfo.unkFF = ReadMonsterUnkFF(seri); + + entInfo.targetingDecoy = ReadTargetingDecoy(seri); + entInfo.speedStage = ReadSpeedStage(seri); + ReadSpeedCounters(seri, entInfo.speedUpCounters, NUM_SPEED_COUNTERS); + ReadSpeedCounters(seri, entInfo.speedDownCounters, NUM_SPEED_COUNTERS); + entInfo.stockpileStage = ReadU8(seri); + entInfo.unk113 = ReadU8(seri); + entInfo.moveRandomly = ReadU8(seri); + ReadMoves(seri, &entInfo.moves); + ReadBelly(seri, &entInfo.belly); + ReadBelly(seri, &entInfo.maxBelly); + entInfo.aiNextToTarget = ReadBool8(seri); + entInfo.recalculateFollow = ReadBool8(seri); + entInfo.waiting = ReadBool8(seri); + entInfo.unk146 = ReadBool8(seri); + entInfo.attacking = ReadBool8(seri); + entInfo.unk149 = ReadBool8(seri); + entInfo.unk14A = ReadBool8(seri); + entInfo.unk14B = ReadBool8(seri); + entInfo.unk14C = ReadBool8(seri); + entInfo.visualFlags = ReadU16(seri); + entInfo.previousVisualFlags = ReadU16(seri); + entInfo.unk152 = ReadBool8(seri); + entInfo.unk153 = ReadU8(seri); + entInfo.unk154 = ReadBool8(seri); + entInfo.unk155 = ReadBool8(seri); + entInfo.unk156 = ReadBool8(seri); + entInfo.unk164 = ReadU8(seri); + entInfo.unk165 = ReadU8(seri); + entInfo.unk166 = ReadU8(seri); + entInfo.unk167 = ReadU8(seri); + entInfo.unk168 = ReadU8(seri); + entInfo.turnsSinceWarpScarfActivation = ReadU8(seri); + ReadTilePos(seri, &entInfo.targetPos); + entInfo.unk174 = ReadS32(seri); + entInfo.abilityEffectFlags = ReadU16(seri); + entInfo.unk1F8 = ReadS16(seri); + entInfo.mobileTurnTimer = ReadS16(seri); + entInfo.expGainedInTurn = ReadU32(seri); + entInfo.clientType = ReadClientType(seri); + + gLeaderPointer = NULL; + if (shouldSpawnMon) { + if (isTeamMember) + mon = sub_80828E0(entInfo.id, entInfo.apparentID, index); + else + mon = sub_8082A08(entInfo.id, entInfo.apparentID, index); + + if (mon != NULL) { + monEntInfo = GetEntInfo(mon); + tile = GetTileSafe(monPos.x, monPos.y); + mon->prevPos = monPos; + mon->pos = monPos; + tile->monster = mon; + mon->isVisible = monIsVisible; + mon->spawnGenID = spawnGenID; + memcpy(monEntInfo, &entInfo, sizeof(EntityInfo)); + gLeaderPointer = NULL; + + if (monEntInfo->isTeamLeader) { + gUnknown_203B410.x = mon->pos.x; + gUnknown_203B410.y = mon->pos.y; + } + + LoadIQSkills(mon); + sub_804535C(mon, NULL); + } + } +} + +// Related to sub_80453AC +static Entity* sub_80828E0(s16 id, s16 apparentID, s32 index) +{ + s32 r1; + s32 r2; + s32 r3; + s32 r4; + u8 apparentBodySize; + Entity *entity; + s32 appID; + s32 id_; + + id_ = id; // SpeciesId() ? + appID = apparentID; // SpeciesId() ? + r4 = -1; + apparentBodySize = GetBodySize(appID); + + for (r3 = 0; r3 <= MAX_TEAM_BODY_SIZE - apparentBodySize; r3++) { + for (r2 = 0; r2 < apparentBodySize; r2++) { + if (gUnknown_202EE70[r3 + r2] != 0) + break; + } + + if (r2 == apparentBodySize) { + r4 = r3; + break; + } + } + + if (r4 == -1) + return NULL; + + entity = gDungeon->teamPokemon[index]; + entity->type = ENTITY_MONSTER; + entity->unk24 = index; + entity->axObj.info = &gDungeon->unk69C[index]; + entity->axObj.info->id = id_; + entity->axObj.info->apparentID = appID; + entity->axObj.info->isNotTeamMember = FALSE; + + entity->axObj.spriteFile = GetSpriteData(appID); + entity->axObj.unk40_maybeAnimTimer = (r4 * 0x10) + 0x40; + entity->axObj.unk42_animId1 = 7; + entity->axObj.unk44_direction1 = 0; + entity->axObj.unk43_animId2 = 0xFF; + entity->axObj.unk45_orientation = 1; + entity->axObj.unk47 = 1; + + entity->unk1C = 0; + sub_8045ACC(); + entity->axObj.info->unk167 = r4; + entity->axObj.info->unk168 = apparentBodySize; + + for (r1 = 0; r1 < apparentBodySize; r1++) { + gUnknown_202EE70[r4] = 1; + r4++; + } + + return entity; +} + +// Related to sub_804550C +// Fakematch with registers. See https://decomp.me/scratch/KpZyK +static Entity* sub_8082A08(s16 id, s16 apparentID, s32 index) +{ + s32 r1; + s32 r2; + s32 r3; + u8 apparentBodySize; // r6 + Entity *entity; // r7 + #ifdef NONMATCHING + s32 r8; + s32 appID; // r9 + #else + register s32 r8 asm("r8"); + register s32 appID asm("r9"); // r9 + #endif + s32 id_; // sp + + id_ = id; // SpeciesId() ? + appID = apparentID; // SpeciesId() ? + r8 = -1; + apparentBodySize = GetBodySize(appID); + + for (r3 = 0; r3 <= DUNGEON_MAX_WILD_POKEMON_BODY_SIZE - apparentBodySize; r3++) { + for (r2 = 0; r2 < apparentBodySize; r2++) { + if (gUnknown_202EE76[r3 + r2] != 0) + break; + } + + if (r2 == apparentBodySize) { + r8 = r3; + break; + } + } + + if (r8 == -1) + return NULL; + + entity = gDungeon->wildPokemon[index]; + entity->type = ENTITY_MONSTER; + entity->unk24 = index; + entity->unk22 = 0; + entity->axObj.info = &gDungeon->unkEBC[index]; + entity->axObj.info->id = id_; + entity->axObj.info->apparentID = appID; + entity->axObj.info->isNotTeamMember = TRUE; + + entity->axObj.spriteFile = GetSpriteData(appID); + entity->axObj.unk40_maybeAnimTimer = (r8 * 0x10) + 0xA0; + entity->axObj.unk42_animId1 = 7; + entity->axObj.unk44_direction1 = 0; + entity->axObj.unk43_animId2 = 0xFF; + entity->axObj.unk45_orientation = 1; + entity->axObj.unk47 = 1; + + entity->unk1C = 0; + entity->axObj.info->unk167 = r8; + entity->axObj.info->unk168 = apparentBodySize; + + for (r1 = 0; r1 < apparentBodySize; r1++) { + gUnknown_202EE76[r8] = 1; + r8++; + } + + sub_8045ACC(); + + return entity; +} + +void sub_8082B40(void) +{ + EntityInfo *info; + Entity *entity; + s32 i; + Position pos; + + for (i = 0; i < DUNGEON_MAX_POKEMON; i++) { + entity = gDungeon->allPokemon[i]; + if (EntityExists(entity)) { + info = GetEntInfo(entity); + entity->axObj.spriteFile = GetSpriteData(info->apparentID); + sub_806CCB4(entity, sub_806CEBC(entity)); + pos = entity->pos; + AddPokemonDungeonSprite(info->unk98, info->apparentID, &pos, 3); + entity->room = GetTileSafe(entity->pos.x, entity->pos.y)->room; + } + } +} + +static s16 ReadMonsterID(DataSerializer *seri) +{ + s16 temp[2]; + + temp[0] = 0; + + ReadBytes(seri, temp, 2); + return temp[0]; +} + +static u8 ReadMonsterUnk64(DataSerializer *seri) +{ + u8 temp[4]; + + temp[0] = 0; + + ReadBytes(seri, temp, 1); + return temp[0]; +} + +static u8 ReadType(DataSerializer *seri) +{ + u8 temp[4]; + + temp[0] = 0; + + ReadBytes(seri, temp, 1); + return temp[0]; +} + +static u8 ReadAbility(DataSerializer *seri) +{ + u8 temp[4]; + + temp[0] = 0; + + ReadBytes(seri, temp, 1); + return temp[0]; +} + +static u8 ReadMonsterUnkFF(DataSerializer *seri) +{ + u8 temp[4]; + + temp[0] = 0; + + ReadBytes(seri, temp, 1); + return temp[0]; +} + +static u8 ReadTargetingDecoy(DataSerializer *seri) +{ + u8 temp[4]; + + temp[0] = 0; + + ReadBytes(seri, temp, 1); + return temp[0]; +} + +static s32 ReadSpeedStage(DataSerializer *seri) +{ + s32 temp; + + temp = 0; + + ReadBytes(seri, &temp, 4); + return temp; +} + +static u8 ReadTactic(DataSerializer *seri) +{ + u8 temp[4]; + + temp[0] = 0; + + ReadBytes(seri, temp, 1); + return temp[0]; +} + +static u8 ReadClientType(DataSerializer *seri) +{ + u8 temp[4]; + + temp[0] = 0; + + ReadBytes(seri, temp, 1); + return temp[0]; +} + +static void ReadActionContainer(DataSerializer *seri, ActionContainer *dst) +{ + dst->action = ACTION_NOTHING; + ReadBytes(seri, &dst->direction, 1); + dst->unk3 = 7; + ReadTilePos(seri, &dst->itemTargetPosition); +} + +static void ReadAITarget(DataSerializer *seri, AITarget *dst) +{ + ReadBytes(seri, &dst->aiObjective, 1); + dst->aiNotNextToTarget = ReadBool8(seri); + dst->aiTargetingEnemy = ReadBool8(seri); + dst->aiTurningAround = ReadBool8(seri); + dst->aiTargetSpawnGenID = ReadU16(seri); + dst->aiTarget = NULL; + dst->unkC = 0; + ReadTilePos(seri, &dst->aiTargetPos); +} + +static void ReadIQSkills(DataSerializer *seri, u8 *dst) +{ + ReadBytes(seri, dst, NUM_PICKED_IQ_SKILLS); +} + +static void ReadSleep(DataSerializer *seri, Sleep *dst) +{ + ReadBytes(seri, &dst->sleep, 1); + dst->sleepTurns = ReadU8(seri); +} + +static void ReadNonVolatile(DataSerializer *seri, NonVolatile *dst) +{ + ReadBytes(seri, &dst->nonVolatileStatus, 1); + dst->nonVolatileStatusTurns = ReadU8(seri); + dst->nonVolatileStatusDamageCountdown = ReadU8(seri); + dst->unk4 = ReadU8(seri); +} + +static void ReadImmobilize(DataSerializer *seri, Immobilize *dst) +{ + ReadBytes(seri, &dst->immobilizeStatus, 1); + dst->immobilizeStatusTurns = ReadU8(seri); + dst->immobilizeStatusDamageCountdown = ReadU8(seri); + dst->unk4 = ReadU32(seri); +} + +static void ReadVolatileStatus(DataSerializer *seri, Volatile *dst) +{ + ReadBytes(seri, &dst->volatileStatus, 1); + dst->volatileStatusTurns = ReadU8(seri); +} + +static void ReadCharging(DataSerializer *seri, Charging *dst) +{ + ReadBytes(seri, &dst->chargingStatus, 1); + dst->chargingStatusTurns = ReadU8(seri); + dst->chargingStatusMoveIndex = ReadU8(seri); +} + +static void ReadProtection(DataSerializer *seri, Protection *dst) +{ + ReadBytes(seri, &dst->protectionStatus, 1); + dst->protectionStatusTurns = ReadU8(seri); +} + +static void ReadWaiting(DataSerializer *seri, Waiting *dst) +{ + ReadBytes(seri, &dst->waitingStatus, 1); + dst->enemyDecoy = ReadBool8(seri); + dst->unk2 = ReadBool8(seri); + dst->waitingStatusTurns = ReadU8(seri); + dst->curseDamageCountdown = ReadU8(seri); +} + +static void ReadLinked(DataSerializer *seri, Linked *dst) +{ + ReadBytes(seri, &dst->linkedStatus, 1); + dst->unk4 = ReadU32(seri); + dst->unk8 = ReadU8(seri); + dst->linkedStatusTurns = ReadU8(seri); + dst->linkedStatusDamageCountdown = ReadU8(seri); +} + +static void ReadMoveStatus(DataSerializer *seri, MoveStatus *dst) +{ + ReadBytes(seri, &dst->moveStatus, 1); + dst->moveStatusTurns = ReadU8(seri); +} + +static void ReadItemStatus(DataSerializer *seri, ItemStatus *dst) +{ + ReadBytes(seri, &dst->itemStatus, 1); +} + +static void ReadTransformStatus(DataSerializer *seri, TransformStatus *dst) +{ + ReadBytes(seri, &dst->transformStatus, 1); + dst->transformStatusTurns = ReadU8(seri); +} + +static void ReadEyesightStatus(DataSerializer *seri, EyesightStatus *dst) +{ + ReadBytes(seri, &dst->eyesightStatus, 1); + dst->eyesightStatusTurns = ReadU8(seri); +} + +static void ReadMuzzled(DataSerializer *seri, Muzzled *dst) +{ + ReadBytes(seri, &dst->muzzled, 1); + dst->muzzledTurns = ReadU8(seri); +} + +static void ReadMove(DataSerializer *seri, Move *dst) +{ + dst->moveFlags = ReadU8(seri); + dst->moveFlags2 = ReadU8(seri); + ReadBytes(seri, &dst->id, 2); + dst->PP = ReadU8(seri); + dst->ginseng = ReadU8(seri); +} + +static void ReadMoves(DataSerializer *seri, Moves *dst) +{ + s32 i; + Move *move; + + for (i = 0; i < MAX_MON_MOVES; i++) { + move = &dst->moves[i]; + ReadMove(seri, move); + } + + dst->struggleMoveFlags = ReadU8(seri); +} + +static void ReadBelly(DataSerializer *seri, FixedPoint *dst) +{ + dst->unk0 = ReadS16(seri); + dst->unk2 = ReadS16(seri); +} + +static void ReadJoinedAt(DataSerializer *seri, JoinedAt *dst) +{ + dst->joinedAt = ReadU8(seri); + dst->unk1 = ReadU8(seri); +} + +static void ReadHiddenPower(DataSerializer *seri, HiddenPower *dst) +{ + dst->hiddenPowerBasePower = ReadS16(seri); + dst->hiddenPowerType = ReadType(seri); +} + +static void InitWriter(DataSerializer *seri, u8 *buffer, u32 bufLen) +{ + seri->stream = buffer; + seri->count = 0; + seri->end = buffer + bufLen; +} + +static void WriteBytes(DataSerializer *seri, void *src, s32 numBytes) +{ + u8 *curByte; + + curByte = src; + + while (numBytes != 0) { + *seri->stream = *curByte; + seri->stream++; + curByte++; + numBytes--; + seri->count++; + } +} + +static void InitReader(DataSerializer *seri, u8 *buffer, u32 bufLen) +{ + seri->stream = buffer; + seri->count = 0; + seri->end = buffer + bufLen; +} + +static void ReadBytes(DataSerializer *seri, void *dst, s32 numBytes) +{ + u8 *curByte; + + curByte = dst; + + while (numBytes != 0) { + *curByte = *seri->stream; + seri->stream++; + curByte++; + numBytes--; + seri->count++; + } +} + +static void FinishSerializer(DataSerializer *seri) +{ +} + +static void WriteBlame(DataSerializer *seri, const u8 *blame) +{ + WriteBytes(seri, (u8 *)blame, BLAME_SIZE); +} + +static void ReadBlame(DataSerializer *seri, const u8 *expected) +{ + u8 auStack_10[BLAME_STACK_SIZE]; + + ReadBytes(seri, auStack_10, BLAME_SIZE); + auStack_10[BLAME_SIZE] = 0; +} + +static void WriteU16(DataSerializer *seri, u16 value) +{ + u16 uStack_8; + + uStack_8 = value; + + WriteBytes(seri, &uStack_8, 2); +} + +static void WriteS16(DataSerializer *seri, s16 value) +{ + s16 uStack_8; + + uStack_8 = value; + + WriteBytes(seri, &uStack_8, 2); +} + +static void WriteU8(DataSerializer *seri, u8 value) +{ + u8 uStack_8; + + uStack_8 = value; + + WriteBytes(seri, &uStack_8, 1); +} + +static void WriteU32(DataSerializer *seri, u32 value) +{ + u32 uStack_8; + + uStack_8 = value; + + WriteBytes(seri, &uStack_8, 4); +} + +UNUSED static void sub_808308C(DataSerializer *seri, u32 value) +{ + u32 uStack_8; + + uStack_8 = value; + + WriteBytes(seri, &uStack_8, 4); +} + +static void WriteS32(DataSerializer *seri, s32 value) +{ + s32 uStack_8; + + uStack_8 = value; + + WriteBytes(seri, &uStack_8, 4); +} + +static void WriteBool8(DataSerializer *seri, bool8 value) +{ + u8 local_8; + + local_8 = value ? -1 : 0; + + WriteBytes(seri, &local_8, 1); +} + +static void WriteTilePos(DataSerializer *seri, Position *src) +{ + WriteBytes(seri, &src->x, 1); + WriteBytes(seri, &src->y, 1); +} + +static void WriteDungeonUnkE240(DataSerializer *seri, unkDungeonE240 *src) +{ + WriteBytes(seri, &src->unk0, 1); + WriteBytes(seri, &src->unk4, 1); + WriteBytes(seri, &src->unk8, 1); + WriteBytes(seri, &src->unkC, 1); +} + +static void WriteDungeonUnkE260(DataSerializer *seri, unkDungeonE260 *src) +{ + WriteBytes(seri, &src->unk0, 1); + WriteBytes(seri, &src->unk2, 1); +} + +static void WriteSpeedCounters(DataSerializer *seri, u8 *src, u32 numCounters) +{ + WriteBytes(seri, src, numCounters); +} + +static u16 ReadU16(DataSerializer *seri) +{ + u16 local_8; + + ReadBytes(seri, &local_8, 2); + return local_8; +} + +static s16 ReadS16(DataSerializer *seri) +{ + s16 local_8; + + ReadBytes(seri, &local_8, 2); + return local_8; +} + +static u8 ReadU8(DataSerializer *seri) +{ + u8 local_8; + + ReadBytes(seri, &local_8, 1); + return local_8; +} + +static u32 ReadU32(DataSerializer *seri) +{ + u32 local_8; + + ReadBytes(seri, &local_8, 4); + return local_8; +} + +UNUSED static u32 sub_80831B4(DataSerializer *seri) +{ + u32 local_8; + + ReadBytes(seri, &local_8, 4); + return local_8; +} + +static s32 ReadS32(DataSerializer *seri) +{ + s32 local_8; + + ReadBytes(seri, &local_8, 4); + return local_8; +} + +static bool8 ReadBool8(DataSerializer *seri) +{ + u8 local_8; + + ReadBytes(seri, &local_8, 1); + return local_8 != 0; +} + +static void ReadTilePos(DataSerializer *seri, Position *dst) +{ + dst->x = 0; + dst->y = 0; + ReadBytes(seri, &dst->x, 1); + ReadBytes(seri, &dst->y, 1); +} + +static void ReadDungeonUnkE240(DataSerializer *seri, unkDungeonE240 *dst) +{ + dst->unk0 = 0; + dst->unk4 = 0; + dst->unk8 = 0; + dst->unkC = 0; + ReadBytes(seri, &dst->unk0, 1); + ReadBytes(seri, &dst->unk4, 1); + ReadBytes(seri, &dst->unk8, 1); + ReadBytes(seri, &dst->unkC, 1); +} + +static void ReadDungeonUnkE260(DataSerializer *seri, unkDungeonE260 *dst) +{ + dst->unk0 = 0; + dst->unk2 = 0; + ReadBytes(seri, &dst->unk0, 1); + ReadBytes(seri, &dst->unk2, 1); +} + +static void ReadSpeedCounters(DataSerializer *seri, u8 *dst, u32 numCounters) +{ + ReadBytes(seri, dst, numCounters); +} \ No newline at end of file diff --git a/src/status.c b/src/status.c index 78189565..a53e7fab 100644 --- a/src/status.c +++ b/src/status.c @@ -816,7 +816,7 @@ void HandleLeechSeed(Entity * pokemon, Entity * target, bool8 displayMessage) entityInfo->linked.linkedStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EB0, TRUE) + 1; entityInfo->linked.linkedStatusDamageCountdown = 0; nullsub_78(target); - entityInfo->linked.unkD8 = 0xff; + entityInfo->linked.unk8 = 0xff; break; case STATUS_LEECH_SEED: TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FAE7C); @@ -825,9 +825,9 @@ void HandleLeechSeed(Entity * pokemon, Entity * target, bool8 displayMessage) for(index = 0; index < DUNGEON_MAX_POKEMON; index++) { if (pokemon == gDungeon->allPokemon[index]) { - entityInfo->linked.unkD8 = index; + entityInfo->linked.unk8 = index; entityInfo2 = GetEntInfo(pokemon); - entityInfo->linked.unkD4 = entityInfo2->unk98; + entityInfo->linked.unk4 = entityInfo2->unk98; } } TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FAE58); @@ -852,7 +852,7 @@ void sub_8078084(Entity * pokemon) entityInfo2 = GetEntInfo(target); if((u8)(entityInfo2->linked.linkedStatus - 1) <= 1) { - if(entityInfo2->linked.unkD4 == entityInfo->unk98) + if(entityInfo2->linked.unk4 == entityInfo->unk98) { entityInfo2->linked.linkedStatus = STATUS_NONE; EntityUpdateStatusSprites(target); @@ -884,7 +884,7 @@ void DestinyBondStatusTarget(Entity * pokemon, Entity * target) entityInfo->linked.linkedStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EF0,TRUE) + 1; entityInfo->linked.linkedStatusDamageCountdown = zero; nullsub_74(target); - entityInfo->linked.unkD8 = 0xff; + entityInfo->linked.unk8 = 0xff; } else { @@ -894,9 +894,9 @@ void DestinyBondStatusTarget(Entity * pokemon, Entity * target) for(index = 0; index < DUNGEON_MAX_POKEMON; index++) { if (target == gDungeon->allPokemon[index]) { - entityInfo->linked.unkD8 = index; + entityInfo->linked.unk8 = index; entityInfo2 = GetEntInfo(target); - entityInfo->linked.unkD4 = entityInfo2->unk98; + entityInfo->linked.unk4 = entityInfo2->unk98; } } TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBB4C); @@ -984,7 +984,7 @@ void FocusEnergyStatusTarget(Entity *pokemon, Entity * target) } } -void sub_80783C4(Entity * pokemon, Entity * target, u8 param_3) +void sub_80783C4(Entity * pokemon, Entity * target, bool8 param_3) { EntityInfo *targetEntityInfo; EntityInfo *entityInfo; @@ -1016,7 +1016,7 @@ void sub_80783C4(Entity * pokemon, Entity * target, u8 param_3) } targetEntityInfo->waitingStruct.waitingStatus = STATUS_DECOY; targetEntityInfo->waitingStruct.enemyDecoy = GetEntInfo(pokemon)->isNotTeamMember; - targetEntityInfo->waitingStruct.unkCA = param_3; + targetEntityInfo->waitingStruct.unk2 = param_3; targetEntityInfo->waitingStruct.waitingStatusTurns = CalculateStatusTurns(target,gUnknown_80F4ED0,TRUE) + 1; targetEntityInfo->waitingStruct.curseDamageCountdown = 0; sub_806CCB4(target,sub_806CEBC(target)); diff --git a/src/status_actions.c b/src/status_actions.c index 2a1fb417..c9e9e9ee 100644 --- a/src/status_actions.c +++ b/src/status_actions.c @@ -45,7 +45,6 @@ extern void sub_806F370(Entity *r0, Entity *r1, u32, u32, u8 *, u8, s32, u32, u3 extern void sub_807FC3C(Position *, u32, u32); extern void sub_8042A64(Position *); extern void sub_8040A84(void); -extern void sub_8049ED4(void); extern void sub_80498A8(s32, s32); extern void sub_8042A54(Position *); extern void sub_8049BB0(s32, s32); @@ -80,7 +79,7 @@ extern void sub_8075C58(Entity *, Entity *, s32, s32); extern void DealDamageToEntity(Entity *, s32, u32, u32); extern bool8 MoveRequiresCharging(Entity* pokemon,u16 moveID); -extern void sub_80783C4(Entity *, Entity *, u32); +extern void sub_80783C4(Entity *, Entity *, bool8); // NOTE: Override pokemon.c types for these two funcs @@ -342,7 +341,7 @@ bool8 sub_805B2FC(Entity * pokemon,Entity * target,Move *move, s32 param_4) bool8 sub_805B314(Entity * pokemon,Entity * target,Move *move, s32 param_4) { - sub_80783C4(pokemon, target, 1); + sub_80783C4(pokemon, target, TRUE); return TRUE; } diff --git a/src/tile_types.c b/src/tile_types.c index a0277f8f..078eee7b 100644 --- a/src/tile_types.c +++ b/src/tile_types.c @@ -88,7 +88,6 @@ extern void sub_80498A8(s32, s32); extern void sub_80402AC(s32, s32); extern void sub_8049BB0(s32, s32); void sub_8042A14(Position *); -extern void sub_8049ED4(void); bool8 PosHasItem(Position *pos) { diff --git a/src/trap.c b/src/trap.c index 54f96b19..fcd79853 100644 --- a/src/trap.c +++ b/src/trap.c @@ -2,6 +2,7 @@ #include "trap.h" #include "code_803E668.h" +#include "code_8041AD0.h" #include "code_8045A00.h" #include "dungeon_message.h" #include "code_8077274_1.h" @@ -79,12 +80,10 @@ void sub_8045C28(Item *, u8 , u8); void sub_8045BF8(u8 *, Item *); void DealDamageToEntity(Entity *,s16,u32,u32); void sub_806F480(Entity *, u32); -extern void sub_80421C0(Entity *, u32); void sub_804225C(Entity *, Position *, u8); void sub_8071DA4(Entity *); extern u8 sub_803F428(Position *pos); void sub_806A1E8(Entity *pokemon); -void sub_8049ED4(void); u8 sub_803D6FC(void); Entity *sub_8045684(u8, Position *, u8); extern void sub_807DF38(Entity *pokemon, Entity *target, Position *pos, u32, u8 moveType, s16); diff --git a/src/trap_1.c b/src/trap_1.c index 63a8161d..58285376 100644 --- a/src/trap_1.c +++ b/src/trap_1.c @@ -1,103 +1,14 @@ #include "global.h" -#include "structs/dungeon_entity.h" -#include "structs/map.h" -#include "trap.h" #include "code_803E668.h" +#include "code_8041AD0.h" #include "code_806CD90.h" -#include "code_8092334.h" #include "dungeon_map_access.h" -#include "items.h" #include "dungeon_util.h" -#include "structs/str_dungeon.h" -#include "structs/str_traps.h" +#include "items.h" -extern u8 gMisakiSan[]; -extern u8 gYayoiSan[]; +// TODO: Merge this file with trap.c after "HandlePokemonTrap" is in c -extern void WriteBytes(DataSerializer *, void *, s32); - -static void WriteDungeonTile(DataSerializer *r0, Tile *tile); -void sub_80830F8(void * , u32*); -void sub_808312C(void *, u16 *); -static void WriteDungeonWeather(DataSerializer *r0, Weather *weather); -void WriteU32(void *, u32); -void WriteBool8(void *, u8); -void WriteU16(void *, u16); -void SaveEntity(DataSerializer *param_1, Entity *); -void Write8Bytes(DataSerializer *param_1, u8 *); -void WriteDungeonItem(DataSerializer *param_1, Item *param_2); -void sub_8080B90(DataSerializer *param_1); -void WriteDungeonItems(DataSerializer *param_1); -void sub_8081454(DataSerializer *param_1); -void sub_808165C(DataSerializer *param_1); -void SaveDungeonMusic(DataSerializer *param_1); -void SaveTrapData(DataSerializer *param_1); -void sub_8080CF0(DataSerializer *param_1); -void nullsub_98(DataSerializer *param_1); -void InitByteWriter(DataSerializer *param_1, u8*, u32); -void sub_8049ED4(void); -void WriteU8(DataSerializer *param_1, u32); -void sub_80817F4(DataSerializer *param_1, u32 param_2); -void WriteS32(DataSerializer *param_1, u32); -void sub_808180C(DataSerializer *param_1, u32 param_2); -void WriteS16(DataSerializer *param_1, u32); -static void WriteJoinedAt(DataSerializer *param_1, JoinedAt *param_2); -void SaveActionContainer(DataSerializer *param_1, ActionContainer *param_2); -void sub_8081B34(DataSerializer *r0, s16 *r1); -void SaveEntityMoves(DataSerializer *r0, Moves *move); -void sub_8081824(DataSerializer *param_1, u32 param_2); -void sub_80817B0(DataSerializer *param_1, u32 param_2); -void WritePosition8(void*, Position *); -void SaveAITargetStatus(DataSerializer *param_1, AITarget* param_2); -void SaveIQFlags(DataSerializer *r0, u8 *r1); -void SaveSpeedStage(DataSerializer *param_1, s32 param_2); -void sub_8081854(DataSerializer *param_1, s32 param_2); -void sub_808183C(DataSerializer *param_1, s32 param_2); -void SaveMuzzledStatus(DataSerializer *param_1, Muzzled *param_2); -void SaveEyesightStatus(DataSerializer *param_1, EyesightStatus *param_2); -void SaveTransformStatus(DataSerializer *param_1, TransformStatus *param_2); -void SaveItemStatus(DataSerializer *param_1, ItemStatus *param_2); -void SaveMoveStatus(DataSerializer *param_1, MoveStatus* param_2); -void SaveLinkedStatus(DataSerializer *param_1, Linked *param_2); -void SaveVolatileStatus(DataSerializer *param_1, Volatile *param_2); -void SaveImmobilizeStatus(DataSerializer *param_1, Immobilize *param_2); -void SaveNonVolatileStatus(DataSerializer *param_1, NonVolatile *param_2); -void SaveEntitySleep(DataSerializer *param_1, Sleep* param_2); -void SaveTactic(DataSerializer *param_1, u8 param_2); -void SaveDungeonHiddenPower(DataSerializer *param_1, HiddenPower *param_2); -void SaveChargingStatus(DataSerializer *param_1, Charging *param_2); -void SaveProtectionStatus(DataSerializer *param_1, Protection *param_2); -void SaveWaitingStatus(DataSerializer *param_1, Waiting *param_2); -void xxx_WriteBytes(DataSerializer *param_1, u8 *speedCounters, u32 numCounters); -void SaveClientType(DataSerializer *param_1, u8 param_2); -void sub_80421C0(Entity *, u16); -void sub_804687C(Entity *, Position *, Position *, Item *, u32); -extern void sub_8083018(DataSerializer *, u8 *); -extern void sub_8081C50(DataSerializer *); -extern void sub_8081C7C(DataSerializer *); -extern void sub_8081F2C(DataSerializer *); -extern void RestoreDungeonMusic(DataSerializer *); -extern void RestoreItemData(DataSerializer *); -extern void RestoreTrapData(DataSerializer *); -extern void sub_808217C(DataSerializer *); -extern void InitByteReader(DataSerializer *param_1, u8 *r1, u32 r2); -extern void ReadBytes(DataSerializer *, void *, u32); -u8 ReadBool8(DataSerializer *r0); -u8 ReadU8(DataSerializer *r0); -s16 ReadS16(DataSerializer *r0); -void ReadPosition8(DataSerializer *r0, Position *); -void RestoreDungeonWeather(DataSerializer *r0, Weather *); -void sub_8083220(DataSerializer *r0, u32 *); -void sub_8083260(DataSerializer *r0, u16 *); -void RestoreTile(DataSerializer *r0, Tile *); -extern u16 ReadU16(DataSerializer *param_1); -void sub_80820A8(DataSerializer *r0, Item *); -void sub_80460F8(Position *, Item *, u32); -Entity *sub_8045684(u8, Position *, u8); -u32 sub_80831A0(DataSerializer *param_1); -void RestoreDungeonEntity(DataSerializer *param_1,bool8 isTeamMember,s32 index); - -extern u8 gYayoiSan[]; +extern void sub_804687C(Entity *, Position *, Position *, Item *, u32); void HandleTripTrap(Entity *pokemon, Entity *target) { @@ -137,882 +48,4 @@ void SetTrap(Tile *tile, u8 id) } sub_8049ED4(); } -} - - - - - -// TODO: New file here - - - - - -void WriteDungeonState(u8 *buffer, u32 bufLen) -{ - DataSerializer seri; - - InitByteWriter(&seri, buffer, bufLen); - - seri.unkC = 0; - WriteBytes(&seri, &seri.unkC, 4); - - sub_8080B90(&seri); - sub_8081454(&seri); - sub_808165C(&seri); - SaveDungeonMusic(&seri); - WriteDungeonItems(&seri); - SaveTrapData(&seri); - sub_8080CF0(&seri); - - Write8Bytes(&seri, gYayoiSan); - nullsub_98(&seri); -} - -void sub_8080B90(DataSerializer *param_1) -{ - Write8Bytes(param_1, gMisakiSan); - WriteBytes(param_1, &gDungeon->unk644, sizeof(unkDungeon644)); -} - -void WriteDungeonItems(DataSerializer *param_1) -{ - bool8 notEmpty; - Item *item; - Entity *entity; - int counter; - u8 emptyItem [5]; - - for (counter = 0; counter < 5; counter++) - emptyItem[counter] = 0; - - Write8Bytes(param_1, gMisakiSan); - - for (counter = 0; counter < DUNGEON_MAX_ITEMS; counter++) { - entity = gDungeon->items[counter]; - notEmpty = FALSE; - - if (entity != NULL && GetEntityType(entity) == ENTITY_ITEM) { - item = GetItemData(entity); - WriteDungeonItem(param_1, item); // 3 bytes - WriteBytes(param_1, &entity->pos.x, 1); // 1 byte - WriteBytes(param_1, &entity->pos.y, 1); // 1 byte - notEmpty = TRUE; - } - - if (!notEmpty) - WriteBytes(param_1, emptyItem, 5); - } -} - -void SaveTrapData(DataSerializer *param_1) -{ - bool8 flag; - Trap *trap; - Entity *entity; - int counter; - u8 local_1c [5]; - - for(counter = 0; counter < 5; counter++) - { - local_1c[counter] = -1; - } - Write8Bytes(param_1,gMisakiSan); - - for(counter = 0; counter < DUNGEON_MAX_TRAPS; counter++) - { - entity = gDungeon->traps[counter]; - flag = FALSE; - if ((entity != NULL) && (GetEntityType(entity) == ENTITY_TRAP)) { - trap = GetTrapData(entity); - WriteBytes(param_1,&trap->id,1); - WriteBytes(param_1,&trap->unk1,1); - WriteBytes(param_1,&entity->isVisible,1); - WriteBytes(param_1,&entity->pos.x,1); - WriteBytes(param_1,&entity->pos.y,1); - flag = TRUE; - } - if (!flag) { - WriteBytes(param_1,local_1c,5); - } - } -} - -void sub_8080CF0(DataSerializer *param_1) -{ - s32 counter; - - Write8Bytes(param_1,gMisakiSan); - WriteU32(param_1,gDungeon->unk37F0); - WriteU32(param_1,gDungeon->unk37F4); - WriteBool8(param_1,gDungeon->plusIsActive[0]); - WriteBool8(param_1,gDungeon->plusIsActive[1]); - WriteBool8(param_1,gDungeon->minusIsActive[0]); - WriteBool8(param_1,gDungeon->minusIsActive[1]); - WriteBool8(param_1,gDungeon->decoyActive); - WriteBool8(param_1,gDungeon->unk37FD); - WriteBool8(param_1,gDungeon->deoxysDefeat); - WriteBool8(param_1,gDungeon->unk37FF); - WriteU16(param_1,gDungeon->unk3800); - for(counter = 0; counter < MAX_TEAM_MEMBERS; counter++) - { - SaveEntity(param_1,gDungeon->teamPokemon[counter]); - } - for(counter = 0; counter < DUNGEON_MAX_WILD_POKEMON; counter++) - { - SaveEntity(param_1,gDungeon->wildPokemon[counter]); - } -} - -void SaveEntity(DataSerializer *param_1, Entity *param_2) -{ - Position *pos; - EntityInfo *info; - int counter; - EntityInfo info2; - u32 uStack_ac; - u32 uStack_a8; - HiddenPower *psStack_a4; - u8 *temp1; - u8 *temp2; - AITarget *temp3; - u8 *puStack_a0; - u32 *puStack_9c; - u32 *puStack_98; - u32 *puStack_94; - u8 *puStack_90; - Sleep *puStack_8c; - NonVolatile *puStack_88; - Immobilize *puStack_84; - Volatile *puStack_80; - Charging *puStack_7c; - Protection *puStack_78; - Waiting *puStack_74; - Linked *puStack_70; - MoveStatus *puStack_6c; - ItemStatus *puStack_68; - TransformStatus *puStack_64; - EyesightStatus *puStack_60; - Muzzled *pbStack_5c; - bool8 *pbStack_58; - bool8 *pbStack_54; - bool8 *pbStack_50; - bool8 *puStack_4c; - bool8 *pbStack_48; - bool8 *pbStack_44; - bool8 *pbStack_40; - bool8 *pbStack_3c; - u8 *puStack_38; - u8 *puStack_34; - bool8 *pbStack_30; - u8 *puStack_2c; - u8 *puStack_28; - u8 *puStack_24; - - - uStack_a8 = 0; - uStack_ac = 1; - WriteU8(param_1,0xaa); - WriteU8(param_1,0x55); - if (EntityExists(param_2)) { - info = GetEntInfo(param_2); - WriteBytes(param_1,&uStack_ac,1); - WriteBytes(param_1,¶m_2->pos.x,1); - WriteBytes(param_1,¶m_2->pos.y,1); - WriteBytes(param_1,¶m_2->isVisible,1); - WriteBytes(param_1,¶m_2->spawnGenID,2); - } - else { - memset(&info2,0,sizeof(EntityInfo)); - info = &info2; - WriteBytes(param_1,&uStack_a8,1); - WriteBytes(param_1,&uStack_a8,1); - WriteBytes(param_1,&uStack_a8,1); - WriteBytes(param_1,&uStack_a8,1); - WriteBytes(param_1,&uStack_a8,2); - } - WriteU16(param_1,info->flags); - sub_80817F4(param_1,info->apparentID); - sub_80817F4(param_1,info->id); - WriteBool8(param_1,info->isNotTeamMember); - WriteBool8(param_1,info->isTeamLeader); - WriteU8(param_1,info->shopkeeper); - WriteU8(param_1,info->level); - WriteU8(param_1,info->teamIndex); - WriteJoinedAt(param_1,&info->joinedAt); - WriteS16(param_1,info->IQ); - WriteS16(param_1,info->HP); - WriteS16(param_1,info->maxHPStat); - WriteS16(param_1,info->originalHP); - WriteU8(param_1,info->atk[0]); - WriteU8(param_1,info->atk[1]); - WriteU8(param_1,info->def[0]); - WriteU8(param_1,info->def[1]); - WriteU32(param_1,info->exp); - WriteS16(param_1,info->offensiveStages[0]); - WriteS16(param_1,info->offensiveStages[1]); - WriteS16(param_1,info->defensiveStages[0]); - WriteS16(param_1,info->defensiveStages[1]); - WriteS16(param_1,info->hitChanceStages[0]); - WriteS16(param_1,info->hitChanceStages[1]); - WriteS16(param_1,info->flashFireBoost); - WriteS32(param_1,info->offensiveMultipliers[0]); - WriteS32(param_1,info->offensiveMultipliers[1]); - WriteS32(param_1,info->defensiveMultipliers[0]); - WriteS32(param_1,info->defensiveMultipliers[1]); - SaveActionContainer(param_1,&info->action); - sub_808180C(param_1,info->types[0]); - sub_808180C(param_1,info->types[1]); - sub_8081824(param_1,info->abilities[0]); - sub_8081824(param_1,info->abilities[1]); - WriteDungeonItem(param_1,&info->heldItem); - sub_80817B0(param_1,info->unk64); - temp3 = &info->aiTarget; - temp2 = info->IQSkillMenuFlags; - temp1 = info->IQSkillFlags; - puStack_a0 = &info->tactic; - psStack_a4 = &info->hiddenPower; - puStack_9c = &info->unk98; - puStack_98 = &info->unk9C; - puStack_94 = &info->unkA0; - puStack_8c = &info->sleep; - puStack_88 = &info->nonVolatile; - puStack_84 = &info->immobilize; - puStack_80 = &info->volatileStatus; - puStack_7c = &info->charging; - puStack_78 = &info->protection; - puStack_74 = &info->waitingStruct; - puStack_70 = &info->linked; - puStack_6c = &info->moveStatus; - puStack_68 = &info->itemStatus; - puStack_64 = &info->transformStatus; - puStack_60 = &info->eyesightStatus; - pbStack_5c = &info->muzzled; - pbStack_58 = &info->powerEars; - pbStack_54 = &info->scanning; - pbStack_50 = &info->stairSpotter; - puStack_4c = &info->unkF3; - pbStack_48 = &info->grudge; - puStack_34 = &info->expMultiplier; - pbStack_44 = &info->exposed; - pbStack_40 = &info->isColorChanged; - pbStack_3c = &info->bossFlag; - puStack_38 = &info->terrifiedTurns; - pbStack_30 = &info->useHeldItem; - puStack_2c = &info->perishSongTurns; - puStack_28 = &info->unkFE; - puStack_24 = &info->unkFF; - puStack_90 = &info->clientType; - - pos = info->prevPos; - for(counter = 0; counter < NUM_PREV_POS; counter++) - { - WritePosition8(param_1,pos); - pos++; - } - - SaveAITargetStatus(param_1,temp3); - SaveIQFlags(param_1,temp2); - SaveIQFlags(param_1,temp1); - SaveTactic(param_1,*puStack_a0); - SaveDungeonHiddenPower(param_1,psStack_a4); - WriteU32(param_1,*puStack_9c); - WriteU32(param_1,*puStack_98); - WriteU32(param_1,*puStack_94); - SaveEntitySleep(param_1,puStack_8c); - SaveNonVolatileStatus(param_1,puStack_88); - SaveImmobilizeStatus(param_1,puStack_84); - SaveVolatileStatus(param_1,puStack_80); - SaveChargingStatus(param_1,puStack_7c); - SaveProtectionStatus(param_1,puStack_78); - SaveWaitingStatus(param_1,puStack_74); - SaveLinkedStatus(param_1,puStack_70); - SaveMoveStatus(param_1,puStack_6c); - SaveItemStatus(param_1,puStack_68); - SaveTransformStatus(param_1,puStack_64); - SaveEyesightStatus(param_1,puStack_60); - SaveMuzzledStatus(param_1,pbStack_5c); - WriteBool8(param_1,*pbStack_58); - WriteBool8(param_1,*pbStack_54); - WriteBool8(param_1,*pbStack_50); - WriteBool8(param_1,*puStack_4c); - WriteBool8(param_1,*pbStack_48); - WriteU8(param_1,*puStack_34); - WriteBool8(param_1,*pbStack_44); - WriteBool8(param_1,*pbStack_40); - WriteBool8(param_1,*pbStack_3c); - WriteU8(param_1,*puStack_38); - WriteBool8(param_1,*pbStack_30); - WriteU8(param_1,*puStack_2c); - WriteU8(param_1,*puStack_28); - sub_808183C(param_1,*puStack_24); - sub_8081854(param_1,info->targetingDecoy); - SaveSpeedStage(param_1,info->speedStage); - xxx_WriteBytes(param_1,info->speedUpCounters,NUM_SPEED_COUNTERS); - xxx_WriteBytes(param_1,info->speedDownCounters,NUM_SPEED_COUNTERS); - WriteU8(param_1,info->stockpileStage); - WriteU8(param_1,info->unk113); - WriteU8(param_1,(u8)info->moveRandomly); - SaveEntityMoves(param_1,&info->moves); - sub_8081B34(param_1,(s16 *)&info->belly); - sub_8081B34(param_1,(s16 *)&info->maxBelly); - WriteBool8(param_1,info->aiNextToTarget); - WriteBool8(param_1,info->recalculateFollow); - WriteBool8(param_1,info->waiting); - WriteBool8(param_1,info->unk146); - WriteBool8(param_1,info->attacking); - WriteBool8(param_1,info->unk149); - WriteBool8(param_1,info->unk14A); - WriteBool8(param_1,info->unk14B); - WriteBool8(param_1,info->unk14C); - WriteU16(param_1,info->visualFlags); - WriteU16(param_1,info->previousVisualFlags); - WriteBool8(param_1,info->unk152); - WriteU8(param_1,info->unk153); - WriteBool8(param_1,info->unk154); - WriteBool8(param_1,info->unk155); - WriteBool8(param_1,info->unk156); - WriteU8(param_1,info->unk164); - WriteU8(param_1,info->unk165); - WriteU8(param_1,info->unk166); - WriteU8(param_1,info->unk167); - WriteU8(param_1,info->unk168); - WriteU8(param_1,info->turnsSinceWarpScarfActivation); - WritePosition8(param_1,&(info->targetPos)); - WriteS32(param_1,info->unk174); - WriteU16(param_1,info->abilityEffectFlags); - WriteS16(param_1,info->unk1F8); - WriteS16(param_1,info->mobileTurnTimer); - WriteU32(param_1,info->expGainedInTurn); - SaveClientType(param_1,*puStack_90); -} - -void sub_8081454(DataSerializer *param_1) -{ - int iVar1; - int iVar2; - int iVar4; - - Write8Bytes(param_1,gMisakiSan); - WriteBool8(param_1, gDungeon->unk3A08); - WriteBool8(param_1, gDungeon->unk3A09); - WriteBool8(param_1, gDungeon->unk3A0A); - WriteBool8(param_1, gDungeon->unk3A0B); - WriteU8(param_1, gDungeon->unk3A0C); - WriteU8(param_1, gDungeon->unk3A0D); - WriteS16(param_1, gDungeon->tileset); - WriteS16(param_1,gDungeon->unk3A10); - WriteS16(param_1, gDungeon->unk3A12); - WriteS16(param_1, gDungeon->bossBattleIndex); - WriteS16(param_1, gDungeon->unk3A16); - for(iVar1 = 0; iVar1 < DUNGEON_MAX_SIZE_Y; iVar1++) - { - - for(iVar2 = 0; iVar2 < DUNGEON_MAX_SIZE_X; iVar2++) - { - WriteDungeonTile(param_1,&gDungeon->tiles[iVar1][iVar2]); - } - } - - - WritePosition8(param_1,&gDungeon->unkE218); - WritePosition8(param_1,&gDungeon->unkE21C); - - - - for(iVar4 = 0; iVar4 < 8; iVar4++) - { - WritePosition8(param_1,&gDungeon->unkE220[iVar4]); - } - sub_80830F8(param_1, gDungeon->unkE240); - sub_80830F8(param_1, gDungeon->unkE250); - sub_808312C(param_1, gDungeon->unkE260); - - for(iVar1 = 0; iVar1 < 8; iVar1++) - { - for(iVar2 = 0; iVar2 < 8; iVar2++) - { - WriteDungeonTile(param_1, &gDungeon->unkE27C[iVar1][iVar2]); - WriteU8(param_1, gDungeon->unkE87C[iVar1][iVar2]); - } - } - WriteDungeonWeather(param_1,&gDungeon->weather); -} - -void sub_808165C(DataSerializer *param_1) -{ - - Write8Bytes(param_1,gMisakiSan); - WriteU8(param_1, gDungeon->unk181e8.unk18208); - WriteU8(param_1, gDungeon->unk181e8.visibilityRange); - WriteBool8(param_1, gDungeon->unk181e8.blinded); - WriteBool8(param_1, gDungeon->unk181e8.unk1820B); - WriteBool8(param_1, gDungeon->unk181e8.unk1820C); - WriteBool8(param_1, gDungeon->unk181e8.unk1820D); - WriteBool8(param_1, gDungeon->unk181e8.unk1820E); - WriteBool8(param_1, gDungeon->unk181e8.unk1820F); - WriteBool8(param_1, gDungeon->unk181e8.hallucinating); - WriteBool8(param_1, gDungeon->unk181e8.unk18211); - WriteBool8(param_1, gDungeon->unk181e8.unk18213); -} - -// NOTE: forcing this s16 for now - Seth -void SaveDungeonMusic(DataSerializer *param_1) -{ - WriteS16(param_1, (s16)gDungeon->musPlayer.songIndex); - WriteS16(param_1, (s16)gDungeon->musPlayer.pastSongIndex); - WriteS16(param_1, (s16)gDungeon->musPlayer.queuedSongIndex); -} - -void WriteDungeonItem(DataSerializer *param_1, Item *param_2) -{ - WriteBytes(param_1, ¶m_2->flags, 1); - WriteBytes(param_1, ¶m_2->quantity, 1); - WriteBytes(param_1, ¶m_2->id, 1); -} - -void sub_80817B0(DataSerializer *param_1, u32 param_2) -{ - u8 stack; - stack = param_2; - WriteBytes(param_1, &stack, 1); -} - -void SaveActionContainer(DataSerializer *param_1, ActionContainer *param_2) -{ - WriteBytes(param_1, ¶m_2->direction, 1); - WriteBytes(param_1, ¶m_2->itemTargetPosition.x, 1); - WriteBytes(param_1, ¶m_2->itemTargetPosition.y, 1); -} - -void sub_80817F4(DataSerializer *param_1, u32 param_2) -{ - u16 stack; - stack = param_2; - WriteBytes(param_1, &stack, 2); -} - -void sub_808180C(DataSerializer *param_1, u32 param_2) -{ - u8 stack; - stack = param_2; - WriteBytes(param_1, &stack, 1); -} - -void sub_8081824(DataSerializer *param_1, u32 param_2) -{ - u8 stack; - stack = param_2; - WriteBytes(param_1, &stack, 1); -} - -void sub_808183C(DataSerializer *param_1, s32 param_2) -{ - u8 stack; - stack = param_2; - WriteBytes(param_1, &stack, 1); -} - -void sub_8081854(DataSerializer *param_1, s32 param_2) -{ - u8 stack; - stack = param_2; - WriteBytes(param_1, &stack, 1); -} - -void SaveSpeedStage(DataSerializer *param_1, s32 param_2) -{ - WriteBytes(param_1, ¶m_2, 4); -} - -void SaveTactic(DataSerializer *param_1, u8 param_2) -{ - WriteBytes(param_1, ¶m_2, 1); -} - -void SaveDungeonHiddenPower(DataSerializer *param_1, HiddenPower *param_2) -{ - WriteS16(param_1, param_2->hiddenPowerBasePower); - sub_808180C(param_1, param_2->hiddenPowerType); -} - -void SaveClientType(DataSerializer *param_1, u8 param_2) -{ - WriteU8(param_1, param_2); -} - -static void WriteJoinedAt(DataSerializer *param_1, JoinedAt *param_2) -{ - WriteU8(param_1, param_2->joinedAt); - WriteU8(param_1, param_2->unk1); -} - -void SaveAITargetStatus(DataSerializer *param_1, AITarget* param_2) -{ - WriteBytes(param_1, ¶m_2->aiObjective, 1); - WriteBool8(param_1, param_2->aiNotNextToTarget); - WriteBool8(param_1, param_2->aiTargetingEnemy); - WriteBool8(param_1, param_2->aiTurningAround); - WriteU16(param_1, param_2->aiTargetSpawnGenID); - WritePosition8(param_1, ¶m_2->aiTargetPos); -} - -void SaveEntitySleep(DataSerializer *param_1, Sleep* param_2) -{ - WriteBytes(param_1, ¶m_2->sleep, 1); - WriteU8(param_1, param_2->sleepTurns); -} - -void SaveNonVolatileStatus(DataSerializer *param_1, NonVolatile *param_2) -{ - WriteBytes(param_1, ¶m_2->nonVolatileStatus, 1); - WriteU8(param_1, param_2->nonVolatileStatusTurns); - WriteU8(param_1, param_2->nonVolatileStatusDamageCountdown); - WriteU8(param_1, param_2->unk4); -} - -void SaveImmobilizeStatus(DataSerializer *param_1, Immobilize *param_2) -{ - WriteBytes(param_1, ¶m_2->immobilizeStatus, 1); - WriteU8(param_1, param_2->immobilizeStatusTurns); - WriteU8(param_1, param_2->immobilizeStatusDamageCountdown); - WriteU32(param_1, param_2->unk4); -} - -void SaveVolatileStatus(DataSerializer *param_1, Volatile *param_2) -{ - WriteBytes(param_1, ¶m_2->volatileStatus, 1); - WriteU8(param_1, param_2->volatileStatusTurns); -} - -void SaveChargingStatus(DataSerializer *param_1, Charging *param_2) -{ - WriteBytes(param_1, ¶m_2->chargingStatus, 1); - WriteU8(param_1, param_2->chargingStatusTurns); - WriteU8(param_1, param_2->chargingStatusMoveIndex); -} - -void SaveProtectionStatus(DataSerializer *param_1, Protection *param_2) -{ - WriteBytes(param_1, ¶m_2->protectionStatus, 1); - WriteU8(param_1, param_2->protectionStatusTurns); -} - -void SaveWaitingStatus(DataSerializer *param_1, Waiting *param_2) -{ - WriteBytes(param_1, ¶m_2->waitingStatus, 1); - WriteBool8(param_1, param_2->enemyDecoy); - WriteBool8(param_1, param_2->unkCA); - WriteU8(param_1, param_2->waitingStatusTurns); - WriteU8(param_1, param_2->curseDamageCountdown); -} - -void SaveLinkedStatus(DataSerializer *param_1, Linked *param_2) -{ - WriteBytes(param_1, ¶m_2->linkedStatus, 1); - WriteU32(param_1, param_2->unkD4); - WriteU8(param_1, param_2->unkD8); - WriteU8(param_1, param_2->linkedStatusTurns); - WriteU8(param_1, param_2->linkedStatusDamageCountdown); -} - -void SaveMoveStatus(DataSerializer *param_1, MoveStatus* param_2) -{ - WriteBytes(param_1, ¶m_2->moveStatus, 1); - WriteU8(param_1, param_2->moveStatusTurns); -} - -void SaveItemStatus(DataSerializer *param_1, ItemStatus *param_2) -{ - WriteBytes(param_1, ¶m_2->itemStatus, 1); -} - -void SaveTransformStatus(DataSerializer *param_1, TransformStatus *param_2) -{ - WriteBytes(param_1, ¶m_2->transformStatus, 1); - WriteU8(param_1, param_2->transformStatusTurns); -} - -void SaveEyesightStatus(DataSerializer *param_1, EyesightStatus *param_2) -{ - WriteBytes(param_1, ¶m_2->eyesightStatus, 1); - WriteU8(param_1, param_2->eyesightStatusTurns); -} - -void SaveMuzzledStatus(DataSerializer *param_1, Muzzled *param_2) -{ - WriteBytes(param_1, ¶m_2->muzzled, 1); - WriteU8(param_1, param_2->muzzledTurns); -} - -void SaveEntityMove(DataSerializer *r0, Move *r1) -{ - WriteU8(r0, r1->moveFlags); - WriteU8(r0, r1->moveFlags2); - WriteBytes(r0, &r1->id, 2); - WriteU8(r0, r1->PP); - WriteU8(r0, r1->ginseng); -} - -void SaveEntityMoves(DataSerializer *r0, Moves *move) -{ - s32 i; - - for (i = 0; i < MAX_MON_MOVES; i++) - SaveEntityMove(r0, &move->moves[i]); - - WriteU8(r0, move->struggleMoveFlags); -} - -void sub_8081B34(DataSerializer *r0, s16 *r1) -{ - WriteS16(r0, r1[0]); - WriteS16(r0, r1[1]); -} - -void SaveIQFlags(DataSerializer *r0, u8 *r1) -{ - WriteBytes(r0, r1, NUM_PICKED_IQ_SKILLS); -} - -static void WriteDungeonTile(DataSerializer *r0, Tile *tile) -{ - WriteU16(r0, tile->terrainType); - WriteU16(r0, tile->unk4); - WriteBytes(r0, &tile->room, 1); - WriteBytes(r0, &tile->unkE, 1); -} - -static void WriteDungeonWeather(DataSerializer *r0, Weather *weather) -{ - s32 i; - - WriteBytes(r0, &weather->weather, 1); - WriteBytes(r0, &weather->unkE265, 1); - - for (i = 0; i < 8; i++) { - WriteU8(r0, weather->unkE267[i]); - WriteU8(r0, weather->naturalWeather[i]); - } - - WriteU8(r0, weather->weatherDamageCounter); - WriteU8(r0, weather->mudSportTurns); - WriteU8(r0, weather->waterSportTurns); - WriteBool8(r0, weather->nullifyWeather); -} - -// Read func - -void ReadDungeonState(u8 *buffer, u32 bufLen) -{ - DataSerializer seri; - - InitByteReader(&seri, buffer, bufLen); - - ReadBytes(&seri, &seri.unkC, 4); - sub_8081C50(&seri); - sub_8081C7C(&seri); - sub_8081F2C(&seri); - RestoreDungeonMusic(&seri); - RestoreItemData(&seri); - RestoreTrapData(&seri); - sub_808217C(&seri); - - sub_8083018(&seri, gYayoiSan); - nullsub_98(&seri); -} - -void sub_8081C50(DataSerializer *r0) -{ - sub_8083018(r0, gMisakiSan); - ReadBytes(r0, &gDungeon->unk644, sizeof(unkDungeon644)); -} - -void sub_8081C7C(DataSerializer *r0) -{ - int x; - int y; - s32 iVar7; - - sub_8083018(r0,gMisakiSan); - gDungeon->unk3A08 = ReadBool8(r0); - gDungeon->unk3A09 = ReadBool8(r0); - gDungeon->unk3A0A = ReadBool8(r0); - gDungeon->unk3A0B = ReadBool8(r0); - gDungeon->unk3A0C = ReadU8(r0); - gDungeon->unk3A0D = ReadU8(r0); - gDungeon->tileset = ReadS16(r0); - gDungeon->unk3A10 = ReadS16(r0); - gDungeon->unk3A12 = ReadS16(r0); - gDungeon->bossBattleIndex = ReadS16(r0); - gDungeon->unk3A16 = ReadS16(r0); - - for(y = 0; y < DUNGEON_MAX_SIZE_Y; y++) - { - for(x = 0; x < DUNGEON_MAX_SIZE_X; x++) - { - RestoreTile(r0,&gDungeon->tiles[y][x]); - } - } - ReadPosition8(r0,&gDungeon->unkE218); - ReadPosition8(r0,&gDungeon->unkE21C); - - for(iVar7 = 0; iVar7 < 8; iVar7++) - { - ReadPosition8(r0,&gDungeon->unkE220[iVar7]); - } - sub_8083220(r0, gDungeon->unkE240); - sub_8083220(r0, gDungeon->unkE250); - sub_8083260(r0, gDungeon->unkE260); - - - for(y = 0; y < 8; y++) - { - for(x = 0; x < 8; x++) - { - RestoreTile(r0,&gDungeon->unkE27C[y][x]); - gDungeon->unkE87C[y][x] = ReadU8(r0); - } - } - RestoreDungeonWeather(r0,&gDungeon->weather); -} - -void RestoreTile(DataSerializer *r0, Tile *tile) -{ - memset(tile, 0, sizeof(Tile)); - tile->terrainType = ReadU16(r0); - tile->unk4 = ReadU16(r0); - - ReadBytes(r0, (u32 *)&tile->room, 1); - ReadBytes(r0, (u32 *)&tile->unkE, 1); - - tile->monster = NULL; - tile->object = NULL; -} - -void RestoreDungeonWeather(DataSerializer *r0, Weather *weather) -{ - s32 index; - memset(weather, 0, sizeof(Weather)); - ReadBytes(r0, (u32 *)&weather->weather, 1); - ReadBytes(r0, (u32 *)&weather->unkE265, 1); - for(index = 0; index < 8; index++) - { - weather->unkE267[index] = ReadU8(r0); - weather->naturalWeather[index] = ReadU8(r0); - } - weather->weatherDamageCounter = ReadU8(r0); - weather->mudSportTurns = ReadU8(r0); - weather->waterSportTurns = ReadU8(r0); - weather->nullifyWeather = ReadBool8(r0); -} - -void sub_8081F2C(DataSerializer *param_1) -{ - sub_8083018(param_1,gMisakiSan); - gDungeon->unk181e8.cameraTarget = NULL; - gDungeon->unk181e8.unk18208 = ReadU8(param_1); - gDungeon->unk181e8.visibilityRange = ReadU8(param_1); - gDungeon->unk181e8.blinded = ReadBool8(param_1); - gDungeon->unk181e8.unk1820B = ReadBool8(param_1); - gDungeon->unk181e8.unk1820C = ReadBool8(param_1); - gDungeon->unk181e8.unk1820D = ReadBool8(param_1); - gDungeon->unk181e8.unk1820E = ReadBool8(param_1); - gDungeon->unk181e8.unk1820F = ReadBool8(param_1); - gDungeon->unk181e8.hallucinating = ReadBool8(param_1); - gDungeon->unk181e8.unk18211 = ReadBool8(param_1); - gDungeon->unk181e8.unk18213 = ReadBool8(param_1); -} - -void RestoreDungeonMusic(DataSerializer *r0) -{ - gDungeon->musPlayer.songIndex = ReadS16(r0); - gDungeon->musPlayer.pastSongIndex = ReadS16(r0); - gDungeon->musPlayer.queuedSongIndex = ReadS16(r0); -} - -void RestoreItemData(DataSerializer *r0) { - s32 index; - Item item; - Position pos; - sub_8083018(r0, gMisakiSan); - for(index = 0; index < DUNGEON_MAX_ITEMS; index++) - { - sub_80820A8(r0, &item); - ReadPosition8(r0, &pos); - if(item.flags & ITEM_FLAG_EXISTS) - sub_80460F8(&pos, &item, 0); - } -} - -void sub_80820A8(DataSerializer *param_1, Item *item) -{ - memset(item, 0, sizeof(Item)); - ReadBytes(param_1,(u32 *)&item->flags,1); - ReadBytes(param_1,(u32 *)&item->quantity,1); - ReadBytes(param_1,(u32 *)&item->id,1); -} - - -void RestoreTrapData(DataSerializer *param_1) -{ - int counter; - Tile *tile; - Entity *entity; - Position pos; - u8 isVisible; - u8 unk1; - u8 trapID; - - sub_8083018(param_1, gMisakiSan); - - for(counter = 0; counter < DUNGEON_MAX_TRAPS; counter++) - { - trapID = 6; - unk1 = 0; - ReadBytes(param_1,(u32 *)&trapID,1); - ReadBytes(param_1,(u32 *)&unk1,1); - isVisible = ReadBool8(param_1); - ReadPosition8(param_1, &pos); - - if(trapID != 0xFF) - { - tile = GetTileSafe(pos.x, pos.y); - entity = sub_8045684(trapID, &pos, unk1); - if(entity) - { - tile->object = entity; - entity->isVisible = isVisible; - } - } - } -} - -void sub_808217C(DataSerializer *param_1) -{ - s32 counter; - - sub_8083018(param_1,gMisakiSan); - gDungeon->unk37F0 = sub_80831A0(param_1); - gDungeon->unk37F4 = sub_80831A0(param_1); - gDungeon->plusIsActive[0] = ReadBool8(param_1); - gDungeon->plusIsActive[1] = ReadBool8(param_1); - gDungeon->minusIsActive[0] = ReadBool8(param_1); - gDungeon->minusIsActive[1] = ReadBool8(param_1); - gDungeon->decoyActive = ReadBool8(param_1); - gDungeon->unk37FD = ReadBool8(param_1); - gDungeon->deoxysDefeat = ReadBool8(param_1); - gDungeon->unk37FF = ReadBool8(param_1); - gDungeon->unk3800 = ReadU16(param_1); - for(counter = 0; counter < MAX_TEAM_MEMBERS; counter++) - { - RestoreDungeonEntity(param_1, TRUE, counter); - } - for(counter = 0; counter < DUNGEON_MAX_WILD_POKEMON; counter++) - { - RestoreDungeonEntity(param_1, FALSE, counter); - } -} - -// RestoreDungeonEntity should be here \ No newline at end of file +} \ No newline at end of file diff --git a/sym_ewram2.txt b/sym_ewram2.txt index 4bebc166..d92c28e2 100644 --- a/sym_ewram2.txt +++ b/sym_ewram2.txt @@ -225,7 +225,7 @@ gUnknown_203B40C: /* 203B40C (sub_803E46C - PrintFieldMessage) */ gUnknown_203B40D: /* 203B40D (sub_803E250 - sub_807E698) */ .space 0x3 -gUnknown_203B410: /* 203B410 (sub_8040150 - RestoreDungeonEntity) */ +gUnknown_203B410: /* 203B410 (sub_8040150 - ReadMonster) */ .space 0x4 .include "src/code_8042B34.o" @@ -258,7 +258,7 @@ gUnknown_203B43C: /* 203B43C (sub_8065FB4) */ gUnknown_203B444: /* 203B444 (sub_807DF38) */ .space 0xC -gLeaderPointer: /* 203B450 (xxx_dungeon_8042F6C - RestoreDungeonEntity) */ +gLeaderPointer: /* 203B450 (xxx_dungeon_8042F6C - ReadMonster) */ .space 0x4 .include "src/dungeon_random.o"