From dbb9f3983d8a35caeb79956facc17f5f08411af6 Mon Sep 17 00:00:00 2001 From: Kermalis <29823718+Kermalis@users.noreply.github.com> Date: Sat, 9 Nov 2024 02:31:15 -0500 Subject: [PATCH 01/16] Fix this annoying bs --- asmdiff.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/asmdiff.sh b/asmdiff.sh index 3b92ab5be..886d54f3f 100755 --- a/asmdiff.sh +++ b/asmdiff.sh @@ -1,10 +1,6 @@ #!/bin/bash -if [[ -d "$DEVKITARM/bin/" ]]; then - OBJDUMP_BIN="$DEVKITARM/bin/arm-none-eabi-objdump" -else - OBJDUMP_BIN="arm-none-eabi-objdump" -fi +OBJDUMP_BIN="arm-none-eabi-objdump" OBJDUMP="$OBJDUMP_BIN -D -bbinary -marmv4t -Mforce-thumb" From c6d89036bbcf1aedaa2cd670acbfa212c73c0625 Mon Sep 17 00:00:00 2001 From: Kermalis <29823718+Kermalis@users.noreply.github.com> Date: Sat, 9 Nov 2024 02:53:48 -0500 Subject: [PATCH 02/16] Fix GetBaseSpeciesNoUnown fakematch --- src/pokemon_3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pokemon_3.c b/src/pokemon_3.c index 48986b1f0..a42ebf95d 100644 --- a/src/pokemon_3.c +++ b/src/pokemon_3.c @@ -189,7 +189,7 @@ s16 GetBaseSpecies(s16 index) { } s16 GetBaseSpeciesNoUnown(s16 index) { - register s32 a1_ asm("r2") = index; + s32 a1_ = SpeciesId(index); if (index == MONSTER_CASTFORM_SNOWY) { return MONSTER_CASTFORM; } From 15b4b39ff7953357b36901aed7ccb747e865dc58 Mon Sep 17 00:00:00 2001 From: Kermalis <29823718+Kermalis@users.noreply.github.com> Date: Sat, 9 Nov 2024 03:22:29 -0500 Subject: [PATCH 03/16] Match sub_80948E4 --- asm/code_8080CF0.s | 188 +++--- asm/code_8098468.s | 2 +- asm/ground_script.s | 12 +- data/data_8107010.s | 2 +- include/code_8092334.h | 26 +- include/code_8094F88.h | 4 +- include/code_80958E8.h | 4 +- include/code_8097670.h | 84 ++- include/constants/move_id.h | 2 + include/exclusive_pokemon.h | 4 +- include/items.h | 8 +- include/moves.h | 8 +- include/pokemon.h | 12 +- include/structs/dungeon_entity.h | 10 +- include/structs/str_dungeon.h | 15 +- include/structs/str_pokemon.h | 6 +- include/structs/str_wonder_mail.h | 4 +- src/adventure_log.c | 56 +- src/code_803D0D8.c | 32 +- src/code_8042B34.c | 24 +- src/code_806FDF4.c | 4 +- src/code_8083288.c | 439 +++++++------ src/code_8092334.c | 189 +++--- src/code_809447C.c | 12 +- src/code_8094F88.c | 243 ++++---- src/code_80958E8.c | 122 ++-- src/code_8097670.c | 407 ++++++------ src/debug_menu1.c | 6 +- src/dungeon.c | 16 +- src/event_flag.c | 24 +- src/exclusive_pokemon.c | 24 +- src/friend_area.c | 16 +- src/game_options.c | 44 +- src/ground_script_1.c | 2 +- src/items.c | 86 +-- src/luminous_cave.c | 2 +- src/moves.c | 62 +- src/play_time.c | 20 +- src/pokemon_3.c | 344 ++++++----- src/rescue_team_info.c | 24 +- src/save.c | 34 +- src/trap_1.c | 993 +++++++++++++++--------------- src/wonder_mail_2.c | 2 +- sym_ewram2.txt | 4 +- 44 files changed, 1866 insertions(+), 1756 deletions(-) diff --git a/asm/code_8080CF0.s b/asm/code_8080CF0.s index 454206a52..00c92aa91 100644 --- a/asm/code_8080CF0.s +++ b/asm/code_8080CF0.s @@ -5,8 +5,8 @@ .text - thumb_func_start sub_8082280 -sub_8082280: + thumb_func_start RestoreDungeonEntity +RestoreDungeonEntity: push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -25,25 +25,25 @@ sub_8082280: movs r1, 0 bl memset adds r0, r5, 0 - bl sub_8083188 + bl ReadU8 adds r0, r5, 0 - bl sub_8083188 + bl ReadU8 adds r0, r5, 0 - bl sub_8083188 + 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 sub_80831F8 + bl ReadPosition8 adds r0, r5, 0 - bl sub_80831DC + bl ReadBool8 lsls r0, 24 lsrs r0, 24 str r0, [sp, 0x218] adds r0, r5, 0 - bl sub_8083158 + bl ReadU16 lsls r0, 16 lsrs r0, 16 str r0, [sp, 0x21C] @@ -51,7 +51,7 @@ sub_8082280: movs r0, 0 str r0, [r1] adds r0, r5, 0 - bl sub_8083158 + bl ReadU16 mov r1, sp strh r0, [r1] adds r0, r5, 0 @@ -63,89 +63,89 @@ sub_8082280: mov r1, sp strh r0, [r1, 0x2] adds r0, r5, 0 - bl sub_80831DC + bl ReadBool8 mov r1, sp strb r0, [r1, 0x6] adds r0, r5, 0 - bl sub_80831DC + bl ReadBool8 mov r1, sp strb r0, [r1, 0x7] adds r0, r5, 0 - bl sub_8083188 + bl ReadU8 mov r1, sp strb r0, [r1, 0x8] adds r0, r5, 0 - bl sub_8083188 + bl ReadU8 mov r1, sp strb r0, [r1, 0x9] adds r0, r5, 0 - bl sub_8083188 + bl ReadU8 mov r1, sp strb r0, [r1, 0xA] add r1, sp, 0x40 adds r0, r5, 0 - bl sub_8082F64 + bl ReadJoinedAt adds r0, r5, 0 - bl sub_8083170 + bl ReadS16 mov r1, sp strh r0, [r1, 0xC] adds r0, r5, 0 - bl sub_8083170 + bl ReadS16 mov r1, sp strh r0, [r1, 0xE] adds r0, r5, 0 - bl sub_8083170 + bl ReadS16 mov r1, sp strh r0, [r1, 0x10] adds r0, r5, 0 - bl sub_8083170 + bl ReadS16 mov r1, sp strh r0, [r1, 0x12] adds r0, r5, 0 - bl sub_8083188 + bl ReadU8 mov r1, sp strb r0, [r1, 0x14] adds r0, r5, 0 - bl sub_8083188 + bl ReadU8 mov r1, sp strb r0, [r1, 0x15] adds r0, r5, 0 - bl sub_8083188 + bl ReadU8 mov r1, sp strb r0, [r1, 0x16] adds r0, r5, 0 - bl sub_8083188 + 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 sub_8083170 + bl ReadS16 mov r1, sp strh r0, [r1, 0x1C] adds r0, r5, 0 - bl sub_8083170 + bl ReadS16 mov r1, sp strh r0, [r1, 0x1E] adds r0, r5, 0 - bl sub_8083170 + bl ReadS16 mov r1, sp strh r0, [r1, 0x20] adds r0, r5, 0 - bl sub_8083170 + bl ReadS16 mov r1, sp strh r0, [r1, 0x22] adds r0, r5, 0 - bl sub_8083170 + bl ReadS16 mov r1, sp strh r0, [r1, 0x24] adds r0, r5, 0 - bl sub_8083170 + bl ReadS16 mov r1, sp strh r0, [r1, 0x26] adds r0, r5, 0 - bl sub_8083170 + bl ReadS16 mov r1, sp strh r0, [r1, 0x28] adds r0, r5, 0 @@ -162,7 +162,7 @@ sub_8082280: str r0, [sp, 0x38] add r1, sp, 0x44 adds r0, r5, 0 - bl sub_8082CBC + bl ReadActionContainer adds r0, r5, 0 bl sub_8082BFC add r1, sp, 0x5C @@ -269,20 +269,20 @@ sub_8082280: _080824DC: adds r0, r5, 0 adds r1, r4, 0 - bl sub_80831F8 + bl ReadPosition8 adds r4, 0x4 subs r6, 0x1 cmp r6, 0 bge _080824DC adds r0, r5, 0 adds r1, r7, 0 - bl sub_8082CE4 + bl ReadAITarget adds r0, r5, 0 mov r1, r8 - bl sub_8082D28 + bl Read3Bytes adds r0, r5, 0 mov r1, r9 - bl sub_8082D28 + bl Read3Bytes adds r0, r5, 0 bl sub_8082C84 movs r4, 0 @@ -290,7 +290,7 @@ _080824DC: strb r0, [r3] adds r0, r5, 0 ldr r1, [sp, 0x270] - bl sub_8082F80 + bl ReadHiddenPower adds r0, r5, 0 bl sub_80831A0 ldr r1, [sp, 0x274] @@ -305,93 +305,93 @@ _080824DC: str r0, [r3] adds r0, r5, 0 ldr r1, [sp, 0x284] - bl sub_8082D34 + bl ReadSleep adds r0, r5, 0 ldr r1, [sp, 0x288] - bl sub_8082D50 + bl ReadNonVolatile adds r0, r5, 0 ldr r1, [sp, 0x28C] - bl sub_8082D7C + bl ReadImmobilize adds r0, r5, 0 ldr r1, [sp, 0x290] - bl sub_8082DA8 + bl ReadVolatileStatus adds r0, r5, 0 ldr r1, [sp, 0x294] - bl sub_8082DC4 + bl ReadCharging adds r0, r5, 0 ldr r1, [sp, 0x298] - bl sub_8082DE8 + bl ReadProtection adds r0, r5, 0 ldr r1, [sp, 0x29C] - bl sub_8082E04 + bl ReadWaiting adds r0, r5, 0 ldr r1, [sp, 0x220] - bl sub_8082E38 + bl ReadLinked adds r0, r5, 0 ldr r1, [sp, 0x224] - bl sub_8082E6C + bl ReadMoveStatus adds r0, r5, 0 ldr r1, [sp, 0x228] bl sub_8082E88 adds r0, r5, 0 ldr r1, [sp, 0x22C] - bl sub_8082E94 + bl ReadTransformStatus adds r0, r5, 0 ldr r1, [sp, 0x230] - bl sub_8082EB0 + bl ReadEyesightStatus adds r0, r5, 0 ldr r1, [sp, 0x234] - bl sub_8082ECC + bl ReadMuzzled adds r0, r5, 0 - bl sub_80831DC + bl ReadBool8 ldr r1, [sp, 0x238] strb r0, [r1] adds r0, r5, 0 - bl sub_80831DC + bl ReadBool8 ldr r2, [sp, 0x23C] strb r0, [r2] adds r0, r5, 0 - bl sub_80831DC + bl ReadBool8 ldr r3, [sp, 0x240] strb r0, [r3] adds r0, r5, 0 - bl sub_80831DC + bl ReadBool8 ldr r1, [sp, 0x244] strb r0, [r1] adds r0, r5, 0 - bl sub_80831DC + bl ReadBool8 ldr r2, [sp, 0x248] strb r0, [r2] adds r0, r5, 0 - bl sub_8083188 + bl ReadU8 ldr r3, [sp, 0x25C] strb r0, [r3] adds r0, r5, 0 - bl sub_80831DC + bl ReadBool8 ldr r1, [sp, 0x24C] strb r0, [r1] adds r0, r5, 0 - bl sub_80831DC + bl ReadBool8 ldr r2, [sp, 0x250] strb r0, [r2] adds r0, r5, 0 - bl sub_80831DC + bl ReadBool8 ldr r3, [sp, 0x254] strb r0, [r3] adds r0, r5, 0 - bl sub_8083188 + bl ReadU8 ldr r1, [sp, 0x258] strb r0, [r1] adds r0, r5, 0 - bl sub_80831DC + bl ReadBool8 ldr r2, [sp, 0x260] strb r0, [r2] adds r0, r5, 0 - bl sub_8083188 + bl ReadU8 ldr r3, [sp, 0x264] strb r0, [r3] adds r0, r5, 0 - bl sub_8083188 + bl ReadU8 ldr r1, [sp, 0x268] strb r0, [r1] adds r0, r5, 0 @@ -409,20 +409,20 @@ _080824DC: add r1, sp, 0x108 adds r0, r5, 0 movs r2, 0x5 - bl sub_8083288 + bl xxx_ReadBytes ldr r1, _08082674 add r1, sp adds r0, r5, 0 movs r2, 0x5 - bl sub_8083288 + bl xxx_ReadBytes adds r0, r5, 0 - bl sub_8083188 + bl ReadU8 movs r1, 0x89 lsls r1, 1 add r1, sp strb r0, [r1] adds r0, r5, 0 - bl sub_8083188 + bl ReadU8 b _08082678 .align 2, 0 _0808266C: .4byte 0xfffffd60 @@ -433,14 +433,14 @@ _08082678: add r1, sp strb r0, [r1] adds r0, r5, 0 - bl sub_8083188 + bl ReadU8 add r1, sp, 0x114 lsls r0, 24 lsrs r0, 24 str r0, [r1] add r1, sp, 0x118 adds r0, r5, 0 - bl sub_8082F1C + bl ReadMoves add r1, sp, 0x13C adds r0, r5, 0 bl sub_8082F48 @@ -448,131 +448,131 @@ _08082678: adds r0, r5, 0 bl sub_8082F48 adds r0, r5, 0 - bl sub_80831DC + bl ReadBool8 add r1, sp, 0x144 strb r0, [r1] adds r0, r5, 0 - bl sub_80831DC + bl ReadBool8 ldr r1, _0808281C add r1, sp strb r0, [r1] adds r0, r5, 0 - bl sub_80831DC + bl ReadBool8 ldr r1, _08082820 add r1, sp strb r0, [r1] adds r0, r5, 0 - bl sub_80831DC + bl ReadBool8 movs r1, 0xA3 lsls r1, 1 add r1, sp strb r0, [r1] adds r0, r5, 0 - bl sub_80831DC + bl ReadBool8 add r1, sp, 0x148 strb r0, [r1] adds r0, r5, 0 - bl sub_80831DC + bl ReadBool8 ldr r1, _08082824 add r1, sp strb r0, [r1] adds r0, r5, 0 - bl sub_80831DC + bl ReadBool8 movs r1, 0xA5 lsls r1, 1 add r1, sp strb r0, [r1] adds r0, r5, 0 - bl sub_80831DC + bl ReadBool8 ldr r1, _08082828 add r1, sp strb r0, [r1] adds r0, r5, 0 - bl sub_80831DC + bl ReadBool8 add r1, sp, 0x14C strb r0, [r1] adds r0, r5, 0 - bl sub_8083158 + bl ReadU16 movs r1, 0xA7 lsls r1, 1 add r1, sp strh r0, [r1] adds r0, r5, 0 - bl sub_8083158 + bl ReadU16 add r1, sp, 0x150 strh r0, [r1] adds r0, r5, 0 - bl sub_80831DC + bl ReadBool8 movs r1, 0xA9 lsls r1, 1 add r1, sp strb r0, [r1] adds r0, r5, 0 - bl sub_8083188 + bl ReadU8 ldr r1, _0808282C add r1, sp strb r0, [r1] adds r0, r5, 0 - bl sub_80831DC + bl ReadBool8 add r1, sp, 0x154 strb r0, [r1] adds r0, r5, 0 - bl sub_80831DC + bl ReadBool8 ldr r1, _08082830 add r1, sp strb r0, [r1] adds r0, r5, 0 - bl sub_80831DC + bl ReadBool8 movs r1, 0xAB lsls r1, 1 add r1, sp strb r0, [r1] adds r0, r5, 0 - bl sub_8083188 + bl ReadU8 add r1, sp, 0x164 strb r0, [r1] adds r0, r5, 0 - bl sub_8083188 + bl ReadU8 ldr r1, _08082834 add r1, sp strb r0, [r1] adds r0, r5, 0 - bl sub_8083188 + bl ReadU8 movs r1, 0xB3 lsls r1, 1 add r1, sp strb r0, [r1] adds r0, r5, 0 - bl sub_8083188 + bl ReadU8 ldr r1, _08082838 add r1, sp strb r0, [r1] adds r0, r5, 0 - bl sub_8083188 + bl ReadU8 add r1, sp, 0x168 strb r0, [r1] adds r0, r5, 0 - bl sub_8083188 + bl ReadU8 ldr r1, _0808283C add r1, sp strb r0, [r1] add r1, sp, 0x16C adds r0, r5, 0 - bl sub_80831F8 + bl ReadPosition8 adds r0, r5, 0 bl sub_80831C8 add r1, sp, 0x174 str r0, [r1] adds r0, r5, 0 - bl sub_8083158 + bl ReadU16 add r1, sp, 0x178 strh r0, [r1] adds r0, r5, 0 - bl sub_8083170 + bl ReadS16 add r1, sp, 0x1F8 strh r0, [r1] adds r0, r5, 0 - bl sub_8083170 + bl ReadS16 movs r1, 0xFD lsls r1, 1 add r1, sp @@ -688,7 +688,7 @@ _080828BE: _080828D4: .4byte 0x0000020a _080828D8: .4byte gLeaderPointer _080828DC: .4byte gUnknown_203B410 - thumb_func_end sub_8082280 + thumb_func_end RestoreDungeonEntity thumb_func_start sub_80828E0 sub_80828E0: diff --git a/asm/code_8098468.s b/asm/code_8098468.s index 3f61e4154..e775a7b4a 100644 --- a/asm/code_8098468.s +++ b/asm/code_8098468.s @@ -400,7 +400,7 @@ _080987C0: bl DeleteGroundEffects bl sub_809C658 bl nullsub_16 - bl sub_8097944 + bl UpdateAdventureAchievements cmp r7, r4 beq _08098848 adds r0, r7, 0 diff --git a/asm/ground_script.s b/asm/ground_script.s index 23f75bf91..eccbf5a19 100644 --- a/asm/ground_script.s +++ b/asm/ground_script.s @@ -487,7 +487,7 @@ _080A195A: movs r2, 0xA bl sub_80922B4 _080A1968: - bl sub_8097848 + bl IncrementAdventureNumJoined bl _080A236A .align 2, 0 _080A1970: .4byte gUnknown_8116710 @@ -526,7 +526,7 @@ _080A1988: bne _080A19C2 b _080A1EBE _080A19C2: - bl sub_8097848 + bl IncrementAdventureNumJoined ldrh r1, [r4] movs r0, 0x2 orrs r0, r1 @@ -626,7 +626,7 @@ _080A1A70: bl sub_808D2E8 cmp r0, 0 beq _080A1A9A - bl sub_8097848 + bl IncrementAdventureNumJoined _080A1A9A: movs r0, 0x92 movs r1, 0 @@ -641,7 +641,7 @@ _080A1A9A: bl sub_808D2E8 cmp r0, 0 beq _080A1ABC - bl sub_8097848 + bl IncrementAdventureNumJoined _080A1ABC: movs r0, 0x90 movs r1, 0 @@ -660,7 +660,7 @@ _080A1ACC: bne _080A1AE2 bl _080A236A _080A1AE2: - bl sub_8097848 + bl IncrementAdventureNumJoined bl _080A236A .align 2, 0 _080A1AEC: .4byte gUnknown_8116788 @@ -1121,7 +1121,7 @@ _080A1EAC: adds r2, 0x1 cmp r2, 0x9 ble _080A1EAC - bl sub_8097848 + bl IncrementAdventureNumJoined _080A1EBE: movs r0, 0x1 b _080A236C diff --git a/data/data_8107010.s b/data/data_8107010.s index 71b51f094..ffa26cedf 100644 --- a/data/data_8107010.s +++ b/data/data_8107010.s @@ -89,7 +89,7 @@ gUnknown_8107178: @ 8107178 .string "pksdir0\0" @ ??? .string "pksdir0\0" -@ sub_8080B30 - sub_808217C +@ WriteDungeonState - sub_808217C .string "pksdir0\0" .global gYayoiSan diff --git a/include/code_8092334.h b/include/code_8092334.h index b07336fbb..3a2fe8e51 100644 --- a/include/code_8092334.h +++ b/include/code_8092334.h @@ -1,21 +1,19 @@ #ifndef GUARD_CODE_8092334_H #define GUARD_CODE_8092334_H -// size: 0x10? -typedef struct unkStruct_8094924 +// size: 0x10 +typedef struct DataSerializer { - u8 *unk0; // head? - u8 *unk4; // tail? - u32 unk8; - u32 unkC; -} unkStruct_8094924; + 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; -void nullsub_102(unkStruct_8094924 *); -void RestoreIntegerBits(unkStruct_8094924 *, void *, s32 size); -void SaveIntegerBits(unkStruct_8094924 *, void *, s32 size); -void xxx_init_struct_8094924_restore_809485C(unkStruct_8094924 *, u8 *, s32 size); -void xxx_init_struct_8094924_save_809486C(unkStruct_8094924 *, u8 *, s32 size); - -void sub_80948E4(unkStruct_8094924 *, u8 *, s32 size); +void nullsub_102(DataSerializer *seri); +void ReadBits(DataSerializer *seri, void *dst, s32 numBits); +void WriteBits(DataSerializer *seri, void *src, s32 numBits); +void InitBitReader(DataSerializer *seri, u8 *buffer, s32 bufLen); +void InitBitWriter(DataSerializer *seri, u8 *buffer, s32 bufLen); #endif // GUARD_CODE_8092334_H \ No newline at end of file diff --git a/include/code_8094F88.h b/include/code_8094F88.h index dd204cd53..08818a50a 100644 --- a/include/code_8094F88.h +++ b/include/code_8094F88.h @@ -46,7 +46,7 @@ u32 CountAllMail(void); s32 sub_8095374(void); s32 GetMailIndex(u8 mailType, u32); s32 GetFirstIndexofMailType(u8 mailType); -void sub_8095824(struct unkStruct_8094924 *a, unkStruct_203B480 *b); -void sub_8095774(struct unkStruct_8094924 *a, unkStruct_203B480 *b); +void sub_8095824(DataSerializer *a, unkStruct_203B480 *b); +void sub_8095774(DataSerializer *a, unkStruct_203B480 *b); #endif // GUARD_CODE_8094F88_H \ No newline at end of file diff --git a/include/code_80958E8.h b/include/code_80958E8.h index 0a1f0717f..1f6df94e5 100644 --- a/include/code_80958E8.h +++ b/include/code_80958E8.h @@ -68,7 +68,7 @@ u8 *sub_8096DD8(void); u8 *sub_8096DE8(void); u8 sub_8096E2C(void); void sub_8096EEC(WonderMail *mail); -void SaveWonderMail(unkStruct_8094924 *a, WonderMail *b); -void RestoreWonderMail(unkStruct_8094924 *a, WonderMail *b); +void WriteWonderMailBits(DataSerializer *a, WonderMail *b); +void ReadWonderMailBits(DataSerializer *a, WonderMail *b); #endif // GUARD_CODE_80958E8_H diff --git a/include/code_8097670.h b/include/code_8097670.h index 3e75505c0..34f15dbab 100644 --- a/include/code_8097670.h +++ b/include/code_8097670.h @@ -3,21 +3,59 @@ #include "structs/str_dungeon.h" +// See gAdventureLogText +enum AdventureAchievement +{ + AA_HILL_OF_ANCIENTS, + AA_FUGITIVE, + AA_PREVENT_METEOR, + AA_BROKE_CURSE, + AA_TEAM_BASE_DONE, + AA_SMEARGLE, + AA_SPOTTED_MUNCHLAX, + AA_NUM_MOVES_LEARNED, + AA_NUM_FRIEND_RESCUE_SUCCESSES, + AA_NUM_POKEMON_EVOLVED, + AA_NUM_POKEMON_JOINED, + AA_NUM_THIEVING_SUCCESSES, + AA_NUM_FLOORS_EXPLORED, + AA_ALL_FRIEND_AREAS, + AA_ALL_POKEMON_LEADERS, + AA_ALL_POKEMON_JOINED, + AA_RECRUIT_MOLTRES, + AA_RECRUIT_ZAPDOS, + AA_RECRUIT_ARTICUNO, + AA_RECRUIT_DEOXYS, + AA_RECRUIT_ENTEI, + AA_RECRUIT_RAIKOU, + AA_RECRUIT_SUICUNE, + AA_RECRUIT_HO_OH, + AA_RECRUIT_KYOGRE, + AA_RECRUIT_GROUDON, + AA_RECRUIT_RAYQUAZA, + AA_RECRUIT_LUGIA, + AA_RECRUIT_CELEBI, + AA_RECRUIT_MEW, + AA_RECRUIT_MEWTWO, + AA_RECRUIT_JIRACHI, + AA_MAX +}; + // size: 0xC4 struct unkStruct_203B494 { - u32 unk0; // 32 bit bitfield, I think + /* 0x4 */ u32 achievements; // Adventure achievement flags /* 0x4 */ s32 numAdventures; - s32 unk8; - s32 unkC; + /* 0x8 */ s32 friendRescueSuccesses; + /* 0xC */ s32 numEvolved; /* 0x10 */ DungeonLocation dungeonLocation; - s16 unk14; - s16 unk16; - s16 unk18; + /* 0x14 */ s16 thievingSuccesses; + /* 0x16 */ s16 numJoined; + /* 0x18 */ s16 adventureMovesLearned; u32 unk1C[14]; u32 unk54[14]; - u32 unk8C[13]; - s32 unkC0; + /* 0x8C */ u32 learnedMoves[13]; // Get with `learnedMoves[move / 32] & 1 << move % 32` ... Set with `learnedMoves[move / 32] |= 1 << move % 32` + /* 0xC0 */ s32 numFloorsExplored; }; extern struct unkStruct_203B494 *gUnknown_203B494; @@ -29,20 +67,20 @@ void ResetNumAdventures(void); void sub_8097670(void); struct unkStruct_203B494 *sub_8097680(void); -void sub_80976A8(void); -void sub_80976F8(u8); -bool8 sub_8097710(u8); -void sub_8097790(void); -s32 sub_80977B8(void); -void sub_80977D0(void); -s32 sub_80977F8(void); -s16 sub_8097838(void); -void sub_8097848(void); -s16 sub_8097870(void); -s16 sub_8097880(void); -s16 sub_80978B8(void); -void sub_8097944(void); -u32 sub_8097D60(u8 *r0, u32 size); -u32 sub_8097D98(u8 *r0, u32 size); +void ResetAdventureInfo(void); +void SetAdventureAchievement(u8); +bool8 GetAdventureAchievement(u8); +void IncrementFriendRescueSuccesses(void); +s32 GetFriendRescueSuccesses(void); +void IncrementNumEvolved(void); +s32 GetAdventureNumEvolved(void); +s16 GetThievingSuccesses(void); +void IncrementAdventureNumJoined(void); +s16 GetAdventureNumJoined(void); +s16 GetAdventureMovesLearned(void); +s16 GetAdventureFloorsExplored(void); +void UpdateAdventureAchievements(void); +u32 SaveAdventureData(u8 *r0, u32 size); +u32 RestoreAdventureData(u8 *r0, u32 size); #endif // GUARD_CODE_8097670_H diff --git a/include/constants/move_id.h b/include/constants/move_id.h index b20521c92..01c376a7c 100644 --- a/include/constants/move_id.h +++ b/include/constants/move_id.h @@ -418,4 +418,6 @@ #define MOVE_MD1_2 0x19B // Unused #define MOVE_PIERCE 0x19C +#define NUM_MOVE_IDS (MOVE_PIERCE + 1) + #endif diff --git a/include/exclusive_pokemon.h b/include/exclusive_pokemon.h index 4b5f6ef2f..e4818501f 100644 --- a/include/exclusive_pokemon.h +++ b/include/exclusive_pokemon.h @@ -57,7 +57,7 @@ void SetTutorialFlag(s32 param_1); bool32 GetTutorialFlag(s32 param_1); bool8 IsExclusivePokemonUnlocked(s16 pokeID); void UnlockExclusivePokemon(s16 pokeID); -void WriteExclusivePokemon(struct unkStruct_8094924 *r0); -void ReadExclusivePokemon(struct unkStruct_8094924 *r0); +void WriteExclusivePokemon(DataSerializer *r0); +void ReadExclusivePokemon(DataSerializer *r0); #endif // GUARD_EXCLUSIVE_POKEMON_H diff --git a/include/items.h b/include/items.h index a57805e82..bdae533f7 100644 --- a/include/items.h +++ b/include/items.h @@ -68,10 +68,10 @@ bool8 IsInvalidItemReward(u8 itemID); bool8 HasGummiItem(void); void GetGummiItemStatBoost(PokemonStruct1* pokemon, u8 id, bool8 checkBoostFlags, Gummi *gummi); -void RestoreHeldItem(unkStruct_8094924 *, BulkItem *); -void SaveHeldItem(unkStruct_8094924 *, BulkItem *); -void RestoreItemSlot(unkStruct_8094924 *, Item *); -void SaveItemSlot(unkStruct_8094924 *, Item *); +void ReadHeldItemBits(DataSerializer *, BulkItem *); +void WriteHeldItemBits(DataSerializer *, BulkItem *); +void ReadItemSlotBits(DataSerializer *, Item *); +void WriteItemSlotBits(DataSerializer *, Item *); s32 RestoreTeamInventory(u8 *, u32 size); s32 SaveTeamInventory(u8 *, u32 size); diff --git a/include/moves.h b/include/moves.h index 30e87ce5e..18e3a6035 100644 --- a/include/moves.h +++ b/include/moves.h @@ -51,8 +51,8 @@ void LoadWazaParameters(void); bool8 MoveCannotHitFrozen(Move *move); bool8 MoveIgnoresTaunted(Move *move); void RemoveLinkSequenceFromMoves8(Move *moves, s32 index); -void RestorePokemonMoves(struct unkStruct_8094924 *, Move *moveSet); -void SavePokemonMoves(struct unkStruct_8094924 *, Move *moveSet); +void ReadPoke1MovesBits(DataSerializer *, Move *moveSet); +void WritePoke1MovesBits(DataSerializer *, Move *moveSet); bool8 ToggleMoveEnabled(s32 index, Move *moves); bool8 ToggleSetMove(s32 index, Move *moves); bool8 TryLinkMovesAfter(s32 index, Move *moves); @@ -86,8 +86,8 @@ bool8 sub_8093318(s32, Move *moves); bool8 sub_809333C(s32, Move *moves); s32 sub_80935B8(Move *moves, s32 index); void sub_8094060(Move *srcMoves, Move *destMoves); -void sub_8094184(struct unkStruct_8094924 *, struct Moves *); -void sub_80941FC(struct unkStruct_8094924 *, struct Moves *); +void WritePoke2MovesBits(DataSerializer *, struct Moves *); +void ReadPoke2MovesBits(DataSerializer *, struct Moves *); static inline bool8 MoveFlagExists(Move *move) { diff --git a/include/pokemon.h b/include/pokemon.h index 0d10e72a7..2424fb24e 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -11,7 +11,9 @@ enum PokemonUnk0Flags { - FLAG_ON_TEAM = 2, + FLAG_NONE = 0, + FLAG_UNK_1 = 1, + FLAG_ON_TEAM = 2, // Mon is not on "standby" }; // size: 0x1A4 @@ -83,8 +85,8 @@ s32 GetUnownIndex(s16 index); void GenerateHiddenPower(HiddenPower *); s32 GetEvolutionSequence(PokemonStruct1 *pokemon, EvolveStage *); void xxx_pokemonstruct_to_pokemon2_808DE50(PokemonStruct2 *, PokemonStruct1 *, s32); -void SavePokemonStruct(unkStruct_8094924 *, PokemonStruct1 *pokemon); -void RestorePokemonStruct(unkStruct_8094924 *, PokemonStruct1 *); +void WritePoke1Bits(DataSerializer *, PokemonStruct1 *pokemon); +void ReadPoke1Bits(DataSerializer *, PokemonStruct1 *); s32 sub_808E218(unkStruct_808E218_arg *, PokemonStruct1 *pokemon); void sub_808CFD0(PokemonStruct1 *pokemon, s16 _species, u8* name, u32 _itemID, DungeonLocation *location, u16 *moveID); void sub_808D0D8(PokemonStruct1 *pokemon); @@ -100,12 +102,12 @@ extern s32 sub_808D580(s32 *); static inline bool8 PokemonFlag1(PokemonStruct1 *mon) { - return ((mon->unk0 & 1)); + return (mon->unk0 & FLAG_UNK_1); } static inline bool8 PokemonFlag2(PokemonStruct1 *mon) { - return (((mon->unk0 >> (FLAG_ON_TEAM - 1)) & 1)); + return ((mon->unk0 >> (FLAG_ON_TEAM - 1)) & 1); } static inline void SetPokemonFlag2(PokemonStruct1 *mon) diff --git a/include/structs/dungeon_entity.h b/include/structs/dungeon_entity.h index 0575a7d55..8bed713aa 100644 --- a/include/structs/dungeon_entity.h +++ b/include/structs/dungeon_entity.h @@ -26,6 +26,8 @@ #define STAT_STAGE_ACCURACY 0 #define STAT_STAGE_EVASION 1 +#define NUM_PICKED_IQ_SKILLS 3 + typedef struct unkStruct_8044CC8 { u8 actionUseIndex; @@ -37,7 +39,7 @@ typedef struct ActionContainer { /* 0x0 */ u16 action; /* 0x2 */ u8 direction; - u8 fill3; + u8 unk3; // Additional parameter alongside actionIndex. Used for things like indicating which move a Pokémon should use from its moveset. /* 0x4 */ unkStruct_8044CC8 unk4[2]; // Position of the target that the Pokémon wants throw an item at. @@ -224,8 +226,10 @@ typedef struct EntityInfo /* 0x68 */ Position prevPos[NUM_PREV_POS]; /* 0x78 */ AITarget aiTarget; // Bitwise flags corresponding to selected IQ skills. - /* 0x8C */ u8 IQSkillMenuFlags[4]; // IQ skills selected in the IQ skills menu. - /* 0x90 */ u8 IQSkillFlags[4]; + /* 0x8C */ u8 IQSkillMenuFlags[NUM_PICKED_IQ_SKILLS]; // IQ skills selected in the IQ skills menu. + u8 padding8F; + /* 0x90 */ u8 IQSkillFlags[NUM_PICKED_IQ_SKILLS]; + u8 padding93; /* 0x94 */ u8 tactic; u8 fill95[0x98 - 0x95]; /* 0x98 */ u32 unk98; diff --git a/include/structs/str_dungeon.h b/include/structs/str_dungeon.h index c7daddb1b..590f23722 100644 --- a/include/structs/str_dungeon.h +++ b/include/structs/str_dungeon.h @@ -264,6 +264,8 @@ typedef struct Dungeon /* 0x5C0 */ s32 unk5C0; /* 0x5C4 */ struct unkStruct_Dungeon5C4_sub unk5C4[3]; /* 0x5F4 */ u8 faintStringBuffer[80]; + + // TODO: This is the start of a struct that is 0x58 bytes (dungeon data that persists between save/reload). See sub_8080B90 and sub_8081C50 /* 0x644 */ DungeonLocation dungeonLocation; /* 0x648 */ DungeonLocation dungeonLocation2; struct unkStruct_Dungeon64C unk64C; @@ -277,7 +279,7 @@ typedef struct Dungeon u8 unk65B; u8 unk65C; u8 unk65D; - u8 fill65e[0x660 - 0x65e]; + u8 fill65e[2]; /* 0x660 */ s16 fractionalTurn; // Handles turn order when Pokémon have different movement speeds. s16 unk662; s16 unk664; @@ -312,7 +314,8 @@ typedef struct Dungeon s32 unk694; u8 unk698; u8 unk699; - u8 fill69A[0x69C - 0x69A]; + u8 fill69A[2]; + EntityInfo unk69C[4]; EntityInfo unkEBC[1]; // Unsure about the size... See sub_8082A08() u8 fill10C4[0x343C - 0x10C4]; @@ -350,11 +353,9 @@ typedef struct Dungeon Position unkE218; Position unkE21C; // stair location? Position unkE220[8]; - u32 unkE240; - u8 fillE244[0xE250 - 0xE244]; - u32 unkE250; - u8 fillE254[0xE260 - 0xE254]; - u32 unkE260; + u32 unkE240[4]; + u32 unkE250[4]; + u16 unkE260[2]; /* 0xE264 */ Weather weather; // Uses the weather constants in weather.h. /* 0xE27C */ Tile unkE27C[8][8]; /* 0xE87C */ u8 unkE87C[8][8]; diff --git a/include/structs/str_pokemon.h b/include/structs/str_pokemon.h index 9f601e689..4c8a2d40d 100644 --- a/include/structs/str_pokemon.h +++ b/include/structs/str_pokemon.h @@ -23,7 +23,7 @@ typedef struct unkPokeSubStruct_C // size: 0x58 typedef struct PokemonStruct1 { - u16 unk0; // Probably a union: Sometimes ldrh and sometimes ldrb. Recruited?? + u16 unk0; // Probably a union: Sometimes ldrh and sometimes ldrb. Recruited?? "sub_80954CC" only loads 2 bits of info /* 0x2 */ bool8 isTeamLeader; /* 0x3 */ u8 level; /* 0x4 */ DungeonLocation dungeonLocation; @@ -71,8 +71,8 @@ typedef struct PokemonStruct2 /* 0x18 */ u32 currExp; /* 0x1C */ Moves moves; /* 0x40 */ Item itemSlot; // heldItem - FixedPoint belly; // some struct - FixedPoint maxBelly; // some struct (same type as 44) + /* 0x44 */ FixedPoint belly; + /* 0x48 */ FixedPoint maxBelly; /* 0x4C */ u32 IQSkills; // unk20 /* 0x50 */ u8 tacticIndex; /* 0x54 */ HiddenPower hiddenPower; diff --git a/include/structs/str_wonder_mail.h b/include/structs/str_wonder_mail.h index fcf48db54..101e96928 100644 --- a/include/structs/str_wonder_mail.h +++ b/include/structs/str_wonder_mail.h @@ -64,8 +64,8 @@ typedef struct unkStruct_203B480 u32 unk10; u16 unk10_u16; } unk10; - /* 0x14 */ u8 playerName[0x20 - 0x14]; - Item item; + /* 0x14 */ u8 playerName[10]; + /* 0x20 */ Item item; u32 unk24; u32 unk28; /* 0x2C */ s8 rescuesAllowed; diff --git a/src/adventure_log.c b/src/adventure_log.c index 84c6be48f..427af9730 100644 --- a/src/adventure_log.c +++ b/src/adventure_log.c @@ -87,8 +87,7 @@ static void DisplayAdventureLog(void) s32 i; s32 r4; // r4 s32 r6; // r6 - u8 temp; - s32 v1, v2, v3, v4, v5, v6; + u8 aa; CallPrepareTextbox_8008C54(sAdventureLog->s0.unk34); sub_80073B8(sAdventureLog->s0.unk34); @@ -102,42 +101,49 @@ static void DisplayAdventureLog(void) sub_8012BC4(r6, 0, sAdventureLog->s0.input.unk1E + 1, 1, 7, sAdventureLog->s0.unk34); for (i = 0; i < sAdventureLog->s0.input.unk1A; i++) { - temp = (sAdventureLog->s0.input.unk1E * sAdventureLog->s0.input.unk1C) + i; + aa = (sAdventureLog->s0.input.unk1E * sAdventureLog->s0.input.unk1C) + i; - if (sub_8097710(temp)) { - switch (temp) { - case 12: - v1 = sub_80978B8(); + if (GetAdventureAchievement(aa)) { + switch (aa) { + case AA_NUM_FLOORS_EXPLORED: { + s32 v1 = GetAdventureFloorsExplored(); gFormatArgs[0] = (s16)v1; - PrintFormattedStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(temp), sAdventureLog->s0.unk34, 0); + PrintFormattedStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(aa), sAdventureLog->s0.unk34, 0); break; - case 7: - v2 = sub_8097880(); + } + case AA_NUM_MOVES_LEARNED: { + s32 v2 = GetAdventureMovesLearned(); gFormatArgs[0] = (s16)v2; - PrintFormattedStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(temp), sAdventureLog->s0.unk34, 0); + PrintFormattedStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(aa), sAdventureLog->s0.unk34, 0); break; - case 11: - v3 = sub_8097838(); + } + case AA_NUM_THIEVING_SUCCESSES: { + s32 v3 = GetThievingSuccesses(); gFormatArgs[0] = (s16)v3; - PrintFormattedStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(temp), sAdventureLog->s0.unk34, 0); + PrintFormattedStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(aa), sAdventureLog->s0.unk34, 0); break; - case 8: - v4 = sub_80977B8(); + } + case AA_NUM_FRIEND_RESCUE_SUCCESSES: { + s32 v4 = GetFriendRescueSuccesses(); gFormatArgs[0] = v4; - PrintFormattedStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(temp), sAdventureLog->s0.unk34, 0); + PrintFormattedStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(aa), sAdventureLog->s0.unk34, 0); break; - case 9: - v5 = sub_80977F8(); + } + case AA_NUM_POKEMON_EVOLVED: { + s32 v5 = GetAdventureNumEvolved(); gFormatArgs[0] = v5; - PrintFormattedStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(temp), sAdventureLog->s0.unk34, 0); + PrintFormattedStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(aa), sAdventureLog->s0.unk34, 0); break; - case 10: - v6 = sub_8097870(); + } + case AA_NUM_POKEMON_JOINED: { + s32 v6 = GetAdventureNumJoined(); gFormatArgs[0] = (s16)v6; // fallthrough - default: - PrintFormattedStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(temp), sAdventureLog->s0.unk34, 0); + } + default: { + PrintFormattedStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(aa), sAdventureLog->s0.unk34, 0); break; + } } } else @@ -145,4 +151,4 @@ static void DisplayAdventureLog(void) } sub_80073E0(sAdventureLog->s0.unk34); -} +} \ No newline at end of file diff --git a/src/code_803D0D8.c b/src/code_803D0D8.c index 3c424f85d..03f37c8af 100644 --- a/src/code_803D0D8.c +++ b/src/code_803D0D8.c @@ -36,7 +36,7 @@ u8 sub_803D110(u8 *param_1, u8 *param_2, s32 size) s32 index1; s32 newSize; s32 save; - unkStruct_8094924 auStack_88; + DataSerializer auStack_88; u8 local_78 [56]; u8 auStack_40 [36]; @@ -62,11 +62,11 @@ u8 sub_803D110(u8 *param_1, u8 *param_2, s32 size) newSize >>= 3; save = newSize; - xxx_init_struct_8094924_save_809486C(&auStack_88,auStack_40, save); + InitBitWriter(&auStack_88,auStack_40, save); for(index1 = 0; index1 < size; index1++) { - SaveIntegerBits(&auStack_88, &local_78[index1], 5); + WriteBits(&auStack_88, &local_78[index1], 5); } nullsub_102(&auStack_88); MemoryCopy8(param_2, auStack_40, save); @@ -77,7 +77,7 @@ void sub_803D1A8(u8 *param_1, u8 *param_2, s32 size) { s32 index; s32 newSize; - unkStruct_8094924 auStack_5c; + DataSerializer auStack_5c; u8 local_4c [56]; newSize = size * 5 + 5; @@ -85,10 +85,10 @@ void sub_803D1A8(u8 *param_1, u8 *param_2, s32 size) newSize = size * 5 + 0xc; } newSize >>= 3; - xxx_init_struct_8094924_restore_809485C(&auStack_5c, param_2, newSize); + InitBitReader(&auStack_5c, param_2, newSize); for(index = 0; index < size; index++) { - RestoreIntegerBits(&auStack_5c, &local_4c[index], 5); + ReadBits(&auStack_5c, &local_4c[index], 5); } nullsub_102(&auStack_5c); @@ -105,7 +105,7 @@ bool8 sub_803D204(u8 *buffer,unkStruct_203B480 *param_2) u8 local_c4 [34]; u8 translateBuffer [PASSWORD_BUFFER_SIZE]; u8 localBuffer [PASSWORD_BUFFER_SIZE]; - unkStruct_8094924 uStack_30; + DataSerializer uStack_30; s32 index; checksum = 0; @@ -127,7 +127,7 @@ bool8 sub_803D204(u8 *buffer,unkStruct_203B480 *param_2) checksum += local_c4[index] + index; } if (local_c4[0] == checksum) { - xxx_init_struct_8094924_restore_809485C(&uStack_30,&local_c4[1],33); + InitBitReader(&uStack_30,&local_c4[1],33); sub_8095774(&uStack_30,param_2); nullsub_102(&uStack_30); return TRUE; @@ -143,7 +143,7 @@ void sub_803D2C0(u8 *buffer, unkStruct_203B480 *mail) u8 local_c0 [34]; u8 buffer1 [PASSWORD_BUFFER_SIZE]; u8 buffer2 [PASSWORD_BUFFER_SIZE]; - unkStruct_8094924 auStack_2c; + DataSerializer auStack_2c; checksum = 0; @@ -152,7 +152,7 @@ void sub_803D2C0(u8 *buffer, unkStruct_203B480 *mail) local_c0[index] = 0; } - xxx_init_struct_8094924_save_809486C(&auStack_2c,&local_c0[1],33); + InitBitWriter(&auStack_2c,&local_c0[1],33); sub_8095824(&auStack_2c,mail); nullsub_102(&auStack_2c); for(index = 1; index < 34; index++) @@ -176,7 +176,7 @@ bool8 DecodeWonderMailPassword(u8* buffer, WonderMail *mail) u8 local_70 [16]; u8 local_60 [24]; u8 password [24]; - unkStruct_8094924 puVar1; + DataSerializer puVar1; checksum = 0; MemoryCopy8(password,buffer,24); @@ -199,8 +199,8 @@ bool8 DecodeWonderMailPassword(u8* buffer, WonderMail *mail) checksum += (local_70[index] + index); } if (local_70[0] == checksum) { - xxx_init_struct_8094924_restore_809485C(&puVar1,&local_70[1],0xc); - RestoreWonderMail(&puVar1,mail); + InitBitReader(&puVar1,&local_70[1],0xc); + ReadWonderMailBits(&puVar1,mail); nullsub_102(&puVar1); return TRUE; } @@ -215,7 +215,7 @@ void sub_803D414(u8 *buffer,WonderMail *mail) u8 local_6c [15]; u8 local_5c [24]; u8 auStack_44 [24]; - unkStruct_8094924 uStack_2c; + DataSerializer uStack_2c; checksum = 0; for(index = 0; index < 0xF; index++) @@ -223,8 +223,8 @@ void sub_803D414(u8 *buffer,WonderMail *mail) local_6c[index] = 0; } - xxx_init_struct_8094924_save_809486C(&uStack_2c,&local_6c[1],12); - SaveWonderMail(&uStack_2c,mail); + InitBitWriter(&uStack_2c,&local_6c[1],12); + WriteWonderMailBits(&uStack_2c,mail); nullsub_102(&uStack_2c); for(index = 1; index < 0xF; index++) diff --git a/src/code_8042B34.c b/src/code_8042B34.c index b5bcc97f2..aa684d283 100644 --- a/src/code_8042B34.c +++ b/src/code_8042B34.c @@ -298,7 +298,7 @@ extern void sub_8047104(void); extern void sub_8068F28(void); extern void sub_806C1D8(void); extern void sub_804700C(void); -extern void sub_8097810(void); +extern void IncrementThievingSuccesses(void); extern void sub_803E13C(void); extern void sub_80841EC(void); extern void sub_8084424(void); @@ -315,7 +315,7 @@ extern void sub_8068614(void); extern void sub_80840A4(void); extern void sub_803E178(void); extern void sub_80848F0(void); -extern void sub_8097890(void); +extern void IncrementAdventureFloorsExplored(void); extern void sub_806AB2C(void); extern void DisplayPreFightDialogue(void); extern void sub_8071DA4(Entity *); @@ -332,7 +332,7 @@ extern void sub_80521D0(void); extern void sub_803F27C(u8); extern void sub_807E7FC(u8); extern void sub_80095CC(u32, u32); -extern void sub_8081BF4(u8 *r0, u32 r1); +extern void ReadDungeonState(u8 *r0, u32 r1); extern bool8 IsLevelResetTo1(u8 dungeon); extern void sub_8068A84(PokemonStruct1 *pokemon); extern void sub_807EAA0(u32, u32); @@ -371,7 +371,7 @@ 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 sub_8080B30(u8 *param_1,u32 param_2); +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); @@ -469,7 +469,7 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) sub_8042E98(); gUnknown_202F32C = 0; if (r6) { - sub_8081BF4(gSerializedData_203B41C, 0x4800); + ReadDungeonState(gSerializedData_203B41C, 0x4800); sub_8049840(); } if (r9) { @@ -686,7 +686,7 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) if (!r6) { sub_80848F0(); - sub_8097890(); + IncrementAdventureFloorsExplored(); } gUnknown_203B40C = 1; @@ -824,7 +824,7 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) gUnknown_203B40C = 0; if (gDungeon->unk3 != 0) { - sub_8080B30(gSerializedData_203B41C, 0x4800); + WriteDungeonState(gSerializedData_203B41C, 0x4800); r8->unk7C = 3; r8->unk80 = gDungeon->dungeonLocation; check = FALSE; @@ -834,7 +834,7 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) s16 var; if (gDungeon->unk6 != 0) { - sub_8080B30(gSerializedData_203B41C, 0x4800); + WriteDungeonState(gSerializedData_203B41C, 0x4800); } else { sub_8046F84(ITEM_FLAG_IN_SHOP); @@ -854,14 +854,14 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) else if (gDungeon->unk11 == 2) { sub_8083AB0(0x229, NULL, GetLeader()); if (gDungeon->unk66E != 0) { - sub_8097810(); + IncrementThievingSuccesses(); } check = TRUE; } else if (gDungeon->unk11 == 3) { sub_8083AB0(0x22A, NULL, GetLeader()); if (gDungeon->unk66E != 0) { - sub_8097810(); + IncrementThievingSuccesses(); } check = TRUE; } @@ -873,13 +873,13 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) else if (gDungeon->unk678 == 1 && sub_8043D10() == 2 && gDungeon->unk654 == 2) { sub_8083AB0(0x228, NULL, GetLeader()); if (gDungeon->unk66E != 0) { - sub_8097810(); + IncrementThievingSuccesses(); } check = TRUE; } else { if (gDungeon->unk66E != 0) { - sub_8097810(); + IncrementThievingSuccesses(); } if (gDungeon->dungeonLocation.floor + 1 < gDungeon->unk1CEC8) { gDungeon->dungeonLocation.floor++; diff --git a/src/code_806FDF4.c b/src/code_806FDF4.c index 2e45d797e..a3d1775a7 100644 --- a/src/code_806FDF4.c +++ b/src/code_806FDF4.c @@ -797,7 +797,7 @@ bool8 sub_806FA5C(Entity *entity1, Entity *entity2, struct unkStruct_8069D4C *pa pokeStruct2->itemSlot = param_3->heldItem; BoundedCopyStringtoBuffer(pokeStruct2->name,GetMonSpecies(param_3->id),10); - sub_8097848(); + IncrementAdventureNumJoined(); if (sub_806B8CC(param_3->id,param_3->pos.x,param_3->pos.y,pokeStruct2,&local_2c,0,1) == 0) { TryDisplayDungeonLoggableMessage(entity1,*gUnknown_80FA058); @@ -1061,7 +1061,7 @@ bool8 sub_806FDF4(Entity *entity1,Entity *entity2,Entity **entityPtr) UnlockFriendArea(friendArea); flag = TRUE; } - sub_8097848(); + IncrementAdventureNumJoined(); sub_8068FE0(entity2,500,entity1); if (sub_806B8CC(local_74.id,local_74.pos.x,local_74.pos.y,pokeStruct2,&local_2c,0,0) == 0) { pokeStruct2->unk0 = 0; diff --git a/src/code_8083288.c b/src/code_8083288.c index 39d64988c..28df14231 100644 --- a/src/code_8083288.c +++ b/src/code_8083288.c @@ -10,13 +10,13 @@ #include "structs/str_position.h" -u16 sub_8083158(unkStruct_8094924 *param_1); -s16 sub_8083170(unkStruct_8094924 *param_1); -u8 sub_8083188(unkStruct_8094924 *param_1); -u32 sub_80831A0(unkStruct_8094924 *param_1); -bool8 sub_80831DC(unkStruct_8094924 *param_1); -void sub_8082FE0(unkStruct_8094924 *param_1, u8 *param_2, s32 size); -void sub_80831F8(unkStruct_8094924 *param_1,Position *param_2); +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); @@ -41,471 +41,508 @@ void sub_8082B40(void) } } -s16 sub_8082BC0(unkStruct_8094924 *param_1) + + + + + + + +// Seems to be a new file (regarding serialization) starting here + + + + + + + + +s16 sub_8082BC0(DataSerializer *param_1) { s16 temp[2]; temp[0] = 0; - sub_8082FE0(param_1, (u8 *)temp, 2); + ReadBytes(param_1, temp, 2); return temp[0]; } - -u8 sub_8082BE0(unkStruct_8094924 *param_1) +u8 sub_8082BE0(DataSerializer *param_1) { u8 temp[4]; temp[0] = 0; - sub_8082FE0(param_1, temp, 1); + ReadBytes(param_1, temp, 1); return temp[0]; } - -u8 sub_8082BFC(unkStruct_8094924 *param_1) +u8 sub_8082BFC(DataSerializer *param_1) { u8 temp[4]; temp[0] = 0; - sub_8082FE0(param_1, temp, 1); + ReadBytes(param_1, temp, 1); return temp[0]; } -u8 sub_8082C18(unkStruct_8094924 *param_1) +u8 sub_8082C18(DataSerializer *param_1) { u8 temp[4]; temp[0] = 0; - sub_8082FE0(param_1, temp, 1); + ReadBytes(param_1, temp, 1); return temp[0]; } -u8 sub_8082C34(unkStruct_8094924 *param_1) +u8 sub_8082C34(DataSerializer *param_1) { u8 temp[4]; temp[0] = 0; - sub_8082FE0(param_1, temp, 1); + ReadBytes(param_1, temp, 1); return temp[0]; } -u8 sub_8082C50(unkStruct_8094924 *param_1) +u8 sub_8082C50(DataSerializer *param_1) { u8 temp[4]; temp[0] = 0; - sub_8082FE0(param_1, temp, 1); + ReadBytes(param_1, temp, 1); return temp[0]; } -u32 sub_8082C6C(unkStruct_8094924 *param_1) +// Read some enum ? +u32 sub_8082C6C(DataSerializer *param_1) { u32 temp; temp = 0; - sub_8082FE0(param_1, (u8 *)&temp, 4); + ReadBytes(param_1, &temp, 4); return temp; } -u8 sub_8082C84(unkStruct_8094924 *param_1) +u8 sub_8082C84(DataSerializer *param_1) { u8 temp[4]; temp[0] = 0; - sub_8082FE0(param_1, temp, 1); + ReadBytes(param_1, temp, 1); return temp[0]; } -u8 sub_8082CA0(unkStruct_8094924 *param_1) +u8 sub_8082CA0(DataSerializer *param_1) { u8 temp[4]; temp[0] = 0; - sub_8082FE0(param_1, temp, 1); + ReadBytes(param_1, temp, 1); return temp[0]; } -void sub_8082CBC(unkStruct_8094924 *param_1, ActionContainer *action) +void ReadActionContainer(DataSerializer *param_1, ActionContainer *action) { action->action = ACTION_NOTHING; - sub_8082FE0(param_1, &action->direction, 1); - action->fill3 = 7; - sub_80831F8(param_1, &action->itemTargetPosition); + ReadBytes(param_1, &action->direction, 1); + action->unk3 = 7; + ReadPosition8(param_1, &action->itemTargetPosition); } -void sub_8082CE4(unkStruct_8094924 *param_1, AITarget *aitarget) +void ReadAITarget(DataSerializer *param_1, AITarget *aitarget) { - sub_8082FE0(param_1, (u8 *)&aitarget->aiObjective, 1); - aitarget->aiNotNextToTarget = sub_80831DC(param_1); - aitarget->aiTargetingEnemy = sub_80831DC(param_1); - aitarget->aiTurningAround = sub_80831DC(param_1); - aitarget->aiTargetSpawnGenID = sub_8083158(param_1); + 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; - sub_80831F8(param_1, &aitarget->aiTargetPos); + ReadPosition8(param_1, &aitarget->aiTargetPos); } -void sub_8082D28(unkStruct_8094924 *param_1, u8 *param_2) +void Read3Bytes(DataSerializer *param_1, u8 *dst) { - sub_8082FE0(param_1, param_2, 3); + ReadBytes(param_1, dst, 3); } -void sub_8082D34(unkStruct_8094924 *param_1, Sleep *sleep) +void ReadSleep(DataSerializer *param_1, Sleep *sleep) { - sub_8082FE0(param_1, &sleep->sleep, 1); - sleep->sleepTurns = sub_8083188(param_1); + ReadBytes(param_1, &sleep->sleep, 1); + sleep->sleepTurns = ReadU8(param_1); } -void sub_8082D50(unkStruct_8094924 *param_1, NonVolatile *nonvoltaile) +void ReadNonVolatile(DataSerializer *param_1, NonVolatile *nonvolatile) { - sub_8082FE0(param_1, &nonvoltaile->nonVolatileStatus, 1); - nonvoltaile->nonVolatileStatusTurns = sub_8083188(param_1); - nonvoltaile->nonVolatileStatusDamageCountdown = sub_8083188(param_1); - nonvoltaile->unk4 = sub_8083188(param_1); + ReadBytes(param_1, &nonvolatile->nonVolatileStatus, 1); + nonvolatile->nonVolatileStatusTurns = ReadU8(param_1); + nonvolatile->nonVolatileStatusDamageCountdown = ReadU8(param_1); + nonvolatile->unk4 = ReadU8(param_1); } -void sub_8082D7C(unkStruct_8094924 *param_1, Immobilize *immobilze) +void ReadImmobilize(DataSerializer *param_1, Immobilize *immobilize) { - sub_8082FE0(param_1, &immobilze->immobilizeStatus, 1); - immobilze->immobilizeStatusTurns = sub_8083188(param_1); - immobilze->immobilizeStatusDamageCountdown = sub_8083188(param_1); - immobilze->unk4 = sub_80831A0(param_1); + ReadBytes(param_1, &immobilize->immobilizeStatus, 1); + immobilize->immobilizeStatusTurns = ReadU8(param_1); + immobilize->immobilizeStatusDamageCountdown = ReadU8(param_1); + immobilize->unk4 = sub_80831A0(param_1); } -void sub_8082DA8(unkStruct_8094924 *param_1, Volatile *volatileStatus) +void ReadVolatileStatus(DataSerializer *param_1, Volatile *volatileStatus) { - sub_8082FE0(param_1, &volatileStatus->volatileStatus, 1); - volatileStatus->volatileStatusTurns = sub_8083188(param_1); + ReadBytes(param_1, &volatileStatus->volatileStatus, 1); + volatileStatus->volatileStatusTurns = ReadU8(param_1); } -void sub_8082DC4(unkStruct_8094924 *param_1, Charging *charging) +void ReadCharging(DataSerializer *param_1, Charging *charging) { - sub_8082FE0(param_1, &charging->chargingStatus, 1); - charging->chargingStatusTurns = sub_8083188(param_1); - charging->chargingStatusMoveIndex = sub_8083188(param_1); + ReadBytes(param_1, &charging->chargingStatus, 1); + charging->chargingStatusTurns = ReadU8(param_1); + charging->chargingStatusMoveIndex = ReadU8(param_1); } -void sub_8082DE8(unkStruct_8094924 *param_1, Protection *protect) +void ReadProtection(DataSerializer *param_1, Protection *protect) { - sub_8082FE0(param_1, &protect->protectionStatus, 1); - protect->protectionStatusTurns = sub_8083188(param_1); + ReadBytes(param_1, &protect->protectionStatus, 1); + protect->protectionStatusTurns = ReadU8(param_1); } -void sub_8082E04(unkStruct_8094924 *param_1, Waiting *waiting) +void ReadWaiting(DataSerializer *param_1, Waiting *waiting) { - sub_8082FE0(param_1, &waiting->waitingStatus, 1); - waiting->enemyDecoy = sub_80831DC(param_1); - waiting->unkCA = sub_80831DC(param_1); - waiting->waitingStatusTurns = sub_8083188(param_1); - waiting->curseDamageCountdown = sub_8083188(param_1); + 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 sub_8082E38(unkStruct_8094924 *param_1, Linked *linked) +void ReadLinked(DataSerializer *param_1, Linked *linked) { - sub_8082FE0(param_1, &linked->linkedStatus, 1); + ReadBytes(param_1, &linked->linkedStatus, 1); linked->unkD4 = sub_80831A0(param_1); - linked->unkD8 = sub_8083188(param_1); - linked->linkedStatusTurns = sub_8083188(param_1); - linked->linkedStatusDamageCountdown = sub_8083188(param_1); + linked->unkD8 = ReadU8(param_1); + linked->linkedStatusTurns = ReadU8(param_1); + linked->linkedStatusDamageCountdown = ReadU8(param_1); } -void sub_8082E6C(unkStruct_8094924 *param_1, MoveStatus *moveStatus) +void ReadMoveStatus(DataSerializer *param_1, MoveStatus *moveStatus) { - sub_8082FE0(param_1, &moveStatus->moveStatus, 1); - moveStatus->moveStatusTurns = sub_8083188(param_1); + ReadBytes(param_1, &moveStatus->moveStatus, 1); + moveStatus->moveStatusTurns = ReadU8(param_1); } -void sub_8082E88(unkStruct_8094924 *param_1, u8 *param_2, s32 size) +void sub_8082E88(DataSerializer *param_1, void *dst, s32 param_3) { - sub_8082FE0(param_1, param_2, 1); + ReadBytes(param_1, dst, 1); } -void sub_8082E94(unkStruct_8094924 *param_1, TransformStatus *transform) +void ReadTransformStatus(DataSerializer *param_1, TransformStatus *transform) { - sub_8082FE0(param_1, &transform->transformStatus, 1); - transform->transformStatusTurns = sub_8083188(param_1); + ReadBytes(param_1, &transform->transformStatus, 1); + transform->transformStatusTurns = ReadU8(param_1); } -void sub_8082EB0(unkStruct_8094924 *param_1, EyesightStatus *eyesight) +void ReadEyesightStatus(DataSerializer *param_1, EyesightStatus *eyesight) { - sub_8082FE0(param_1, &eyesight->eyesightStatus, 1); - eyesight->eyesightStatusTurns = sub_8083188(param_1); + ReadBytes(param_1, &eyesight->eyesightStatus, 1); + eyesight->eyesightStatusTurns = ReadU8(param_1); } -void sub_8082ECC(unkStruct_8094924 *param_1, Muzzled *muzzle) +void ReadMuzzled(DataSerializer *param_1, Muzzled *muzzle) { - sub_8082FE0(param_1, (u8 *)&muzzle->muzzled, 1); - muzzle->muzzledTurns = sub_8083188(param_1); + ReadBytes(param_1, &muzzle->muzzled, 1); + muzzle->muzzledTurns = ReadU8(param_1); } -void RestoreDungeonPokemonMove(unkStruct_8094924 *param_1, Move *move) +void RestoreDungeonPokemonMove(DataSerializer *param_1, Move *move) { - move->moveFlags = sub_8083188(param_1); - move->moveFlags2 = sub_8083188(param_1); - sub_8082FE0(param_1, (u8 *)&move->id, 2); - move->PP = sub_8083188(param_1); - move->ginseng = sub_8083188(param_1); + 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 sub_8082F1C(unkStruct_8094924 *param_1,Move *moves) +void ReadMoves(DataSerializer *param_1, Moves *moves) { s32 index; Move *move; - for(index = 0; index < MAX_MON_MOVES; index++) - { - move = &moves[index]; + + for (index = 0; index < MAX_MON_MOVES; index++) { + move = &moves->moves[index]; RestoreDungeonPokemonMove(param_1, move); } - *(u8 *)(moves + 4) = sub_8083188(param_1); // TODO: struggleMoveFlags again + + moves->struggleMoveFlags = ReadU8(param_1); } - -void sub_8082F48(unkStruct_8094924 *param_1, u16 *r1) +// TODO: R1 struct +void sub_8082F48(DataSerializer *param_1, u16 *r1) { - r1[0] = sub_8083170(param_1); - r1[1] = sub_8083170(param_1); + r1[0] = ReadS16(param_1); + r1[1] = ReadS16(param_1); } -void sub_8082F64(unkStruct_8094924 *param_1, JoinedAt *joined) +void ReadJoinedAt(DataSerializer *param_1, JoinedAt *joined) { - joined->joinedAt = sub_8083188(param_1); - joined->unk1 = sub_8083188(param_1); + joined->joinedAt = ReadU8(param_1); + joined->unk1 = ReadU8(param_1); } -void sub_8082F80(unkStruct_8094924 *param_1, HiddenPower *hidden) +void ReadHiddenPower(DataSerializer *param_1, HiddenPower *hidden) { - hidden->hiddenPowerBasePower = sub_8083170(param_1); + hidden->hiddenPowerBasePower = ReadS16(param_1); hidden->hiddenPowerType = sub_8082BFC(param_1); } -void sub_8082F9C(unkStruct_8094924 *param_1, u8 *r1, u32 r2) +void InitByteWriter(DataSerializer *param_1, u8 *dst, u32 capacity) { - param_1->unk0 = r1; - param_1->unk8 = 0; - param_1->unk4 = r1 + r2; + param_1->stream = dst; + param_1->count = 0; + param_1->end = dst + capacity; } -void sub_8082FA8(unkStruct_8094924 *param_1, u8 *param_2, s32 size) +void WriteBytes(DataSerializer *param_1, void *src, s32 numBytes) { - while (size != 0) { - *(param_1->unk0) = *param_2; - param_1->unk0++; - param_2++; - size--; - param_1->unk8++; + u8 *curByte; + + curByte = src; + + while (numBytes != 0) { + *param_1->stream = *curByte; + param_1->stream++; + curByte++; + numBytes--; + param_1->count++; } } -void sub_8082FD4(unkStruct_8094924 *param_1, u8 *r1, u32 r2) +void InitByteReader(DataSerializer *param_1, u8 *src, u32 length) { - param_1->unk0 = r1; - param_1->unk8 = 0; - param_1->unk4 = r1 + r2; + param_1->stream = src; + param_1->count = 0; + param_1->end = src + length; } -void sub_8082FE0(unkStruct_8094924 *param_1, u8 *param_2, s32 size) +void ReadBytes(DataSerializer *param_1, void *dst, s32 numBytes) { - while (size != 0) { - *param_2 = *(param_1->unk0); - param_1->unk0++; - param_2++; - size--; - param_1->unk8++; + u8 *curByte; + + curByte = dst; + + while (numBytes != 0) { + *curByte = *param_1->stream; + param_1->stream++; + curByte++; + numBytes--; + param_1->count++; } } -void nullsub_98(unkStruct_8094924 *param_1) -{} - -void sub_808300C(unkStruct_8094924 *param_1, u8 *param_2) +// Finished reading/writing dungeon +void nullsub_98(DataSerializer *param_1) { - sub_8082FA8(param_1, param_2, 8); } -void sub_8083018(unkStruct_8094924 *param_1) +void Write8Bytes(DataSerializer *param_1, u8 *src) +{ + WriteBytes(param_1, src, 8); +} + +void sub_8083018(DataSerializer *param_1) { u8 auStack_10 [12]; - sub_8082FE0(param_1,auStack_10,8); + ReadBytes(param_1, auStack_10, 8); auStack_10[8] = 0; } -void sub_8083030(unkStruct_8094924 *param_1, u16 param_2) +void WriteU16(DataSerializer *param_1, u16 value) { u16 uStack_8; - uStack_8 = param_2; - sub_8082FA8(param_1,(u8 *)&uStack_8,2); + uStack_8 = value; + + WriteBytes(param_1, &uStack_8, 2); } -void sub_8083048(unkStruct_8094924 *param_1, u32 param_2) +void WriteS16(DataSerializer *param_1, u32 value) { u16 uStack_8; - uStack_8 = param_2; - sub_8082FA8(param_1,(u8 *)&uStack_8,2); + uStack_8 = value; + + WriteBytes(param_1, &uStack_8, 2); } -void sub_8083060(unkStruct_8094924 *param_1, u32 param_2) +void WriteU8(DataSerializer *param_1, u32 value) { u8 uStack_8; - uStack_8 = param_2; - sub_8082FA8(param_1,&uStack_8,1); + uStack_8 = value; + + WriteBytes(param_1, &uStack_8, 1); } -void sub_8083078(unkStruct_8094924 *param_1, u32 param_2) +void WriteU32(DataSerializer *param_1, u32 value) { u32 uStack_8; - uStack_8 = param_2; - sub_8082FA8(param_1,(u8 *)&uStack_8,4); + uStack_8 = value; + + WriteBytes(param_1, &uStack_8, 4); } -void sub_808308C(unkStruct_8094924 *param_1, u32 param_2) +UNUSED void sub_808308C(DataSerializer *param_1, u32 value) { u32 uStack_8; - uStack_8 = param_2; - sub_8082FA8(param_1,(u8 *)&uStack_8,4); + uStack_8 = value; + + WriteBytes(param_1, &uStack_8, 4); } -void sub_80830A0(unkStruct_8094924 *param_1, u32 param_2) +void WriteS32(DataSerializer *param_1, u32 value) { u32 uStack_8; - uStack_8 = param_2; - sub_8082FA8(param_1,(u8 *)&uStack_8,4); + uStack_8 = value; + + WriteBytes(param_1, &uStack_8, 4); } -void sub_80830B4(unkStruct_8094924 *param_1, u8 param_2) +void WriteBool8(DataSerializer *param_1, bool8 value) { u8 local_8; - local_8 = (param_2 != 0) ? -1 : 0; - sub_8082FA8(param_1,&local_8,1); + local_8 = value ? -1 : 0; + + WriteBytes(param_1, &local_8, 1); } -void SavePosition(unkStruct_8094924 *param_1, Position *param_2) +void WritePosition8(DataSerializer *param_1, Position *param_2) { - sub_8082FA8(param_1, (u8 *)¶m_2->x, 1); - sub_8082FA8(param_1, (u8 *)¶m_2->y, 1); + WriteBytes(param_1, ¶m_2->x, 1); + WriteBytes(param_1, ¶m_2->y, 1); } -void sub_80830F8(unkStruct_8094924 *param_1, u32 *param_2) +// TODO: param_2 struct +void sub_80830F8(DataSerializer *param_1, u32 *param_2) { - sub_8082FA8(param_1, (u8 *)¶m_2[0], 1); - sub_8082FA8(param_1, (u8 *)¶m_2[1], 1); - sub_8082FA8(param_1, (u8 *)¶m_2[2], 1); - sub_8082FA8(param_1, (u8 *)¶m_2[3], 1); + 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); } -void sub_808312C(unkStruct_8094924 *param_1, u16 *param_2) +// TODO: param_2 struct +void sub_808312C(DataSerializer *param_1, u16 *param_2) { - sub_8082FA8(param_1, (u8 *)¶m_2[0], 1); - sub_8082FA8(param_1, (u8 *)¶m_2[1], 1); + WriteBytes(param_1, ¶m_2[0], 1); + WriteBytes(param_1, ¶m_2[1], 1); } -void SaveSpeedCounters(unkStruct_8094924 *param_1, u32 *speedCounters, u32 numCounters) +void xxx_WriteBytes(DataSerializer *param_1, void *src, u32 numBytes) { - sub_8082FA8(param_1, (u8 *)speedCounters, numCounters); + WriteBytes(param_1, src, numBytes); } -u16 sub_8083158(unkStruct_8094924 *param_1) +u16 ReadU16(DataSerializer *param_1) { u16 local_8; - sub_8082FE0(param_1,(u8 *)&local_8,2); + ReadBytes(param_1, &local_8, 2); return local_8; } -s16 sub_8083170(unkStruct_8094924 *param_1) +s16 ReadS16(DataSerializer *param_1) { s16 local_8; - sub_8082FE0(param_1,(u8 *)&local_8,2); + ReadBytes(param_1, &local_8, 2); return local_8; } -u8 sub_8083188(unkStruct_8094924 *param_1) +u8 ReadU8(DataSerializer *param_1) { u8 local_8; - sub_8082FE0(param_1,&local_8,1); + ReadBytes(param_1, &local_8, 1); return local_8; } -u32 sub_80831A0(unkStruct_8094924 *param_1) +// ReadS32 or ReadU32 ? +u32 sub_80831A0(DataSerializer *param_1) { u32 local_8; - sub_8082FE0(param_1,(u8 *)&local_8,4); + ReadBytes(param_1, &local_8, 4); return local_8; } -u32 sub_80831B4(unkStruct_8094924 *param_1) +UNUSED u32 sub_80831B4(DataSerializer *param_1) { u32 local_8; - sub_8082FE0(param_1,(u8 *)&local_8,4); + ReadBytes(param_1, &local_8, 4); return local_8; } -u32 sub_80831C8(unkStruct_8094924 *param_1) +// ? +u32 sub_80831C8(DataSerializer *param_1) { u32 local_8; - sub_8082FE0(param_1,(u8 *)&local_8,4); + ReadBytes(param_1, &local_8, 4); return local_8; } -bool8 sub_80831DC(unkStruct_8094924 *param_1) +bool8 ReadBool8(DataSerializer *param_1) { u8 local_8; - sub_8082FE0(param_1,&local_8,1); + ReadBytes(param_1, &local_8, 1); return local_8 != 0; } -void sub_80831F8(unkStruct_8094924 *param_1,Position *param_2) +void ReadPosition8(DataSerializer *param_1, Position *param_2) { param_2->x = 0; param_2->y = 0; - sub_8082FE0(param_1,(u8 *)¶m_2->x,1); - sub_8082FE0(param_1,(u8 *)¶m_2->y,1); + ReadBytes(param_1, ¶m_2->x, 1); + ReadBytes(param_1, ¶m_2->y, 1); } - -void sub_8083220(unkStruct_8094924 *param_1,u32 *param_2) +// 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; - sub_8082FE0(param_1,(u8 *)¶m_2[0],1); - sub_8082FE0(param_1,(u8 *)¶m_2[1],1); - sub_8082FE0(param_1,(u8 *)¶m_2[2],1); - sub_8082FE0(param_1,(u8 *)¶m_2[3],1); + 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); } -void sub_8083260(unkStruct_8094924 *param_1,u16 *param_2) +// TODO: param_2 struct +void sub_8083260(DataSerializer *param_1, u16 *param_2) { param_2[0] = 0; param_2[1] = 0; - sub_8082FE0(param_1,(u8 *)¶m_2[0],1); - sub_8082FE0(param_1,(u8 *)¶m_2[1],1); + ReadBytes(param_1, ¶m_2[0], 1); + ReadBytes(param_1, ¶m_2[1], 1); } -void sub_8083288(unkStruct_8094924 *r0, u16 *r1, u32 size) +void xxx_ReadBytes(DataSerializer *r0, u8 *dst, u32 numBytes) { - sub_8082FE0(r0, (u8 *)r1, size); -} - + ReadBytes(r0, dst, numBytes); +} \ No newline at end of file diff --git a/src/code_8092334.c b/src/code_8092334.c index 5dfe4e39c..ea4aed815 100644 --- a/src/code_8092334.c +++ b/src/code_8092334.c @@ -19,136 +19,109 @@ s16 sub_8094828(u16 moveID, u8 id) } } -void xxx_init_struct_8094924_restore_809485C(struct unkStruct_8094924 *r0, u8 *r1, s32 size) + + +// New file here + + +void InitBitReader(DataSerializer *r0, u8 *buffer, s32 bufLen) { - r0->unk0 = r1; - r0->unk8 = 0; + r0->stream = buffer; + r0->count = 0; r0->unkC = 0; - r0->unk4 = &r1[size]; + r0->end = buffer + bufLen; } -void xxx_init_struct_8094924_save_809486C(struct unkStruct_8094924 *r0, u8 *r1, s32 size) +void InitBitWriter(DataSerializer *r0, u8 *buffer, s32 bufLen) { - r0->unk0 = r1; - r0->unk8 = 0; + r0->stream = buffer; + r0->count = 0; r0->unkC = 0; - r0->unk4 = &r1[size]; - MemoryClear8(r1, size); + r0->end = buffer + bufLen; + MemoryClear8(buffer, bufLen); } -// Related to reading/writing bits -void nullsub_102(struct unkStruct_8094924 *r0) +// Finish reading/writing bits +void nullsub_102(DataSerializer *r0) { } -void SaveIntegerBits(struct unkStruct_8094924 *r0, void *r1, s32 size) +void WriteBits(DataSerializer *r0, void *src, s32 numBits) { - s32 r5; - u8 *r6; + s32 curBit; + u8 *curByte; - r5 = 0; - r6 = r1; + curBit = 0; + curByte = src; + while (numBits != 0) { + if ((*curByte >> curBit) & 1) + *r0->stream |= (1 << r0->count); - if(size != 0) - { - while(size != 0) - { - if(( *(r6) >> r5) & 1) - { - *r0->unk0 |= (1 << r0->unk8); - } - r5++; - if(r5 == 8) - { - r6++; - r5 = 0; - } - r0->unk8++; - if(r0->unk8 == 8) - { - r0->unk0++; - r0->unk8 = 0; - } - r0->unkC++; - size--; + curBit++; + if (curBit == 8) { + curByte++; + curBit = 0; } + + r0->count++; + if (r0->count == 8) { + r0->stream++; + r0->count = 0; + } + + r0->unkC++; + numBits--; } } -// Unused -NAKED -void sub_80948E4(struct unkStruct_8094924 *r0, u8 *r1, s32 size) +UNUSED void sub_80948E4(DataSerializer *seri, void *src, s32 numBytes) { - asm_unified("\tpush {r4-r6,lr}\n" - "\tadds r4, r0, 0\n" - "\tadds r5, r2, 0\n" - "\tadds r6, r1, 0\n" - "\tcmp r5, 0\n" - "\tbeq _0809491C\n" -"_080948F0:\n" - "\tldrb r1, [r6]\n" - "\tldr r0, [r4, 0x8]\n" - "\tlsls r1, r0\n" - "\tldr r3, [r4]\n" - "\tldrb r2, [r3]\n" - "\tadds r0, r1, 0\n" - "\torrs r0, r2\n" - "\tstrb r0, [r3]\n" - "\tldr r2, [r4]\n" - "\tadds r0, r2, 0x1\n" - "\tstr r0, [r4]\n" - "\tasrs r1, 8\n" - "\tldrb r0, [r2, 0x1]\n" - "\torrs r1, r0\n" - "\tstrb r1, [r2, 0x1]\n" - "\tadds r6, 0x1\n" - "\tldr r0, [r4, 0xC]\n" - "\tadds r0, 0x8\n" - "\tstr r0, [r4, 0xC]\n" - "\tsubs r5, 0x1\n" - "\tcmp r5, 0\n" - "\tbne _080948F0\n" -"_0809491C:\n" - "\tpop {r4-r6}\n" - "\tpop {r0}\n" - "\tbx r0"); -} + s32 iVar1; + u8 *curByte; -void RestoreIntegerBits(struct unkStruct_8094924 *r0, void *r1, s32 size) -{ - s32 r6; - u8 *r2; + curByte = src; - r6 = 0; - r2 = r1; - - - if(size != 0) - { - while(size != 0) - { - if(r6 == 0) - *r2 = 0; - if(( *(r0->unk0) >> r0->unk8) & 1) - { - *r2 |= (1 << r6); - } - r6++; - if(r6 == 8) - { - r2++; - r6 = 0; - } - r0->unk8++; - if(r0->unk8 == 8) - { - r0->unk0++; - r0->unk8 = 0; - } - r0->unkC++; - size--; - } + while (numBytes != 0) { + iVar1 = (*curByte << seri->count); + *seri->stream |= iVar1; + seri->stream++; + *seri->stream |= iVar1 >> 8; + curByte++; + seri->unkC += 8; + numBytes--; } } + +void ReadBits(DataSerializer *r0, void *dst, s32 numBits) +{ + s32 curBit; + u8 *curByte; + + curBit = 0; + curByte = dst; + + while (numBits != 0) { + if (curBit == 0) + *curByte = 0; + + if ((*r0->stream >> r0->count) & 1) + *curByte |= (1 << curBit); + + curBit++; + if (curBit == 8) { + curByte++; + curBit = 0; + } + + r0->count++; + if (r0->count == 8) { + r0->stream++; + r0->count = 0; + } + + r0->unkC++; + numBits--; + } +} \ No newline at end of file diff --git a/src/code_809447C.c b/src/code_809447C.c index fcfc4cfae..f9836398c 100644 --- a/src/code_809447C.c +++ b/src/code_809447C.c @@ -35,16 +35,16 @@ extern const u8 *gUnknown_8113870[]; extern struct unkStruct_8113080 gUnknown_8113080[]; -void sub_809447C(struct unkStruct_8094924 *r0, u8 *r1) +void ReadBellyBits(DataSerializer *r0, FixedPoint *dst) { - RestoreIntegerBits(r0, r1, 0x10); - RestoreIntegerBits(r0, r1 + 2, 0x10); + ReadBits(r0, &dst->unk0, 16); + ReadBits(r0, &dst->unk2, 16); } -void sub_809449C(struct unkStruct_8094924 *r0, u8 *r1) +void WriteBellyBits(DataSerializer *r0, FixedPoint *src) { - SaveIntegerBits(r0, r1, 0x10); - SaveIntegerBits(r0, r1 + 2, 0x10); + WriteBits(r0, &src->unk0, 16); + WriteBits(r0, &src->unk2, 16); } static void sub_80944BC(s16 moveID, u8 *buffer) diff --git a/src/code_8094F88.c b/src/code_8094F88.c index 830496891..dd2ea1294 100644 --- a/src/code_8094F88.c +++ b/src/code_8094F88.c @@ -21,10 +21,10 @@ EWRAM_DATA UNUSED static u32 fill0 = {0}; // 203B484 is size 0x5C and I need to EWRAM_DATA u32 gUnknown_20392E8[0x36] = {0}; EWRAM_DATA unkStruct_203B48C gUnknown_20393C0 = {0}; -extern void SaveDungeonLocation(struct unkStruct_8094924*, DungeonLocation*); -extern void RestoreDungeonLocation(struct unkStruct_8094924*, DungeonLocation*); -extern void xxx_save_poke_sub_c_808F41C(struct unkStruct_8094924* a1, struct unkPokeSubStruct_C* unkC); -extern void xxx_restore_poke_sub_c_808F410(struct unkStruct_8094924*, struct unkPokeSubStruct_C*); +extern void WriteDungeonLocationBits(DataSerializer*, DungeonLocation*); +extern void ReadDungeonLocationBits(DataSerializer*, DungeonLocation*); +extern void WritePoke1LevelBits(DataSerializer* a1, struct unkPokeSubStruct_C* unkC); +extern void ReadPoke1LevelBits(DataSerializer*, struct unkPokeSubStruct_C*); void sub_80950BC(void) { @@ -78,11 +78,11 @@ void sub_8095118(void) } } -void nullsub_206(void) +UNUSED static void nullsub_206(void) { } -void nullsub_207(void) +UNUSED static void nullsub_207(void) { } @@ -308,141 +308,164 @@ u32 sub_80954B4(void) return 0; } -u32 sub_80954CC(u8 *a, u32 b) + + + + + +// New file? + + + + + + + + + +u32 sub_80954CC(u8 *buffer, u32 size) { - struct unkStruct_8094924 backup; - PokemonStruct1 *temp; - s32 index; + DataSerializer backup; + PokemonStruct1 *mon; + s32 i; - xxx_init_struct_8094924_restore_809485C(&backup, a, b); - for(index = 0; index < 0x20; index++) - { - sub_8095774(&backup, &gUnknown_203B480[index]); - } - RestoreIntegerBits(&backup, &gUnknown_203B484->unk0, 0x20); - temp = &gUnknown_203B484->unk4; - memset(temp, 0, sizeof(PokemonStruct1)); - RestoreIntegerBits(&backup, &temp->unk0, 2); - RestoreIntegerBits(&backup, &temp->isTeamLeader, 1); - RestoreIntegerBits(&backup, &temp->level, 7); - RestoreDungeonLocation(&backup, &temp->dungeonLocation); - RestoreIntegerBits(&backup, &temp->speciesNum, 9); - xxx_restore_poke_sub_c_808F410(&backup, &temp->unkC[0]); - xxx_restore_poke_sub_c_808F410(&backup, &temp->unkC[1]); - RestoreIntegerBits(&backup, &temp->IQ, 0xA); - RestoreIntegerBits(&backup, &temp->pokeHP, 0xA); - RestoreIntegerBits(&backup, &temp->offense.att[0], 8); - RestoreIntegerBits(&backup, &temp->offense.att[1], 8); - RestoreIntegerBits(&backup, &temp->offense.def[0], 8); - RestoreIntegerBits(&backup, &temp->offense.def[1], 8); - RestoreIntegerBits(&backup, &temp->currExp, 0x18); - RestoreIntegerBits(&backup, &temp->IQSkills, 0x18); - RestoreIntegerBits(&backup, &temp->tacticIndex, 4); - RestoreHeldItem(&backup, &temp->heldItem); - RestorePokemonMoves(&backup, temp->moves); - RestoreIntegerBits(&backup, temp->name, 0x50); + InitBitReader(&backup, buffer, size); - RestoreIntegerBits(&backup, &gUnknown_203B48C->unk0, 0x20); - for(index = 0; index < 0x20; index++) - { - RestoreIntegerBits(&backup, &gUnknown_203B48C->unk4[index], 0x20); + for (i = 0; i < 32; i++) { + sub_8095774(&backup, &gUnknown_203B480[i]); } + + ReadBits(&backup, &gUnknown_203B484->unk0, 32); + + mon = &gUnknown_203B484->unk4; + memset(mon, 0, sizeof(PokemonStruct1)); + + ReadBits(&backup, &mon->unk0, 2); + ReadBits(&backup, &mon->isTeamLeader, 1); + ReadBits(&backup, &mon->level, 7); + ReadDungeonLocationBits(&backup, &mon->dungeonLocation); + ReadBits(&backup, &mon->speciesNum, 9); + ReadPoke1LevelBits(&backup, &mon->unkC[0]); + ReadPoke1LevelBits(&backup, &mon->unkC[1]); + ReadBits(&backup, &mon->IQ, 10); + ReadBits(&backup, &mon->pokeHP, 10); + ReadBits(&backup, &mon->offense.att[0], 8); + ReadBits(&backup, &mon->offense.att[1], 8); + ReadBits(&backup, &mon->offense.def[0], 8); + ReadBits(&backup, &mon->offense.def[1], 8); + ReadBits(&backup, &mon->currExp, 24); + ReadBits(&backup, &mon->IQSkills, 24); + ReadBits(&backup, &mon->tacticIndex, 4); + ReadHeldItemBits(&backup, &mon->heldItem); + ReadPoke1MovesBits(&backup, mon->moves); + ReadBits(&backup, mon->name, 10 * 8); + + ReadBits(&backup, &gUnknown_203B48C->unk0, 32); + for (i = 0; i < 32; i++) { + ReadBits(&backup, &gUnknown_203B48C->unk4[i], 32); + } + nullsub_102(&backup); - return backup.unk8; + return backup.count; } -u32 sub_8095624(u8 *a, u32 b) +u32 sub_8095624(u8 *buffer, u32 b) { - struct unkStruct_8094924 backup; - PokemonStruct1 *temp; - s32 index; + DataSerializer backup; + PokemonStruct1 *mon; + s32 i; - xxx_init_struct_8094924_save_809486C(&backup, a, b); - for(index = 0; index < 0x20; index++) - { - sub_8095824(&backup, &gUnknown_203B480[index]); - } - SaveIntegerBits(&backup, &gUnknown_203B484->unk0, 0x20); - temp = &gUnknown_203B484->unk4; - SaveIntegerBits(&backup, &temp->unk0, 2); - SaveIntegerBits(&backup, &temp->isTeamLeader, 1); - SaveIntegerBits(&backup, &temp->level, 7); - SaveDungeonLocation(&backup, &temp->dungeonLocation); - SaveIntegerBits(&backup, &temp->speciesNum, 9); - xxx_save_poke_sub_c_808F41C(&backup, &temp->unkC[0]); - xxx_save_poke_sub_c_808F41C(&backup, &temp->unkC[1]); - SaveIntegerBits(&backup, &temp->IQ, 0xA); - SaveIntegerBits(&backup, &temp->pokeHP, 0xA); - SaveIntegerBits(&backup, &temp->offense.att[0], 8); - SaveIntegerBits(&backup, &temp->offense.att[1], 8); - SaveIntegerBits(&backup, &temp->offense.def[0], 8); - SaveIntegerBits(&backup, &temp->offense.def[1], 8); - SaveIntegerBits(&backup, &temp->currExp, 0x18); - SaveIntegerBits(&backup, &temp->IQSkills, 0x18); - SaveIntegerBits(&backup, &temp->tacticIndex, 4); - SaveHeldItem(&backup, &temp->heldItem); - SavePokemonMoves(&backup, temp->moves); - SaveIntegerBits(&backup, temp->name, 0x50); + InitBitWriter(&backup, buffer, b); - SaveIntegerBits(&backup, &gUnknown_203B48C->unk0, 0x20); - for(index = 0; index < 0x20; index++) - { - SaveIntegerBits(&backup, &gUnknown_203B48C->unk4[index], 0x20); + for (i = 0; i < 32; i++) { + sub_8095824(&backup, &gUnknown_203B480[i]); } + + WriteBits(&backup, &gUnknown_203B484->unk0, 32); + + mon = &gUnknown_203B484->unk4; + + WriteBits(&backup, &mon->unk0, 2); + WriteBits(&backup, &mon->isTeamLeader, 1); + WriteBits(&backup, &mon->level, 7); + WriteDungeonLocationBits(&backup, &mon->dungeonLocation); + WriteBits(&backup, &mon->speciesNum, 9); + WritePoke1LevelBits(&backup, &mon->unkC[0]); + WritePoke1LevelBits(&backup, &mon->unkC[1]); + WriteBits(&backup, &mon->IQ, 10); + WriteBits(&backup, &mon->pokeHP, 10); + WriteBits(&backup, &mon->offense.att[0], 8); + WriteBits(&backup, &mon->offense.att[1], 8); + WriteBits(&backup, &mon->offense.def[0], 8); + WriteBits(&backup, &mon->offense.def[1], 8); + WriteBits(&backup, &mon->currExp, 24); + WriteBits(&backup, &mon->IQSkills, 24); + WriteBits(&backup, &mon->tacticIndex, 4); + WriteHeldItemBits(&backup, &mon->heldItem); + WritePoke1MovesBits(&backup, mon->moves); + WriteBits(&backup, mon->name, 10 * 8); + + WriteBits(&backup, &gUnknown_203B48C->unk0, 32); + + for (i = 0; i < 32; i++) { + WriteBits(&backup, &gUnknown_203B48C->unk4[i], 32); + } + nullsub_102(&backup); - return backup.unk8; + return backup.count; } -void sub_8095774(struct unkStruct_8094924 * a, unkStruct_203B480 *b) +void sub_8095774(DataSerializer * a, unkStruct_203B480 *b) { u8 temp; - RestoreIntegerBits(a, &b->mailType, 4); - RestoreDungeonLocation(a, &b->unk4.dungeon); - RestoreIntegerBits(a, &b->unk4.seed, 0x18); - RestoreIntegerBits(a, &b->clientSpecies, 0x9); - RestoreIntegerBits(a, &b->unk10.unk10, 0x20); - RestoreIntegerBits(a, &b->playerName, 0x50); - RestoreIntegerBits(a, &b->item.flags, 0x8); - RestoreIntegerBits(a, &b->item.quantity, 0x8); - RestoreIntegerBits(a, &b->item.id, 0x8); - RestoreIntegerBits(a, &b->unk24, 0x20); - RestoreIntegerBits(a, &b->unk28, 0x20); - RestoreIntegerBits(a, &b->rescuesAllowed, 0x8); + ReadBits(a, &b->mailType, 4); + ReadDungeonLocationBits(a, &b->unk4.dungeon); + ReadBits(a, &b->unk4.seed, 24); + ReadBits(a, &b->clientSpecies, 9); + ReadBits(a, &b->unk10.unk10, 32); + ReadBits(a, &b->playerName, 10 * 8); + ReadBits(a, &b->item.flags, 8); + ReadBits(a, &b->item.quantity, 8); + ReadBits(a, &b->item.id, 8); + ReadBits(a, &b->unk24, 32); + ReadBits(a, &b->unk28, 32); + ReadBits(a, &b->rescuesAllowed, 8); - RestoreIntegerBits(a, &temp, 1); + ReadBits(a, &temp, 1); b->unk2D = temp & 1; } -void sub_8095824(struct unkStruct_8094924 * a, unkStruct_203B480 *b) +void sub_8095824(DataSerializer * a, unkStruct_203B480 *b) { u8 neg1; u8 zero; - u8 *puVar2; + u8 *ptr; + neg1 = -1; zero = 0; - SaveIntegerBits(a, &b->mailType, 4); - SaveDungeonLocation(a, &b->unk4.dungeon); - SaveIntegerBits(a, &b->unk4.seed, 0x18); - SaveIntegerBits(a, &b->clientSpecies, 0x9); - SaveIntegerBits(a, &b->unk10.unk10, 0x20); - SaveIntegerBits(a, &b->playerName, 0x50); - SaveIntegerBits(a, &b->item.flags, 0x8); - SaveIntegerBits(a, &b->item.quantity, 0x8); - SaveIntegerBits(a, &b->item.id, 0x8); - SaveIntegerBits(a, &b->unk24, 0x20); - SaveIntegerBits(a, &b->unk28, 0x20); - SaveIntegerBits(a, &b->rescuesAllowed, 0x8); + WriteBits(a, &b->mailType, 4); + WriteDungeonLocationBits(a, &b->unk4.dungeon); + WriteBits(a, &b->unk4.seed, 24); + WriteBits(a, &b->clientSpecies, 9); + WriteBits(a, &b->unk10.unk10, 32); + WriteBits(a, &b->playerName, 10 * 8); + WriteBits(a, &b->item.flags, 8); + WriteBits(a, &b->item.quantity, 8); + WriteBits(a, &b->item.id, 8); + WriteBits(a, &b->unk24, 32); + WriteBits(a, &b->unk28, 32); + WriteBits(a, &b->rescuesAllowed, 8); - if(b->unk2D != 0) - puVar2 = &neg1; + if (b->unk2D != 0) + ptr = &neg1; else - puVar2 = &zero; - SaveIntegerBits(a, puVar2, 1); + ptr = &zero; + WriteBits(a, ptr, 1); } void sub_80958E4(u32 *a, u32 b) { *a = b; -} +} \ No newline at end of file diff --git a/src/code_80958E8.c b/src/code_80958E8.c index a79a62320..84fa8e336 100644 --- a/src/code_80958E8.c +++ b/src/code_80958E8.c @@ -30,8 +30,8 @@ u8 sub_8095E78(void); bool8 sub_80963B4(void); s32 CalculateMailChecksum(WonderMail *mail); -extern void SaveDungeonLocation(unkStruct_8094924*, DungeonLocation*); -extern void RestoreDungeonLocation(unkStruct_8094924*, DungeonLocation*); +extern void WriteDungeonLocationBits(DataSerializer*, DungeonLocation*); +extern void ReadDungeonLocationBits(DataSerializer*, DungeonLocation*); extern void sub_803C4F0(WonderMail *); extern void sub_803C3E0(WonderMail *); extern void sub_803C45C(WonderMail *); @@ -1289,13 +1289,13 @@ s32 CalculateMailChecksum(WonderMail *mail) sum += mail->unk4.dungeon.id; sum += mail->unk4.dungeon.floor; - sum += mail->unk4.seed << 0x8; + sum += mail->unk4.seed << 8; - sum += mail->clientSpecies << 0xC; + sum += mail->clientSpecies << 12; - sum += mail->targetSpecies << 0x10; + sum += mail->targetSpecies << 16; - sum += mail->targetItem << 0x18; + sum += mail->targetItem << 24; sum += mail->rewardType; @@ -1310,10 +1310,10 @@ void sub_8096EEC(WonderMail *mail) { s32 index; - for(index = 15; index > 0; index--) - { + for (index = 16 - 1; index > 0; index--) { gUnknown_203B490->unk230[index] = gUnknown_203B490->unk230[index - 1]; } + gUnknown_203B490->unk230[0].sub = mail->unk4; gUnknown_203B490->unk230[0].checksum = CalculateMailChecksum(mail); } @@ -1326,7 +1326,7 @@ bool8 sub_8096F50(WonderMail *mail) checksum = CalculateMailChecksum(mail); - for (index = 0; index < 0x10; index++) { + for (index = 0; index < 16; index++) { temp = &gUnknown_203B490->unk230[index]; if (temp->sub.dungeon.id == mail->unk4.dungeon.id) if (temp->sub.dungeon.floor == mail->unk4.dungeon.floor) @@ -1341,66 +1341,66 @@ bool8 sub_8096F50(WonderMail *mail) u32 RestoreMailInfo(u8 *r0, u32 size) { s32 index; - unkStruct_8094924 backup; + DataSerializer backup; u32 temp; - xxx_init_struct_8094924_restore_809485C(&backup, r0, size); + InitBitReader(&backup, r0, size); for(index = 0; index < NUM_MAILBOX_SLOTS; index++) { - RestoreWonderMail(&backup, &gUnknown_203B490->mailboxSlots[index]); + ReadWonderMailBits(&backup, &gUnknown_203B490->mailboxSlots[index]); } for(index = 0; index < MAX_ACCEPTED_JOBS; index++) { - RestoreWonderMail(&backup, &gUnknown_203B490->pelipperBoardJobs[index]); + ReadWonderMailBits(&backup, &gUnknown_203B490->pelipperBoardJobs[index]); } for(index = 0; index < MAX_ACCEPTED_JOBS; index++) { - RestoreWonderMail(&backup, &gUnknown_203B490->jobSlots[index]); + ReadWonderMailBits(&backup, &gUnknown_203B490->jobSlots[index]); } - for(index = 0; index < 0x38; index++) + for(index = 0; index < 56; index++) { - RestoreIntegerBits(&backup, &temp, 1); + ReadBits(&backup, &temp, 1); if(temp & 1) gUnknown_203B490->PKMNNewsReceived[index] = TRUE; else gUnknown_203B490->PKMNNewsReceived[index] = FALSE; } - RestoreIntegerBits(&backup, &temp, 1); + ReadBits(&backup, &temp, 1); if(temp & 1) gUnknown_203B490->unk328 = TRUE; else gUnknown_203B490->unk328 = FALSE; - RestoreIntegerBits(&backup, gUnknown_203B490->unk190, 0x140); - RestoreIntegerBits(&backup, gUnknown_203B490->unk1B8, 0x3C0); - for(index = 0; index < 0x10; index++) + ReadBits(&backup, gUnknown_203B490->unk190, 40 * 8); + ReadBits(&backup, gUnknown_203B490->unk1B8, 120 * 8); + for (index = 0; index < 16; index++) { - RestoreIntegerBits(&backup, &gUnknown_203B490->unk230[index].checksum, 0x20); - RestoreIntegerBits(&backup, &gUnknown_203B490->unk230[index].sub.seed, 0x18); - RestoreDungeonLocation(&backup, &gUnknown_203B490->unk230[index].sub.dungeon); + ReadBits(&backup, &gUnknown_203B490->unk230[index].checksum, 32); + ReadBits(&backup, &gUnknown_203B490->unk230[index].sub.seed, 24); + ReadDungeonLocationBits(&backup, &gUnknown_203B490->unk230[index].sub.dungeon); } nullsub_102(&backup); - return backup.unk8; + return backup.count; } u32 SaveMailInfo(u8 *r0, u32 size) { s32 index; - unkStruct_8094924 backup; + DataSerializer backup; u32 temp; - xxx_init_struct_8094924_save_809486C(&backup, r0, size); + InitBitWriter(&backup, r0, size); for(index = 0; index < NUM_MAILBOX_SLOTS; index++) { - SaveWonderMail(&backup, &gUnknown_203B490->mailboxSlots[index]); + WriteWonderMailBits(&backup, &gUnknown_203B490->mailboxSlots[index]); } for(index = 0; index < MAX_ACCEPTED_JOBS; index++) { - SaveWonderMail(&backup, &gUnknown_203B490->pelipperBoardJobs[index]); + WriteWonderMailBits(&backup, &gUnknown_203B490->pelipperBoardJobs[index]); } for(index = 0; index < MAX_ACCEPTED_JOBS; index++) { - SaveWonderMail(&backup, &gUnknown_203B490->jobSlots[index]); + WriteWonderMailBits(&backup, &gUnknown_203B490->jobSlots[index]); } for(index = 0; index < 0x38; index++) { @@ -1408,51 +1408,51 @@ u32 SaveMailInfo(u8 *r0, u32 size) temp = -1; else temp = 0; - SaveIntegerBits(&backup, &temp, 1); + WriteBits(&backup, &temp, 1); } if(gUnknown_203B490->unk328) temp = -1; else temp = 0; - SaveIntegerBits(&backup, &temp, 1); - SaveIntegerBits(&backup, gUnknown_203B490->unk190, 0x140); - SaveIntegerBits(&backup, gUnknown_203B490->unk1B8, 0x3C0); + WriteBits(&backup, &temp, 1); + WriteBits(&backup, gUnknown_203B490->unk190, 0x140); + WriteBits(&backup, gUnknown_203B490->unk1B8, 0x3C0); for(index = 0; index < 0x10; index++) { - SaveIntegerBits(&backup, &gUnknown_203B490->unk230[index].checksum, 0x20); - SaveIntegerBits(&backup, &gUnknown_203B490->unk230[index].sub.seed, 0x18); - SaveDungeonLocation(&backup, &gUnknown_203B490->unk230[index].sub.dungeon); + WriteBits(&backup, &gUnknown_203B490->unk230[index].checksum, 0x20); + WriteBits(&backup, &gUnknown_203B490->unk230[index].sub.seed, 0x18); + WriteDungeonLocationBits(&backup, &gUnknown_203B490->unk230[index].sub.dungeon); } nullsub_102(&backup); - return backup.unk8; + return backup.count; } -void RestoreWonderMail(unkStruct_8094924 *a, WonderMail *b) +void ReadWonderMailBits(DataSerializer *a, WonderMail *b) { - RestoreIntegerBits(a, &b->mailType, 4); - RestoreIntegerBits(a, &b->missionType, 3); - RestoreIntegerBits(a, &b->unk2, 4); - RestoreIntegerBits(a, &b->clientSpecies, 9); - RestoreIntegerBits(a, &b->targetSpecies, 9); - RestoreIntegerBits(a, &b->targetItem, 8); - RestoreIntegerBits(a, &b->rewardType, 4); - RestoreIntegerBits(a, &b->itemReward, 8); - RestoreIntegerBits(a, &b->friendAreaReward, 6); - RestoreIntegerBits(a, &b->unk4.seed, 0x18); - RestoreDungeonLocation(a, &b->unk4.dungeon); + ReadBits(a, &b->mailType, 4); + ReadBits(a, &b->missionType, 3); + ReadBits(a, &b->unk2, 4); + ReadBits(a, &b->clientSpecies, 9); + ReadBits(a, &b->targetSpecies, 9); + ReadBits(a, &b->targetItem, 8); + ReadBits(a, &b->rewardType, 4); + ReadBits(a, &b->itemReward, 8); + ReadBits(a, &b->friendAreaReward, 6); + ReadBits(a, &b->unk4.seed, 24); + ReadDungeonLocationBits(a, &b->unk4.dungeon); } -void SaveWonderMail(unkStruct_8094924 *a, WonderMail *b) +void WriteWonderMailBits(DataSerializer *a, WonderMail *b) { - SaveIntegerBits(a, &b->mailType, 4); - SaveIntegerBits(a, &b->missionType, 3); - SaveIntegerBits(a, &b->unk2, 4); - SaveIntegerBits(a, &b->clientSpecies, 9); - SaveIntegerBits(a, &b->targetSpecies, 9); - SaveIntegerBits(a, &b->targetItem, 8); - SaveIntegerBits(a, &b->rewardType, 4); - SaveIntegerBits(a, &b->itemReward, 8); - SaveIntegerBits(a, &b->friendAreaReward, 6); - SaveIntegerBits(a, &b->unk4.seed, 0x18); - SaveDungeonLocation(a, &b->unk4.dungeon); + WriteBits(a, &b->mailType, 4); + WriteBits(a, &b->missionType, 3); + WriteBits(a, &b->unk2, 4); + WriteBits(a, &b->clientSpecies, 9); + WriteBits(a, &b->targetSpecies, 9); + WriteBits(a, &b->targetItem, 8); + WriteBits(a, &b->rewardType, 4); + WriteBits(a, &b->itemReward, 8); + WriteBits(a, &b->friendAreaReward, 6); + WriteBits(a, &b->unk4.seed, 24); + WriteDungeonLocationBits(a, &b->unk4.dungeon); } diff --git a/src/code_8097670.c b/src/code_8097670.c index 5f028c526..cb31e4c1b 100644 --- a/src/code_8097670.c +++ b/src/code_8097670.c @@ -13,12 +13,12 @@ EWRAM_DATA_2 struct unkStruct_203B494 *gUnknown_203B494 = {0}; // data_810AE24.s extern const u8 *gAdventureLogText[]; -extern void SaveDungeonLocation(struct unkStruct_8094924*, DungeonLocation*); -extern void RestoreDungeonLocation(struct unkStruct_8094924*, DungeonLocation*); -void ReadGameOptions(struct unkStruct_8094924 *param_1); -void ReadPlayTime(struct unkStruct_8094924 *r0); -void WriteGameOptions(struct unkStruct_8094924 *param_1); -void WritePlayTime(struct unkStruct_8094924 *r0); +extern void WriteDungeonLocationBits(DataSerializer*, DungeonLocation*); +extern void ReadDungeonLocationBits(DataSerializer*, DungeonLocation*); +void ReadGameOptionsBits(DataSerializer *param_1); +void ReadPlayTimeBits(DataSerializer *r0); +void WriteGameOptionsBits(DataSerializer *param_1); +void WritePlayTimeBits(DataSerializer *r0); void sub_8097670(void) { @@ -30,10 +30,10 @@ struct unkStruct_203B494 *sub_8097680(void) return &sUnknown_2039778; } -void SetDungeonLocationInfo(DungeonLocation *r0) +void SetDungeonLocationInfo(DungeonLocation *dl) { - gUnknown_203B494->dungeonLocation.id = r0->id; - gUnknown_203B494->dungeonLocation.floor = r0->floor; + gUnknown_203B494->dungeonLocation.id = dl->id; + gUnknown_203B494->dungeonLocation.floor = dl->floor; } DungeonLocation *GetDungeonLocationInfo(void) @@ -41,40 +41,40 @@ DungeonLocation *GetDungeonLocationInfo(void) return &gUnknown_203B494->dungeonLocation; } -void sub_80976A8(void) +void ResetAdventureInfo(void) { s32 index; - gUnknown_203B494->unk0 = 0; - gUnknown_203B494->unk14 = 0; - gUnknown_203B494->unk16 = 0; - gUnknown_203B494->unk18 = 0; - gUnknown_203B494->unkC0 = 0; - gUnknown_203B494->unk8 = 0; - gUnknown_203B494->unkC = 0; + gUnknown_203B494->achievements = 0; + gUnknown_203B494->thievingSuccesses = 0; + gUnknown_203B494->numJoined = 0; + gUnknown_203B494->adventureMovesLearned = 0; + gUnknown_203B494->numFloorsExplored = 0; + gUnknown_203B494->friendRescueSuccesses = 0; + gUnknown_203B494->numEvolved = 0; for (index = 0; index < 14; index++) gUnknown_203B494->unk1C[index] = 0; - for (index = 0; index < 13; index++) - gUnknown_203B494->unk8C[index] = 0; + for (index = 0; index < (s32)ARRAY_COUNT(gUnknown_203B494->learnedMoves); index++) + gUnknown_203B494->learnedMoves[index] = 0; } -void sub_80976F8(u8 r0) +void SetAdventureAchievement(u8 x) { - gUnknown_203B494->unk0 |= (1 << r0); + gUnknown_203B494->achievements |= (1 << x); } -bool8 sub_8097710(u8 r0) +bool8 GetAdventureAchievement(u8 x) { - if (gUnknown_203B494->unk0 & (1 << r0)) + if (gUnknown_203B494->achievements & (1 << x)) return TRUE; return FALSE; } -const u8 *GetAdventureLogLine(u8 index) +const u8 *GetAdventureLogLine(u8 achievement) { - return gAdventureLogText[index]; + return gAdventureLogText[achievement]; } void ResetNumAdventures(void) @@ -99,86 +99,86 @@ UNUSED static void SetNumAdventures(s32 numAdventures) gUnknown_203B494->numAdventures = numAdventures; } -void sub_8097790(void) +void IncrementFriendRescueSuccesses(void) { - gUnknown_203B494->unk8++; - if (gUnknown_203B494->unk8 > 99999) - gUnknown_203B494->unk8 = 99999; + gUnknown_203B494->friendRescueSuccesses++; + if (gUnknown_203B494->friendRescueSuccesses > 99999) + gUnknown_203B494->friendRescueSuccesses = 99999; - sub_80976F8(8); + SetAdventureAchievement(AA_NUM_FRIEND_RESCUE_SUCCESSES); } -s32 sub_80977B8(void) +s32 GetFriendRescueSuccesses(void) { - return gUnknown_203B494->unk8; + return gUnknown_203B494->friendRescueSuccesses; } -UNUSED static void sub_80977C4(s32 r0) +UNUSED static void SetFriendRescueSuccess(s32 numSuccess) { - gUnknown_203B494->unk8 = r0; + gUnknown_203B494->friendRescueSuccesses = numSuccess; } -void sub_80977D0(void) +void IncrementNumEvolved(void) { - gUnknown_203B494->unkC++; - if (gUnknown_203B494->unkC > 99999) - gUnknown_203B494->unkC = 99999; + gUnknown_203B494->numEvolved++; + if (gUnknown_203B494->numEvolved > 99999) + gUnknown_203B494->numEvolved = 99999; - sub_80976F8(9); + SetAdventureAchievement(AA_NUM_POKEMON_EVOLVED); } -s32 sub_80977F8(void) +s32 GetAdventureNumEvolved(void) { - return gUnknown_203B494->unkC; + return gUnknown_203B494->numEvolved; } -UNUSED static void sub_8097804(s32 r0) +UNUSED static void SetAdventureNumEvolved(s32 numEvolved) { - gUnknown_203B494->unkC = r0; + gUnknown_203B494->numEvolved = numEvolved; } -void sub_8097810(void) +void IncrementThievingSuccesses(void) { - if (gUnknown_203B494->unk14 < 9999) - gUnknown_203B494->unk14++; + if (gUnknown_203B494->thievingSuccesses < 9999) + gUnknown_203B494->thievingSuccesses++; - sub_80976F8(11); + SetAdventureAchievement(AA_NUM_THIEVING_SUCCESSES); } -s16 sub_8097838(void) +s16 GetThievingSuccesses(void) { - return gUnknown_203B494->unk14; + return gUnknown_203B494->thievingSuccesses; } -void sub_8097848(void) +void IncrementAdventureNumJoined(void) { - if (gUnknown_203B494->unk16 < 9999) - gUnknown_203B494->unk16++; + if (gUnknown_203B494->numJoined < 9999) + gUnknown_203B494->numJoined++; - sub_80976F8(10); + SetAdventureAchievement(AA_NUM_POKEMON_JOINED); } -s16 sub_8097870(void) +s16 GetAdventureNumJoined(void) { - return gUnknown_203B494->unk16; + return gUnknown_203B494->numJoined; } -s16 sub_8097880(void) +s16 GetAdventureMovesLearned(void) { - return gUnknown_203B494->unk18; + return gUnknown_203B494->adventureMovesLearned; } -void sub_8097890(void) +void IncrementAdventureFloorsExplored(void) { - if (gUnknown_203B494->unkC0 < 99999) - gUnknown_203B494->unkC0++; + if (gUnknown_203B494->numFloorsExplored < 99999) + gUnknown_203B494->numFloorsExplored++; - sub_80976F8(12); + SetAdventureAchievement(AA_NUM_FLOORS_EXPLORED); } -s16 sub_80978B8(void) +s16 GetAdventureFloorsExplored(void) { - return gUnknown_203B494->unkC0; + return gUnknown_203B494->numFloorsExplored; } void sub_80978C8(s16 pokeIndex) @@ -191,9 +191,9 @@ void sub_80978C8(s16 pokeIndex) preload = gUnknown_203B494; iVar2 = baseSpecies; if (baseSpecies < 0) - iVar2 = baseSpecies + 0x1F; // 0x1F == MONSTER_NIDOQUEEN + iVar2 = baseSpecies + 0x1F; // 0b11111 - preload->unk54[iVar2 >> 5] |= 1 << (baseSpecies + (iVar2 >> 5) * -0x20); + preload->unk54[iVar2 >> 5] |= 1 << (baseSpecies + (iVar2 >> 5) * -32); } bool8 sub_8097900(s16 pokeIndex) @@ -206,45 +206,42 @@ bool8 sub_8097900(s16 pokeIndex) preload = gUnknown_203B494; iVar2 = baseSpecies; if (baseSpecies < 0) - iVar2 = baseSpecies + 0x1F; // 0x1F == MONSTER_NIDOQUEEN + iVar2 = baseSpecies + 0x1F; // 0b11111 - if (preload->unk1C[iVar2 >> 5] & (1 << (baseSpecies + (iVar2 >> 5) * -0x20))) + if (preload->unk1C[iVar2 >> 5] & (1 << (baseSpecies + (iVar2 >> 5) * -32))) return TRUE; return FALSE; } -void sub_8097944(void) +void UpdateAdventureAchievements(void) { - bool8 bVar2; - bool8 bVar3; + bool8 allJoined; + bool8 allLeaders; s32 i, j; - s32 counter; + s32 moveCount; Move *move; - bVar2 = 1; - bVar3 = 1; - if (!sub_8097710(0xd) && (HasAllFriendAreas())) { - sub_80976F8(0xd); - } + allJoined = TRUE; + allLeaders = TRUE; - for(i = 0; i < NUM_MONSTERS; i++) - { + if (!GetAdventureAchievement(AA_ALL_FRIEND_AREAS) && HasAllFriendAreas()) + SetAdventureAchievement(AA_ALL_FRIEND_AREAS); + + for (i = 0; i < NUM_MONSTERS; i++) { if (PokemonFlag1(&gRecruitedPokemonRef->pokemon[i])) { s32 species = gRecruitedPokemonRef->pokemon[i].speciesNum; gUnknown_203B494->unk1C[species / 32] |= 1 << species % 32; - for(j = 0; j < MAX_MON_MOVES; j++) - { + for (j = 0; j < MAX_MON_MOVES; j++) { move = &gRecruitedPokemonRef->pokemon[i].moves[j]; - if (MoveFlagExists(move)) { - gUnknown_203B494->unk8C[move->id / 32] |= 1 << move->id % 32; - } + + if (MoveFlagExists(move)) + gUnknown_203B494->learnedMoves[move->id / 32] |= 1 << move->id % 32; } } } - for(i = 0; i < MONSTER_MAX; i++) - { + for (i = 0; i < MONSTER_MAX; i++) { if (i == MONSTER_NONE) continue; if (i == MONSTER_CASTFORM_SNOWY) continue; if (i == MONSTER_CASTFORM_SUNNY) continue; @@ -258,141 +255,141 @@ void sub_8097944(void) if (i == MONSTER_RAYQUAZA_CUTSCENE) continue; if ((gUnknown_203B494->unk54[i / 32] & 1 << i % 32) == 0) - { - bVar3 = 0; - } - if ((gUnknown_203B494->unk1C[i / 32] & 1 << i % 32) != 0) - { - if (i == MONSTER_MOLTRES) { - sub_80976F8(0x10); - } - if (i == MONSTER_ZAPDOS) { - sub_80976F8(0x11); - } - if (i == MONSTER_ARTICUNO) { - sub_80976F8(0x12); - } - if (i == MONSTER_DEOXYS_NORMAL) { - sub_80976F8(0x13); - } - if (i == MONSTER_ENTEI) { - sub_80976F8(0x14); - } - if (i == MONSTER_RAIKOU) { - sub_80976F8(0x15); - } - if (i == MONSTER_SUICUNE) { - sub_80976F8(0x16); - } - if (i == MONSTER_HO_OH) { - sub_80976F8(0x17); - } - if (i == MONSTER_KYOGRE) { - sub_80976F8(0x18); - } - if (i == MONSTER_GROUDON) { - sub_80976F8(0x19); - } - if (i == MONSTER_RAYQUAZA) { - sub_80976F8(0x1a); - } - if (i == MONSTER_LUGIA) { - sub_80976F8(0x1b); - } - if (i == MONSTER_CELEBI) { - sub_80976F8(0x1c); - } - if (i == MONSTER_MEW) { - sub_80976F8(0x1d); - } - if (i == MONSTER_MEWTWO) { - sub_80976F8(0x1e); - } - if (i == MONSTER_JIRACHI) { - sub_80976F8(0x1f); - } + allLeaders = FALSE; + + if ((gUnknown_203B494->unk1C[i / 32] & 1 << i % 32) != 0) { + if (i == MONSTER_MOLTRES) + SetAdventureAchievement(AA_RECRUIT_MOLTRES); + + if (i == MONSTER_ZAPDOS) + SetAdventureAchievement(AA_RECRUIT_ZAPDOS); + + if (i == MONSTER_ARTICUNO) + SetAdventureAchievement(AA_RECRUIT_ARTICUNO); + + if (i == MONSTER_DEOXYS_NORMAL) + SetAdventureAchievement(AA_RECRUIT_DEOXYS); + + if (i == MONSTER_ENTEI) + SetAdventureAchievement(AA_RECRUIT_ENTEI); + + if (i == MONSTER_RAIKOU) + SetAdventureAchievement(AA_RECRUIT_RAIKOU); + + if (i == MONSTER_SUICUNE) + SetAdventureAchievement(AA_RECRUIT_SUICUNE); + + if (i == MONSTER_HO_OH) + SetAdventureAchievement(AA_RECRUIT_HO_OH); + + if (i == MONSTER_KYOGRE) + SetAdventureAchievement(AA_RECRUIT_KYOGRE); + + if (i == MONSTER_GROUDON) + SetAdventureAchievement(AA_RECRUIT_GROUDON); + + if (i == MONSTER_RAYQUAZA) + SetAdventureAchievement(AA_RECRUIT_RAYQUAZA); + + if (i == MONSTER_LUGIA) + SetAdventureAchievement(AA_RECRUIT_LUGIA); + + if (i == MONSTER_CELEBI) + SetAdventureAchievement(AA_RECRUIT_CELEBI); + + if (i == MONSTER_MEW) + SetAdventureAchievement(AA_RECRUIT_MEW); + + if (i == MONSTER_MEWTWO) + SetAdventureAchievement(AA_RECRUIT_MEWTWO); + + if (i == MONSTER_JIRACHI) + SetAdventureAchievement(AA_RECRUIT_JIRACHI); } else - { - bVar2 = 0; - } + allJoined = FALSE; } - if (bVar2) { - sub_80976F8(0xf); + if (allJoined) + SetAdventureAchievement(AA_ALL_POKEMON_JOINED); + + if (allLeaders) + SetAdventureAchievement(AA_ALL_POKEMON_LEADERS); + + moveCount = 0; + for (i = 0; i < NUM_MOVE_IDS; i++) { + if (i == MOVE_NOTHING || i == MOVE_REGULAR_ATTACK || i == MOVE_IS_WATCHING || i == MOVE_BIDE_2) + continue; + + if (gUnknown_203B494->learnedMoves[i / 32] & 1 << i % 32) + moveCount++; } - if (bVar3) { - sub_80976F8(0xe); - } - counter = 0; - for(i = 0; i < NUM_MONSTERS; i++) - { - if (i == MONSTER_NONE || i == MONSTER_FLYGON || i == MONSTER_CACNEA || i == MONSTER_CACTURNE) continue; - if (gUnknown_203B494->unk8C[i / 32] & 1 << i % 32) { - counter++; - } - } - if (counter != 0) { - gUnknown_203B494->unk18 = counter; - sub_80976F8(7); + + if (moveCount != 0) { + gUnknown_203B494->adventureMovesLearned = moveCount; + SetAdventureAchievement(AA_NUM_MOVES_LEARNED); } } -void sub_8097C18(struct unkStruct_8094924 *r0) +static void WriteAdventureBits(DataSerializer *r0) { - sub_8097944(); - SaveIntegerBits(r0, &gUnknown_203B494->numAdventures, 0x11); - SaveIntegerBits(r0, &gUnknown_203B494->unk8, 0x11); - SaveIntegerBits(r0, &gUnknown_203B494->unkC, 0x11); - SaveIntegerBits(r0, &gUnknown_203B494->unk0, 0x20); - SaveIntegerBits(r0, &gUnknown_203B494->unk14, 0xE); - SaveIntegerBits(r0, &gUnknown_203B494->unk16, 0xE); - SaveIntegerBits(r0, &gUnknown_203B494->unk18, 0x9); - SaveIntegerBits(r0, &gUnknown_203B494->unkC0, 0x11); - SaveIntegerBits(r0, gUnknown_203B494->unk1C, 0xE0 << 1); - SaveIntegerBits(r0, gUnknown_203B494->unk54, 0xE0 << 1); - SaveIntegerBits(r0, gUnknown_203B494->unk8C, 0xD0 << 1); - SaveDungeonLocation(r0, &gUnknown_203B494->dungeonLocation); + UpdateAdventureAchievements(); + WriteBits(r0, &gUnknown_203B494->numAdventures, 17); + WriteBits(r0, &gUnknown_203B494->friendRescueSuccesses, 17); + WriteBits(r0, &gUnknown_203B494->numEvolved, 17); + WriteBits(r0, &gUnknown_203B494->achievements, 32); + WriteBits(r0, &gUnknown_203B494->thievingSuccesses, 14); + WriteBits(r0, &gUnknown_203B494->numJoined, 14); + WriteBits(r0, &gUnknown_203B494->adventureMovesLearned, 9); + WriteBits(r0, &gUnknown_203B494->numFloorsExplored, 17); + WriteBits(r0, gUnknown_203B494->unk1C, 14 * 32); + WriteBits(r0, gUnknown_203B494->unk54, 14 * 32); + WriteBits(r0, gUnknown_203B494->learnedMoves, (s32)ARRAY_COUNT(gUnknown_203B494->learnedMoves) * 32); + WriteDungeonLocationBits(r0, &gUnknown_203B494->dungeonLocation); } -void sub_8097CC0(struct unkStruct_8094924 *r0) +static void ReadAdventureBits(DataSerializer *r0) { - RestoreIntegerBits(r0, &gUnknown_203B494->numAdventures, 0x11); - RestoreIntegerBits(r0, &gUnknown_203B494->unk8, 0x11); - RestoreIntegerBits(r0, &gUnknown_203B494->unkC, 0x11); - RestoreIntegerBits(r0, &gUnknown_203B494->unk0, 0x20); - RestoreIntegerBits(r0, &gUnknown_203B494->unk14, 0xE); - RestoreIntegerBits(r0, &gUnknown_203B494->unk16, 0xE); - RestoreIntegerBits(r0, &gUnknown_203B494->unk18, 0x9); - RestoreIntegerBits(r0, &gUnknown_203B494->unkC0, 0x11); - RestoreIntegerBits(r0, gUnknown_203B494->unk1C, 0xE0 << 1); - RestoreIntegerBits(r0, gUnknown_203B494->unk54, 0xE0 << 1); - RestoreIntegerBits(r0, gUnknown_203B494->unk8C, 0xD0 << 1); - RestoreDungeonLocation(r0, &gUnknown_203B494->dungeonLocation); + ReadBits(r0, &gUnknown_203B494->numAdventures, 17); + ReadBits(r0, &gUnknown_203B494->friendRescueSuccesses, 17); + ReadBits(r0, &gUnknown_203B494->numEvolved, 17); + ReadBits(r0, &gUnknown_203B494->achievements, 32); + ReadBits(r0, &gUnknown_203B494->thievingSuccesses, 14); + ReadBits(r0, &gUnknown_203B494->numJoined, 14); + ReadBits(r0, &gUnknown_203B494->adventureMovesLearned, 9); + ReadBits(r0, &gUnknown_203B494->numFloorsExplored, 17); + ReadBits(r0, gUnknown_203B494->unk1C, 14 * 32); + ReadBits(r0, gUnknown_203B494->unk54, 14 * 32); + ReadBits(r0, gUnknown_203B494->learnedMoves, (s32)ARRAY_COUNT(gUnknown_203B494->learnedMoves) * 32); + ReadDungeonLocationBits(r0, &gUnknown_203B494->dungeonLocation); } -// Save something... -u32 sub_8097D60(u8 *r0, u32 size) +u32 SaveAdventureData(u8 *buffer, u32 bufLen) { - struct unkStruct_8094924 backup; - xxx_init_struct_8094924_save_809486C(&backup, r0, size); - WriteGameOptions(&backup); - WritePlayTime(&backup); - sub_8097C18(&backup); - WriteExclusivePokemon(&backup); - nullsub_102(&backup); - return backup.unk8; + DataSerializer seri; + + InitBitWriter(&seri, buffer, bufLen); + + WriteGameOptionsBits(&seri); + WritePlayTimeBits(&seri); + WriteAdventureBits(&seri); + WriteExclusivePokemon(&seri); + + nullsub_102(&seri); + return seri.count; } -// Read something... -u32 sub_8097D98(u8 *r0, u32 size) +u32 RestoreAdventureData(u8 *buffer, u32 bufLen) { - struct unkStruct_8094924 backup; - xxx_init_struct_8094924_restore_809485C(&backup, r0, size); - ReadGameOptions(&backup); - ReadPlayTime(&backup); - sub_8097CC0(&backup); - ReadExclusivePokemon(&backup); - nullsub_102(&backup); - return backup.unk8; -} + DataSerializer seri; + + InitBitReader(&seri, buffer, bufLen); + + ReadGameOptionsBits(&seri); + ReadPlayTimeBits(&seri); + ReadAdventureBits(&seri); + ReadExclusivePokemon(&seri); + + nullsub_102(&seri); + return seri.count; +} \ No newline at end of file diff --git a/src/debug_menu1.c b/src/debug_menu1.c index 04de91a30..519cf62af 100644 --- a/src/debug_menu1.c +++ b/src/debug_menu1.c @@ -66,7 +66,7 @@ void DeleteDebugMenu(void) u32 UpdateDebugMenu(void) { u32 nextMenu; - s32 counter; + s32 i; s32 debugMenuAction; nextMenu = MENU_NO_SCREEN_CHANGE; @@ -99,8 +99,8 @@ u32 UpdateDebugMenu(void) nextMenu = MENU_MAIN_SCREEN; break; case MENU_DEBUG_MENU_H_OPEN: - for (counter = 0; counter < 0x20; counter++) - sub_80976F8(counter); + for (i = 0; i < AA_MAX; i++) + SetAdventureAchievement(i); nextMenu = MENU_MAIN_SCREEN; break; diff --git a/src/dungeon.c b/src/dungeon.c index 2a9b81f85..cb29437dd 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -145,18 +145,18 @@ u8 sub_80902C8(u8 dungeon) return gUnknown_81077E8[dungeon]; } -void SaveDungeonLocation(struct unkStruct_8094924* r0, DungeonLocation* r1) +void WriteDungeonLocationBits(DataSerializer* r0, DungeonLocation* src) { - SaveIntegerBits(r0, &r1->id, 0x7); - SaveIntegerBits(r0, &r1->floor, 0x7); + WriteBits(r0, &src->id, 7); + WriteBits(r0, &src->floor, 7); } -void RestoreDungeonLocation(struct unkStruct_8094924* r0, DungeonLocation* r1) +void ReadDungeonLocationBits(DataSerializer* r0, DungeonLocation* dst) { - r1->id = 0; - r1->floor = 0; - RestoreIntegerBits(r0, &r1->id, 0x7); - RestoreIntegerBits(r0, &r1->floor, 0x7); + dst->id = 0; + dst->floor = 0; + ReadBits(r0, &dst->id, 7); + ReadBits(r0, &dst->floor, 7); } bool8 DoEnemiesEvolveWhenKOed(u8 dungeon) diff --git a/src/event_flag.c b/src/event_flag.c index e3c81f650..4b7680007 100644 --- a/src/event_flag.c +++ b/src/event_flag.c @@ -149,29 +149,29 @@ void ScenarioCalc(s16 param_1,s32 param_2,s32 param_3) switch(param_1_s32) { case 3: - if (((u32)(param_2 - 1) < 0x1b)) { + if (param_2 > 0 && param_2 < 28) { if (ScriptVarScenarioAfter(SCENARIO_MAIN,8,-1)) { - sub_80976F8(0); + SetAdventureAchievement(AA_HILL_OF_ANCIENTS); } - if (ScriptVarScenarioAfter(SCENARIO_MAIN,0xb,3)) { - sub_80976F8(1); + if (ScriptVarScenarioAfter(SCENARIO_MAIN,11,3)) { + SetAdventureAchievement(AA_FUGITIVE); } - if (ScriptVarScenarioAfter(SCENARIO_MAIN,0x11,0)) { - sub_80976F8(2); + if (ScriptVarScenarioAfter(SCENARIO_MAIN,17,0)) { + SetAdventureAchievement(AA_PREVENT_METEOR); } } break; case 4: - if (ScriptVarScenarioBefore(SCENARIO_SUB1,0x1f,0) == 0) { - sub_80976F8(4); + if (ScriptVarScenarioBefore(SCENARIO_SUB1,31,0) == 0) { + SetAdventureAchievement(AA_TEAM_BASE_DONE); } - if (ScriptVarScenarioBefore(SCENARIO_SUB1,0x20,0) == 0) { - sub_80976F8(5); + if (ScriptVarScenarioBefore(SCENARIO_SUB1,32,0) == 0) { + SetAdventureAchievement(AA_SMEARGLE); } break; case 0xC: - if(ScriptVarScenarioBefore(SCENARIO_SUB9,0x37,2) == 0) { - sub_80976F8(3); + if(ScriptVarScenarioBefore(SCENARIO_SUB9,55,2) == 0) { + SetAdventureAchievement(AA_BROKE_CURSE); } break; } diff --git a/src/exclusive_pokemon.c b/src/exclusive_pokemon.c index a342b6936..536f07b50 100644 --- a/src/exclusive_pokemon.c +++ b/src/exclusive_pokemon.c @@ -197,7 +197,7 @@ void UnlockExclusivePokemon(s16 pokeID) } } -void WriteExclusivePokemon(struct unkStruct_8094924 *r0) +void WriteExclusivePokemon(DataSerializer *r0) { s32 index; u8 *puVar2; @@ -212,21 +212,21 @@ void WriteExclusivePokemon(struct unkStruct_8094924 *r0) zero = 0; - SaveIntegerBits(r0, gUnknown_203B498, 1); + WriteBits(r0, gUnknown_203B498, 1); for(index = 0; index < MONSTER_MAX; index++) { stack_0 = sub_8098134(index); - SaveIntegerBits(r0, &stack_0, 1); + WriteBits(r0, &stack_0, 1); } for(index = 0; index < 64; index++) { stack_1 = sub_8098100(index); - SaveIntegerBits(r0, &stack_1, 1); + WriteBits(r0, &stack_1, 1); } for(index = 0; index < 31; index++) { stack_2 = GetTutorialFlag(index); - SaveIntegerBits(r0, &stack_2, 1); + WriteBits(r0, &stack_2, 1); } for(index = 0; index < NUM_EXCLUSIVE_POKEMON; index++) { @@ -234,11 +234,11 @@ void WriteExclusivePokemon(struct unkStruct_8094924 *r0) puVar2 = &neg_1; else puVar2 = &zero; - SaveIntegerBits(r0, puVar2, 1); + WriteBits(r0, puVar2, 1); } } -void ReadExclusivePokemon(struct unkStruct_8094924 *r0) +void ReadExclusivePokemon(DataSerializer *r0) { s32 index; u8 stack_0; @@ -247,28 +247,28 @@ void ReadExclusivePokemon(struct unkStruct_8094924 *r0) u8 stack_3; memset(gUnknown_203B498, 0, sizeof(struct ExclusivePokemonData)); - RestoreIntegerBits(r0, gUnknown_203B498, 1); + ReadBits(r0, gUnknown_203B498, 1); for(index = 0; index < MONSTER_MAX; index++) { - RestoreIntegerBits(r0, &stack_0, 1); + ReadBits(r0, &stack_0, 1); if(stack_0) sub_80980B4(index); } for(index = 0; index < 64; index++) { - RestoreIntegerBits(r0, &stack_1, 1); + ReadBits(r0, &stack_1, 1); if(stack_1) sub_8097FA8(index); } for(index = 0; index < 31; index++) { - RestoreIntegerBits(r0, &stack_2, 1); + ReadBits(r0, &stack_2, 1); if(stack_2) SetTutorialFlag(index); } for(index = 0; index < NUM_EXCLUSIVE_POKEMON; index++) { - RestoreIntegerBits(r0, &stack_3, 1); + ReadBits(r0, &stack_3, 1); do; while(0); // do/while needed for matching - jiang diff --git a/src/friend_area.c b/src/friend_area.c index 7f760f6fd..776e6dc5e 100644 --- a/src/friend_area.c +++ b/src/friend_area.c @@ -227,34 +227,34 @@ void sub_80926F8(u8 a0, unkStruct_8092638 *a1, u8 a2) u32 SaveFriendAreas(u8 *r0, u32 size) { - struct unkStruct_8094924 unk; + DataSerializer unk; u32 temp; s32 i; - xxx_init_struct_8094924_save_809486C(&unk, r0, size); + InitBitWriter(&unk, r0, size); for (i = 0; i < NUM_FRIEND_AREAS; i++) { if (gFriendAreas[i] != 0) temp = -1; else temp = 0; - SaveIntegerBits(&unk, (u8*)&temp, 1); + WriteBits(&unk, (u8*)&temp, 1); } nullsub_102(&unk); - return unk.unk8; + return unk.count; } u32 ReadSavedFriendAreas(u8 *r0, s32 size) { - struct unkStruct_8094924 unk; + DataSerializer unk; u32 temp; s32 i; - xxx_init_struct_8094924_restore_809485C(&unk, r0, size); + InitBitReader(&unk, r0, size); for (i = 0; i < NUM_FRIEND_AREAS; i++) { - RestoreIntegerBits(&unk, &temp, 1); + ReadBits(&unk, &temp, 1); // It's setting whether we have the friend area or not if (temp & 1) gFriendAreas[i] = TRUE; @@ -263,5 +263,5 @@ u32 ReadSavedFriendAreas(u8 *r0, s32 size) } nullsub_102(&unk); - return unk.unk8; + return unk.count; } diff --git a/src/game_options.c b/src/game_options.c index e39fd6cf2..cefcd194d 100644 --- a/src/game_options.c +++ b/src/game_options.c @@ -67,7 +67,7 @@ bool8 GameOptionsNotChange(GameOptions *r0) return TRUE; } -void WriteGameOptions(struct unkStruct_8094924 *param_1) +void WriteGameOptionsBits(DataSerializer *param_1) { u8 zero; u8 neg_1; @@ -77,7 +77,7 @@ void WriteGameOptions(struct unkStruct_8094924 *param_1) neg_1 = -1; zero = 0; - SaveIntegerBits(param_1, &gGameOptionsRef->windowColor, 2); + WriteBits(param_1, &gGameOptionsRef->windowColor, 2); if(gGameOptionsRef->unk9 != 0) { @@ -87,7 +87,7 @@ void WriteGameOptions(struct unkStruct_8094924 *param_1) { puVar2 = &zero; } - SaveIntegerBits(param_1, puVar2, 1); + WriteBits(param_1, puVar2, 1); if(gGameOptionsRef->unkA != 0) { @@ -97,7 +97,7 @@ void WriteGameOptions(struct unkStruct_8094924 *param_1) { puVar2 = &zero; } - SaveIntegerBits(param_1, puVar2, 1); + WriteBits(param_1, puVar2, 1); if(gGameOptionsRef->playerGender != MALE) { @@ -107,7 +107,7 @@ void WriteGameOptions(struct unkStruct_8094924 *param_1) { puVar2 = &zero; } - SaveIntegerBits(param_1, puVar2, 1); + WriteBits(param_1, puVar2, 1); if(gGameOptionsRef->dungeonSpeed != DUNGEON_SPEED_SLOW) { @@ -117,7 +117,7 @@ void WriteGameOptions(struct unkStruct_8094924 *param_1) { puVar2 = &zero; } - SaveIntegerBits(param_1, puVar2, 1); + WriteBits(param_1, puVar2, 1); if(gGameOptionsRef->FarOffPals != FAROFFPALS_SELF) { @@ -127,7 +127,7 @@ void WriteGameOptions(struct unkStruct_8094924 *param_1) { puVar2 = &zero; } - SaveIntegerBits(param_1, puVar2, 1); + WriteBits(param_1, puVar2, 1); if(gGameOptionsRef->damageTurn) { @@ -137,7 +137,7 @@ void WriteGameOptions(struct unkStruct_8094924 *param_1) { puVar2 = &zero; } - SaveIntegerBits(param_1, puVar2, 1); + WriteBits(param_1, puVar2, 1); if(gGameOptionsRef->gridEnable) { @@ -147,43 +147,43 @@ void WriteGameOptions(struct unkStruct_8094924 *param_1) { puVar2 = &zero; } - SaveIntegerBits(param_1, puVar2, 1); + WriteBits(param_1, puVar2, 1); - SaveIntegerBits(param_1, &gGameOptionsRef->mapOption, NUM_GBA_MAP_OPTIONS); - SaveIntegerBits(param_1, &gGameOptionsRef->unkC, 2); + WriteBits(param_1, &gGameOptionsRef->mapOption, NUM_GBA_MAP_OPTIONS); + WriteBits(param_1, &gGameOptionsRef->unkC, 2); } -void ReadGameOptions(struct unkStruct_8094924 *param_1) +void ReadGameOptionsBits(DataSerializer *param_1) { u8 byteArray[4]; - RestoreIntegerBits(param_1, byteArray, 2); + ReadBits(param_1, byteArray, 2); gGameOptionsRef->windowColor = byteArray[0] & NUM_WINDOW_COLORS; - RestoreIntegerBits(param_1, byteArray, 1); + ReadBits(param_1, byteArray, 1); gGameOptionsRef->unk9 = byteArray[0] & 1; - RestoreIntegerBits(param_1, byteArray, 1); + ReadBits(param_1, byteArray, 1); gGameOptionsRef->unkA = byteArray[0] & 1; - RestoreIntegerBits(param_1, byteArray, 1); + ReadBits(param_1, byteArray, 1); gGameOptionsRef->playerGender = byteArray[0] & 1; - RestoreIntegerBits(param_1, byteArray, 1); + ReadBits(param_1, byteArray, 1); gGameOptionsRef->dungeonSpeed = byteArray[0] & 1; - RestoreIntegerBits(param_1, byteArray, 1); + ReadBits(param_1, byteArray, 1); gGameOptionsRef->FarOffPals = byteArray[0] & 1; - RestoreIntegerBits(param_1, byteArray, 1); + ReadBits(param_1, byteArray, 1); gGameOptionsRef->damageTurn = byteArray[0] & 1; - RestoreIntegerBits(param_1, byteArray, 1); + ReadBits(param_1, byteArray, 1); gGameOptionsRef->gridEnable = byteArray[0] & 1; - RestoreIntegerBits(param_1, byteArray, 3); + ReadBits(param_1, byteArray, 3); gGameOptionsRef->mapOption = byteArray[0] & NUM_DS_MAP_OPTIONS; - RestoreIntegerBits(param_1, byteArray, 2); + ReadBits(param_1, byteArray, 2); gGameOptionsRef->unkC = byteArray[0] & 3; SetWindowBGColor(); diff --git a/src/ground_script_1.c b/src/ground_script_1.c index 502fad518..5c8578624 100644 --- a/src/ground_script_1.c +++ b/src/ground_script_1.c @@ -1479,7 +1479,7 @@ s32 ExecuteScriptCommand(Action *action) { break; } case 0xb2: { - sub_80976F8(curCmd.argShort); + SetAdventureAchievement(curCmd.argShort); break; } case 0xb3: { diff --git a/src/items.c b/src/items.c index 81b32bdaa..06a83266a 100644 --- a/src/items.c +++ b/src/items.c @@ -1108,76 +1108,78 @@ bool8 AddKecleonWareItem(u8 itemIndex) { s32 SaveTeamInventory(u8* unk0, u32 size) { - struct unkStruct_8094924 unk; + DataSerializer unk; s32 i; - xxx_init_struct_8094924_save_809486C(&unk, unk0, size); + InitBitWriter(&unk, unk0, size); for (i = 0; i < INVENTORY_SIZE; i++) { - SaveItemSlot(&unk, &gTeamInventoryRef->teamItems[i]); + WriteItemSlotBits(&unk, &gTeamInventoryRef->teamItems[i]); } for (i = 0; i < STORAGE_SIZE; i++) { - SaveIntegerBits(&unk, &gTeamInventoryRef->teamStorage[i], 10); + WriteBits(&unk, &gTeamInventoryRef->teamStorage[i], 10); } for (i = 0; i < MAX_KECLEON_ITEM_SHOP_ITEMS; i++) { - SaveHeldItem(&unk, &gTeamInventoryRef->kecleonShopItems[i]); + WriteHeldItemBits(&unk, &gTeamInventoryRef->kecleonShopItems[i]); } for (i = 0; i < MAX_KECLEON_WARE_SHOP_ITEMS; i++) { - SaveHeldItem(&unk, &gTeamInventoryRef->kecleonWareItems[i]); + WriteHeldItemBits(&unk, &gTeamInventoryRef->kecleonWareItems[i]); } - SaveIntegerBits(&unk, &gTeamInventoryRef->teamMoney, 24); - SaveIntegerBits(&unk, &gTeamInventoryRef->teamSavings, 24); + WriteBits(&unk, &gTeamInventoryRef->teamMoney, 24); + WriteBits(&unk, &gTeamInventoryRef->teamSavings, 24); + nullsub_102(&unk); - return unk.unk8; + return unk.count; } s32 RestoreTeamInventory(u8 *unk0, u32 size) { - struct unkStruct_8094924 unk; - s32 i; + DataSerializer unk; + s32 i; - xxx_init_struct_8094924_restore_809485C(&unk, unk0, size); - for (i = 0; i < INVENTORY_SIZE; i++) { - RestoreItemSlot(&unk, &gTeamInventoryRef->teamItems[i]); - } - for (i = 0; i < STORAGE_SIZE; i++) { - RestoreIntegerBits(&unk, &gTeamInventoryRef->teamStorage[i], 10); - } - for (i = 0; i < MAX_KECLEON_ITEM_SHOP_ITEMS; i++) { - RestoreHeldItem(&unk, &gTeamInventoryRef->kecleonShopItems[i]); - } - for (i = 0; i < MAX_KECLEON_WARE_SHOP_ITEMS; i++) { - RestoreHeldItem(&unk, &gTeamInventoryRef->kecleonWareItems[i]); - } - RestoreIntegerBits(&unk, &gTeamInventoryRef->teamMoney, 24); - RestoreIntegerBits(&unk, &gTeamInventoryRef->teamSavings, 24); - nullsub_102(&unk); - return unk.unk8; + InitBitReader(&unk, unk0, size); + for (i = 0; i < INVENTORY_SIZE; i++) { + ReadItemSlotBits(&unk, &gTeamInventoryRef->teamItems[i]); + } + for (i = 0; i < STORAGE_SIZE; i++) { + ReadBits(&unk, &gTeamInventoryRef->teamStorage[i], 10); + } + for (i = 0; i < MAX_KECLEON_ITEM_SHOP_ITEMS; i++) { + ReadHeldItemBits(&unk, &gTeamInventoryRef->kecleonShopItems[i]); + } + for (i = 0; i < MAX_KECLEON_WARE_SHOP_ITEMS; i++) { + ReadHeldItemBits(&unk, &gTeamInventoryRef->kecleonWareItems[i]); + } + ReadBits(&unk, &gTeamInventoryRef->teamMoney, 24); + ReadBits(&unk, &gTeamInventoryRef->teamSavings, 24); + + nullsub_102(&unk); + return unk.count; } -void RestoreHeldItem(struct unkStruct_8094924 *a1, BulkItem *item) +void ReadHeldItemBits(DataSerializer *a1, BulkItem *item) { - RestoreIntegerBits(a1, &item->id, 8); - RestoreIntegerBits(a1, &item->quantity, 7); + ReadBits(a1, &item->id, 8); + ReadBits(a1, &item->quantity, 7); } -void SaveHeldItem(struct unkStruct_8094924 *a1, BulkItem *item) +void WriteHeldItemBits(DataSerializer *a1, BulkItem *item) { - SaveIntegerBits(a1, &item->id, 8); - SaveIntegerBits(a1, &item->quantity, 7); + WriteBits(a1, &item->id, 8); + WriteBits(a1, &item->quantity, 7); } -void RestoreItemSlot(struct unkStruct_8094924 *a1, Item *slot) +void ReadItemSlotBits(DataSerializer *a1, Item *slot) { - RestoreIntegerBits(a1, &slot->flags, 8); - RestoreIntegerBits(a1, &slot->quantity, 7); - RestoreIntegerBits(a1, &slot->id, 8); + ReadBits(a1, &slot->flags, 8); + ReadBits(a1, &slot->quantity, 7); + ReadBits(a1, &slot->id, 8); } -void SaveItemSlot(struct unkStruct_8094924 *a1, Item *slot) +void WriteItemSlotBits(DataSerializer *a1, Item *slot) { - SaveIntegerBits(a1, &slot->flags, 8); - SaveIntegerBits(a1, &slot->quantity, 7); - SaveIntegerBits(a1, &slot->id, 8); + WriteBits(a1, &slot->flags, 8); + WriteBits(a1, &slot->quantity, 7); + WriteBits(a1, &slot->id, 8); } const char *sub_8091E50(u8 index) diff --git a/src/luminous_cave.c b/src/luminous_cave.c index 0861d3b3a..ba2b86f06 100644 --- a/src/luminous_cave.c +++ b/src/luminous_cave.c @@ -313,7 +313,7 @@ static void UpdateLuminousCaveDialogue(void) monName = GetMonSpecies(sLuminousCaveWork->evolveStatus.targetEvolveSpecies); strcpy(gFormatBuffer_Monsters[1],monName); sLuminousCaveWork->evolutionComplete = TRUE; - sub_80977D0(); + IncrementNumEvolved(); sub_808F734(sLuminousCaveWork->pokeStruct,sLuminousCaveWork->evolveStatus.targetEvolveSpecies); nullsub_104(); sLuminousCaveWork->pokeStruct = GetPlayerPokemonStruct(); diff --git a/src/moves.c b/src/moves.c index ee1cd2ecb..51575a94a 100644 --- a/src/moves.c +++ b/src/moves.c @@ -1515,74 +1515,74 @@ void sub_8094060(Move *srcMoves, Move *destMoves) destMoves[j++].moveFlags = 0; } -static void SavePokemonMove(struct unkStruct_8094924 *r0, Move *move) +static void WritePoke1MoveBits(DataSerializer *r0, Move *move) { - SaveIntegerBits(r0, &move->moveFlags, 4); - SaveIntegerBits(r0, &move->id, 9); - SaveIntegerBits(r0, &move->PP, 7); + WriteBits(r0, &move->moveFlags, 4); + WriteBits(r0, &move->id, 9); + WriteBits(r0, &move->PP, 7); } -static void RestorePokemonMove(struct unkStruct_8094924 *r0, Move *move) +static void ReadPoke1MoveBits(DataSerializer *r0, Move *move) { - RestoreIntegerBits(r0, &move->moveFlags, 4); - RestoreIntegerBits(r0, &move->id, 9); - RestoreIntegerBits(r0, &move->PP, 7); + ReadBits(r0, &move->moveFlags, 4); + ReadBits(r0, &move->id, 9); + ReadBits(r0, &move->PP, 7); } -void SavePokemonMoves(struct unkStruct_8094924 *r0, Move *moveSet) +void WritePoke1MovesBits(DataSerializer *r0, Move *moveSet) { s32 i; for (i = 0; i < MAX_MON_MOVES; i++) - SavePokemonMove(r0, &moveSet[i]); + WritePoke1MoveBits(r0, &moveSet[i]); } -void RestorePokemonMoves(struct unkStruct_8094924 *r0, Move *moveSet) +void ReadPoke1MovesBits(DataSerializer *r0, Move *moveSet) { s32 i; for (i = 0; i < MAX_MON_MOVES; i++) - RestorePokemonMove(r0, &moveSet[i]); + ReadPoke1MoveBits(r0, &moveSet[i]); } -static void sub_8094148(struct unkStruct_8094924 *r0, Move *move) +static void WritePoke2MoveBits(DataSerializer *r0, Move *move) { - SaveIntegerBits(r0, &move->moveFlags, 4); - SaveIntegerBits(r0, &move->moveFlags2, 1); - SaveIntegerBits(r0, &move->id, 9); - SaveIntegerBits(r0, &move->PP, 7); - SaveIntegerBits(r0, &move->ginseng, 7); + WriteBits(r0, &move->moveFlags, 4); + WriteBits(r0, &move->moveFlags2, 1); + WriteBits(r0, &move->id, 9); + WriteBits(r0, &move->PP, 7); + WriteBits(r0, &move->ginseng, 7); } -void sub_8094184(struct unkStruct_8094924 *r0, struct Moves *r1) +void WritePoke2MovesBits(DataSerializer *r0, struct Moves *r1) { s32 i; for (i = 0; i < MAX_MON_MOVES; i++) - sub_8094148(r0, &r1->moves[i]); + WritePoke2MoveBits(r0, &r1->moves[i]); - SaveIntegerBits(r0, &r1->struggleMoveFlags, 8); + WriteBits(r0, &r1->struggleMoveFlags, 8); } -static void sub_80941B0(struct unkStruct_8094924 *r0, Move *move) +static void ReadPoke2MoveBits(DataSerializer *r0, Move *move) { memset(move, 0, sizeof(Move)); - RestoreIntegerBits(r0, &move->moveFlags, 4); - RestoreIntegerBits(r0, &move->moveFlags2, 1); - RestoreIntegerBits(r0, &move->id, 9); - RestoreIntegerBits(r0, &move->PP, 7); - RestoreIntegerBits(r0, &move->ginseng, 7); + ReadBits(r0, &move->moveFlags, 4); + ReadBits(r0, &move->moveFlags2, 1); + ReadBits(r0, &move->id, 9); + ReadBits(r0, &move->PP, 7); + ReadBits(r0, &move->ginseng, 7); } -void sub_80941FC(struct unkStruct_8094924 *r0, struct Moves*r1) +void ReadPoke2MovesBits(DataSerializer *r0, struct Moves*r1) { s32 i; for (i = 0; i < MAX_MON_MOVES; i++) - sub_80941B0(r0, &r1->moves[i]); + ReadPoke2MoveBits(r0, &r1->moves[i]); - r1->struggleMoveFlags= 0; - RestoreIntegerBits(r0, &r1->struggleMoveFlags, 8); + r1->struggleMoveFlags = 0; + ReadBits(r0, &r1->struggleMoveFlags, 8); } bool8 DoesMoveCharge(u16 move) diff --git a/src/play_time.c b/src/play_time.c index ce531c552..893a53892 100644 --- a/src/play_time.c +++ b/src/play_time.c @@ -75,18 +75,18 @@ void DeconstructPlayTime(struct PlayTimeStruct *r0, u32 *outHours, u32 *outMinut } } -void WritePlayTime(struct unkStruct_8094924 *r0) +void WritePlayTimeBits(DataSerializer *r0) { - SaveIntegerBits(r0, &gPlayTimeRef->frames, 6); - SaveIntegerBits(r0, &gPlayTimeRef->seconds, 6); - SaveIntegerBits(r0, &gPlayTimeRef->minutes, 6); - SaveIntegerBits(r0, &gPlayTimeRef->hours, 14); + WriteBits(r0, &gPlayTimeRef->frames, 6); + WriteBits(r0, &gPlayTimeRef->seconds, 6); + WriteBits(r0, &gPlayTimeRef->minutes, 6); + WriteBits(r0, &gPlayTimeRef->hours, 14); } -void ReadPlayTime(struct unkStruct_8094924 *r0) +void ReadPlayTimeBits(DataSerializer *r0) { - RestoreIntegerBits(r0, &gPlayTimeRef->frames, 6); - RestoreIntegerBits(r0, &gPlayTimeRef->seconds, 6); - RestoreIntegerBits(r0, &gPlayTimeRef->minutes, 6); - RestoreIntegerBits(r0, &gPlayTimeRef->hours, 14); + ReadBits(r0, &gPlayTimeRef->frames, 6); + ReadBits(r0, &gPlayTimeRef->seconds, 6); + ReadBits(r0, &gPlayTimeRef->minutes, 6); + ReadBits(r0, &gPlayTimeRef->hours, 14); } diff --git a/src/pokemon_3.c b/src/pokemon_3.c index a42ebf95d..b91091d50 100644 --- a/src/pokemon_3.c +++ b/src/pokemon_3.c @@ -46,15 +46,15 @@ extern s32 gUnknown_810AC90[10]; #include "data/pokemon_3.h" -extern void SaveDungeonLocation(struct unkStruct_8094924*, DungeonLocation*); -extern void xxx_save_poke_sub_c_808F41C(struct unkStruct_8094924*, struct unkPokeSubStruct_C*); -void RestoreDungeonLocation(struct unkStruct_8094924*, DungeonLocation*); -void xxx_restore_poke_sub_c_808F410(struct unkStruct_8094924*, struct unkPokeSubStruct_C*); +extern void WriteDungeonLocationBits(DataSerializer*, DungeonLocation*); +extern void WritePoke1LevelBits(DataSerializer*, struct unkPokeSubStruct_C*); +void ReadDungeonLocationBits(DataSerializer*, DungeonLocation*); +void ReadPoke1LevelBits(DataSerializer*, struct unkPokeSubStruct_C*); -extern void sub_809449C(struct unkStruct_8094924*, void*); -extern void SavePokemonHiddenPower(struct unkStruct_8094924*, HiddenPower*); -extern void sub_809447C(struct unkStruct_8094924*, void*); -extern void RestorePokemonHiddenPower(struct unkStruct_8094924*, HiddenPower*); +extern void WriteBellyBits(DataSerializer*, FixedPoint *src); +extern void WriteHiddenPowerBits(DataSerializer*, HiddenPower*); +extern void ReadBellyBits(DataSerializer*, FixedPoint *dst); +extern void ReadHiddenPowerBits(DataSerializer*, HiddenPower*); s16 GetPokemonEvolveConditions(s16 index, unkEvolve *r1); u32 sub_808F798(PokemonStruct1 *, s16); @@ -644,266 +644,274 @@ void sub_808ED00() { } for (; i < MAX_TEAM_MEMBERS; i++) { - gRecruitedPokemonRef->team[i].unk0 = 0; + gRecruitedPokemonRef->team[i].unk0 = FLAG_NONE; } } s32 SaveRecruitedPokemon(u8 *a1, s32 a2) { - u16 buffer[6]; - struct unkStruct_8094924 backup; + u16 sixMons[6]; + DataSerializer backup; u8 data_u8; - s16 data_s16; + s16 teamLeader; s32 count; s32 i; PokemonStruct1 *pokemon; - xxx_init_struct_8094924_save_809486C(&backup, a1, a2); + InitBitWriter(&backup, a1, a2); - for (i = 0; i < 6; i++) { - buffer[i] = -1; - } + for (i = 0; i < 6; i++) + sixMons[i] = -1; - data_s16 = 1; - data_s16 = -data_s16; + teamLeader = 1; // Maybe fakematch, should be -1 + teamLeader = -teamLeader; count = 0; + for (i = 0; i < NUM_MONSTERS; i++) { - // Some check was optimized out. Needed for matching. Thanks kaz + // Fakematch, probably need the PokemonFlag2 inline if (i) { u8 unk = -unk; } pokemon = &gRecruitedPokemonRef->pokemon[i]; - if (pokemon->unk0 & 1) { - if (pokemon->unk0 & FLAG_ON_TEAM) { - buffer[count++] = i; - } - if (pokemon->isTeamLeader) { - data_s16 = i; - } + if (PokemonFlag1(pokemon)) { + if (pokemon->unk0 & FLAG_ON_TEAM) + sixMons[count++] = i; + + if (IsMonTeamLeader(pokemon)) + teamLeader = i; } - else { + else pokemon->level = 0; - } - SavePokemonStruct(&backup, pokemon); + + WritePoke1Bits(&backup, pokemon); } + // Team members for (i = 0; i < MAX_TEAM_MEMBERS; i++) { - if ((u8)i[gRecruitedPokemonRef->team].unk0 & 1) { - data_u8 = 0xff; - } - else { + if (PokemonFlag1(&gRecruitedPokemonRef->team[i])) + data_u8 = 0xFF; + else data_u8 = 0; - } - SaveIntegerBits(&backup, &data_u8, 1); - SavePokemonStruct(&backup, &gRecruitedPokemonRef->team[i]); + + WriteBits(&backup, &data_u8, 1); + WritePoke1Bits(&backup, &gRecruitedPokemonRef->team[i]); } - for (i = 0; i < 6; i++) { - SaveIntegerBits(&backup, (u8*)&buffer[i], 16); - } - SaveIntegerBits(&backup, (u8*)&data_s16, 16); + // ??? + for (i = 0; i < 6; i++) + WriteBits(&backup, &sixMons[i], 16); + + // Team leader + WriteBits(&backup, &teamLeader, 16); + nullsub_102(&backup); - return backup.unk8; + return backup.count; } s32 RestoreRecruitedPokemon(u8 *a1, s32 a2) { - struct unkStruct_8094924 backup; - u8 data_u8; // same as saverecruitedpokemon - s16 data_s16; // same as saverecruitedpokemon + DataSerializer backup; + u8 data_u8; + s16 data_s16; s32 i; - xxx_init_struct_8094924_restore_809485C(&backup, a1, a2); + InitBitReader(&backup, a1, a2); + for (i = 0; i < NUM_MONSTERS; i++) { - RestorePokemonStruct(&backup, &gRecruitedPokemonRef->pokemon[i]); + ReadPoke1Bits(&backup, &gRecruitedPokemonRef->pokemon[i]); } + // Team members for (i = 0; i < MAX_TEAM_MEMBERS; i++) { - RestoreIntegerBits(&backup, &data_u8, 1); - RestorePokemonStruct(&backup, &gRecruitedPokemonRef->team[i]); - if (data_u8 & 1) { - gRecruitedPokemonRef->team[i].unk0 = 3; // FLAG_ON_TEAM (2) + ??? (1) - } - else { - gRecruitedPokemonRef->team[i].unk0 = 0; - } + ReadBits(&backup, &data_u8, 1); + ReadPoke1Bits(&backup, &gRecruitedPokemonRef->team[i]); + if (data_u8 & 1) + gRecruitedPokemonRef->team[i].unk0 = FLAG_ON_TEAM | FLAG_UNK_1; + else + gRecruitedPokemonRef->team[i].unk0 = FLAG_NONE; } + // ??? for (i = 0; i < 6; i++) { - RestoreIntegerBits(&backup, &data_s16, 16); - if ((u16)data_s16 < NUM_MONSTERS) { + ReadBits(&backup, &data_s16, 16); + if ((u16)data_s16 < NUM_MONSTERS) gRecruitedPokemonRef->pokemon[data_s16].unk0 |= FLAG_ON_TEAM; - } } - RestoreIntegerBits(&backup, &data_s16, 16); - if ((u16)data_s16 < NUM_MONSTERS) { + + // Team leader + ReadBits(&backup, &data_s16, 16); + if ((u16)data_s16 < NUM_MONSTERS) gRecruitedPokemonRef->pokemon[data_s16].isTeamLeader = TRUE; - } + nullsub_102(&backup); - return backup.unk8; + return backup.count; } -void SavePokemonStruct(struct unkStruct_8094924* a1, PokemonStruct1* pokemon) +void WritePoke1Bits(DataSerializer* a1, PokemonStruct1* pokemon) { - SaveIntegerBits(a1, &pokemon->level, 7); - SaveIntegerBits(a1, &pokemon->speciesNum, 9); - SaveDungeonLocation(a1, &pokemon->dungeonLocation); - xxx_save_poke_sub_c_808F41C(a1, &pokemon->unkC[0]); - xxx_save_poke_sub_c_808F41C(a1, &pokemon->unkC[1]); - SaveIntegerBits(a1, &pokemon->IQ, 10); - SaveIntegerBits(a1, &pokemon->pokeHP, 10); - SaveIntegerBits(a1, &pokemon->offense.att[0], 8); - SaveIntegerBits(a1, &pokemon->offense.att[1], 8); - SaveIntegerBits(a1, &pokemon->offense.def[0], 8); - SaveIntegerBits(a1, &pokemon->offense.def[1], 8); - SaveIntegerBits(a1, &pokemon->currExp, 24); - SaveIntegerBits(a1, &pokemon->IQSkills, 24); - SaveIntegerBits(a1, &pokemon->tacticIndex, 4); - SaveHeldItem(a1, &pokemon->heldItem); - SavePokemonMoves(a1, pokemon->moves); - SaveIntegerBits(a1, pokemon->name, 80); + WriteBits(a1, &pokemon->level, 7); + WriteBits(a1, &pokemon->speciesNum, 9); + WriteDungeonLocationBits(a1, &pokemon->dungeonLocation); + WritePoke1LevelBits(a1, &pokemon->unkC[0]); + WritePoke1LevelBits(a1, &pokemon->unkC[1]); + WriteBits(a1, &pokemon->IQ, 10); + WriteBits(a1, &pokemon->pokeHP, 10); + WriteBits(a1, &pokemon->offense.att[0], 8); + WriteBits(a1, &pokemon->offense.att[1], 8); + WriteBits(a1, &pokemon->offense.def[0], 8); + WriteBits(a1, &pokemon->offense.def[1], 8); + WriteBits(a1, &pokemon->currExp, 24); + WriteBits(a1, &pokemon->IQSkills, 24); + WriteBits(a1, &pokemon->tacticIndex, 4); + WriteHeldItemBits(a1, &pokemon->heldItem); + WritePoke1MovesBits(a1, pokemon->moves); + WriteBits(a1, pokemon->name, 10 * 8); } -void RestorePokemonStruct(struct unkStruct_8094924* a1, PokemonStruct1* pokemon) +void ReadPoke1Bits(DataSerializer* a1, PokemonStruct1* pokemon) { - memset(pokemon, 0, sizeof(PokemonStruct1)); - pokemon->unk0 = 0; - pokemon->isTeamLeader = 0; - RestoreIntegerBits(a1, &pokemon->level, 7); - if (pokemon->level) { - pokemon->unk0 |= 1; - } - RestoreIntegerBits(a1, &pokemon->speciesNum, 9); - RestoreDungeonLocation(a1, &pokemon->dungeonLocation); - xxx_restore_poke_sub_c_808F410(a1, &pokemon->unkC[0]); - xxx_restore_poke_sub_c_808F410(a1, &pokemon->unkC[1]); - RestoreIntegerBits(a1, &pokemon->IQ, 10); - RestoreIntegerBits(a1, &pokemon->pokeHP, 10); - RestoreIntegerBits(a1, &pokemon->offense.att[0], 8); - RestoreIntegerBits(a1, &pokemon->offense.att[1], 8); - RestoreIntegerBits(a1, &pokemon->offense.def[0], 8); - RestoreIntegerBits(a1, &pokemon->offense.def[1], 8); - RestoreIntegerBits(a1, &pokemon->currExp, 24); - RestoreIntegerBits(a1, &pokemon->IQSkills, 24); - RestoreIntegerBits(a1, &pokemon->tacticIndex, 4); - RestoreHeldItem(a1, &pokemon->heldItem); - RestorePokemonMoves(a1, pokemon->moves); - RestoreIntegerBits(a1, pokemon->name, 80); + memset(pokemon, 0, sizeof(PokemonStruct1)); + + pokemon->unk0 = FLAG_NONE; + pokemon->isTeamLeader = FALSE; + + ReadBits(a1, &pokemon->level, 7); + if (pokemon->level) + pokemon->unk0 |= FLAG_UNK_1; + + ReadBits(a1, &pokemon->speciesNum, 9); + ReadDungeonLocationBits(a1, &pokemon->dungeonLocation); + ReadPoke1LevelBits(a1, &pokemon->unkC[0]); + ReadPoke1LevelBits(a1, &pokemon->unkC[1]); + ReadBits(a1, &pokemon->IQ, 10); + ReadBits(a1, &pokemon->pokeHP, 10); + ReadBits(a1, &pokemon->offense.att[0], 8); + ReadBits(a1, &pokemon->offense.att[1], 8); + ReadBits(a1, &pokemon->offense.def[0], 8); + ReadBits(a1, &pokemon->offense.def[1], 8); + ReadBits(a1, &pokemon->currExp, 24); + ReadBits(a1, &pokemon->IQSkills, 24); + ReadBits(a1, &pokemon->tacticIndex, 4); + ReadHeldItemBits(a1, &pokemon->heldItem); + ReadPoke1MovesBits(a1, pokemon->moves); + ReadBits(a1, pokemon->name, 10 * 8); } -s32 SavePokemonStruct2(u8* a1, s32 size) +s32 SavePoke2s(u8* buffer, s32 size) { - struct unkStruct_8094924 backup; + DataSerializer backup; s32 i; u8 data_u8_neg1; u8 data_u8_zero; - xxx_init_struct_8094924_save_809486C(&backup, a1, size); + InitBitWriter(&backup, buffer, size); data_u8_neg1 = -1; data_u8_zero = 0; for (i = 0; i < 4; i++) { PokemonStruct2* pokemon2 = &gRecruitedPokemonRef->pokemon2[i]; - SaveIntegerBits(&backup, &pokemon2->unk0, 2); + WriteBits(&backup, &pokemon2->unk0, 2); - SaveIntegerBits(&backup, pokemon2->isTeamLeader ? &data_u8_neg1 : &data_u8_zero, 1); - SaveIntegerBits(&backup, &pokemon2->level, 7); + WriteBits(&backup, pokemon2->isTeamLeader ? &data_u8_neg1 : &data_u8_zero, 1); + WriteBits(&backup, &pokemon2->level, 7); - SaveDungeonLocation(&backup, &pokemon2->dungeonLocation); - SaveIntegerBits(&backup, &pokemon2->IQ, 10); - SaveIntegerBits(&backup, &pokemon2->unkA, 16); - SaveIntegerBits(&backup, &pokemon2->unkC, 16); - SaveIntegerBits(&backup, &pokemon2->speciesNum, 9); - SaveIntegerBits(&backup, &pokemon2->unk10, 10); - SaveIntegerBits(&backup, &pokemon2->unk12, 10); - SaveIntegerBits(&backup, &pokemon2->offense.att[0], 8); - SaveIntegerBits(&backup, &pokemon2->offense.att[1], 8); - SaveIntegerBits(&backup, &pokemon2->offense.def[0], 8); - SaveIntegerBits(&backup, &pokemon2->offense.def[1], 8); - SaveIntegerBits(&backup, &pokemon2->currExp, 24); - sub_8094184(&backup, &pokemon2->moves); - SaveItemSlot(&backup, &pokemon2->itemSlot); - sub_809449C(&backup, &pokemon2->belly); - sub_809449C(&backup, &pokemon2->maxBelly); - SaveIntegerBits(&backup, &pokemon2->IQSkills, 24); - SaveIntegerBits(&backup, &pokemon2->tacticIndex, 4); - SavePokemonHiddenPower(&backup, &pokemon2->hiddenPower); - SaveIntegerBits(&backup, &pokemon2->name, 80); + WriteDungeonLocationBits(&backup, &pokemon2->dungeonLocation); + WriteBits(&backup, &pokemon2->IQ, 10); + WriteBits(&backup, &pokemon2->unkA, 16); + WriteBits(&backup, &pokemon2->unkC, 16); + WriteBits(&backup, &pokemon2->speciesNum, 9); + WriteBits(&backup, &pokemon2->unk10, 10); + WriteBits(&backup, &pokemon2->unk12, 10); + WriteBits(&backup, &pokemon2->offense.att[0], 8); + WriteBits(&backup, &pokemon2->offense.att[1], 8); + WriteBits(&backup, &pokemon2->offense.def[0], 8); + WriteBits(&backup, &pokemon2->offense.def[1], 8); + WriteBits(&backup, &pokemon2->currExp, 24); + WritePoke2MovesBits(&backup, &pokemon2->moves); + WriteItemSlotBits(&backup, &pokemon2->itemSlot); + WriteBellyBits(&backup, &pokemon2->belly); + WriteBellyBits(&backup, &pokemon2->maxBelly); + WriteBits(&backup, &pokemon2->IQSkills, 24); + WriteBits(&backup, &pokemon2->tacticIndex, 4); + WriteHiddenPowerBits(&backup, &pokemon2->hiddenPower); + WriteBits(&backup, &pokemon2->name, 10 * 8); } + nullsub_102(&backup); - return backup.unk8; + return backup.count; } -s32 RestorePokemonStruct2(u8* a1, s32 size) +s32 RestorePoke2s(u8* a1, s32 size) { - struct unkStruct_8094924 backup; + DataSerializer backup; s32 i; - xxx_init_struct_8094924_restore_809485C(&backup, a1, size); + InitBitReader(&backup, a1, size); for (i = 0; i < 4; i++) { PokemonStruct2* pokemon2 = &gRecruitedPokemonRef->pokemon2[i]; u8 unk2; memset(pokemon2, 0, sizeof(PokemonStruct2)); - RestoreIntegerBits(&backup, &pokemon2->unk0, 2); + ReadBits(&backup, &pokemon2->unk0, 2); - RestoreIntegerBits(&backup, &unk2, 1); + ReadBits(&backup, &unk2, 1); if (unk2 & 1) { pokemon2->isTeamLeader = TRUE; } else { pokemon2->isTeamLeader = FALSE; } - RestoreIntegerBits(&backup, &pokemon2->level, 7); + ReadBits(&backup, &pokemon2->level, 7); - RestoreDungeonLocation(&backup, &pokemon2->dungeonLocation); - RestoreIntegerBits(&backup, &pokemon2->IQ, 10); - RestoreIntegerBits(&backup, &pokemon2->unkA, 16); - RestoreIntegerBits(&backup, &pokemon2->unkC, 16); - RestoreIntegerBits(&backup, &pokemon2->speciesNum, 9); - RestoreIntegerBits(&backup, &pokemon2->unk10, 10); - RestoreIntegerBits(&backup, &pokemon2->unk12, 10); - RestoreIntegerBits(&backup, &pokemon2->offense.att[0], 8); - RestoreIntegerBits(&backup, &pokemon2->offense.att[1], 8); - RestoreIntegerBits(&backup, &pokemon2->offense.def[0], 8); - RestoreIntegerBits(&backup, &pokemon2->offense.def[1], 8); - RestoreIntegerBits(&backup, &pokemon2->currExp, 24); - sub_80941FC(&backup, &pokemon2->moves); - RestoreItemSlot(&backup, &pokemon2->itemSlot); - sub_809447C(&backup, &pokemon2->belly); - sub_809447C(&backup, &pokemon2->maxBelly); - RestoreIntegerBits(&backup, &pokemon2->IQSkills, 24); - RestoreIntegerBits(&backup, &pokemon2->tacticIndex, 4); - RestorePokemonHiddenPower(&backup, &pokemon2->hiddenPower); - RestoreIntegerBits(&backup, &pokemon2->name, 80); + ReadDungeonLocationBits(&backup, &pokemon2->dungeonLocation); + ReadBits(&backup, &pokemon2->IQ, 10); + ReadBits(&backup, &pokemon2->unkA, 16); + ReadBits(&backup, &pokemon2->unkC, 16); + ReadBits(&backup, &pokemon2->speciesNum, 9); + ReadBits(&backup, &pokemon2->unk10, 10); + ReadBits(&backup, &pokemon2->unk12, 10); + ReadBits(&backup, &pokemon2->offense.att[0], 8); + ReadBits(&backup, &pokemon2->offense.att[1], 8); + ReadBits(&backup, &pokemon2->offense.def[0], 8); + ReadBits(&backup, &pokemon2->offense.def[1], 8); + ReadBits(&backup, &pokemon2->currExp, 24); + ReadPoke2MovesBits(&backup, &pokemon2->moves); + ReadItemSlotBits(&backup, &pokemon2->itemSlot); + ReadBellyBits(&backup, &pokemon2->belly); + ReadBellyBits(&backup, &pokemon2->maxBelly); + ReadBits(&backup, &pokemon2->IQSkills, 24); + ReadBits(&backup, &pokemon2->tacticIndex, 4); + ReadHiddenPowerBits(&backup, &pokemon2->hiddenPower); + ReadBits(&backup, &pokemon2->name, 80); } + nullsub_102(&backup); - return backup.unk8; + return backup.count; } -void xxx_restore_poke_sub_c_808F410(struct unkStruct_8094924* a1, struct unkPokeSubStruct_C* unkC) +void ReadPoke1LevelBits(DataSerializer* a1, struct unkPokeSubStruct_C* unkC) { - RestoreIntegerBits(a1, &unkC->level, 7); + ReadBits(a1, &unkC->level, 7); } -void xxx_save_poke_sub_c_808F41C(struct unkStruct_8094924* a1, struct unkPokeSubStruct_C* unkC) +void WritePoke1LevelBits(DataSerializer* a1, struct unkPokeSubStruct_C* unkC) { - SaveIntegerBits(a1, &unkC->level, 7); + WriteBits(a1, &unkC->level, 7); } -void RestorePokemonHiddenPower(unkStruct_8094924* a1, HiddenPower* a2) +void ReadHiddenPowerBits(DataSerializer* a1, HiddenPower* a2) { - RestoreIntegerBits(a1, &a2->hiddenPowerBasePower, 10); - RestoreIntegerBits(a1, &a2->hiddenPowerType, 5); + ReadBits(a1, &a2->hiddenPowerBasePower, 10); + ReadBits(a1, &a2->hiddenPowerType, 5); } -void SavePokemonHiddenPower(unkStruct_8094924* a1, HiddenPower* a2) +void WriteHiddenPowerBits(DataSerializer* a1, HiddenPower* a2) { - SaveIntegerBits(a1, &a2->hiddenPowerBasePower, 10); - SaveIntegerBits(a1, &a2->hiddenPowerType, 5); + WriteBits(a1, &a2->hiddenPowerBasePower, 10); + WriteBits(a1, &a2->hiddenPowerType, 5); } void sub_808F468(PokemonStruct1 *param_1, EvolveStatus *evolveStatus, u8 param_3) @@ -1108,7 +1116,7 @@ u32 sub_808F734(PokemonStruct1 *pokemon, s16 _species) iVar3 = sub_808F798(&pokeStruct,MONSTER_SHEDINJA); } if (iVar3 != 0) { - sub_8097848(); + IncrementAdventureNumJoined(); } return uVar1; } diff --git a/src/rescue_team_info.c b/src/rescue_team_info.c index 64bb35509..13e8b9887 100644 --- a/src/rescue_team_info.c +++ b/src/rescue_team_info.c @@ -112,7 +112,7 @@ bool8 GetIsTeamRenamed(void) u32 SaveRescueTeamInfo(u8 *param_1, u32 size) { - struct unkStruct_8094924 auStack36; + DataSerializer auStack36; u8 neg1; u8 zero; u8 *puVar2; @@ -120,9 +120,9 @@ u32 SaveRescueTeamInfo(u8 *param_1, u32 size) neg1 = -1; zero = 0; - xxx_init_struct_8094924_save_809486C(&auStack36, param_1, size); - SaveIntegerBits(&auStack36, gRescueTeamInfoRef->teamName, 0x58); - SaveIntegerBits(&auStack36, (u8 *)&gRescueTeamInfoRef->teamRankPts, 0x20); + InitBitWriter(&auStack36, param_1, size); + WriteBits(&auStack36, gRescueTeamInfoRef->teamName, 0x58); + WriteBits(&auStack36, (u8 *)&gRescueTeamInfoRef->teamRankPts, 0x20); gRescueTeamInfoRef->isTeamRenamed = sub_80023E4(0); if (gRescueTeamInfoRef->isTeamRenamed) @@ -133,21 +133,21 @@ u32 SaveRescueTeamInfo(u8 *param_1, u32 size) { puVar2 = &zero; } - SaveIntegerBits(&auStack36,puVar2,1); + WriteBits(&auStack36,puVar2,1); nullsub_102(&auStack36); - return auStack36.unk8; + return auStack36.count; } u32 ReadRescueTeamInfo(u8 *param_1, u32 size) { - struct unkStruct_8094924 auStack32; + DataSerializer auStack32; u8 byteArray[4]; - xxx_init_struct_8094924_restore_809485C(&auStack32, param_1, size); - RestoreIntegerBits(&auStack32, gRescueTeamInfoRef->teamName, 0x58); - RestoreIntegerBits(&auStack32, &gRescueTeamInfoRef->teamRankPts, 0x20); - RestoreIntegerBits(&auStack32, byteArray, 1); + InitBitReader(&auStack32, param_1, size); + ReadBits(&auStack32, gRescueTeamInfoRef->teamName, 0x58); + ReadBits(&auStack32, &gRescueTeamInfoRef->teamRankPts, 0x20); + ReadBits(&auStack32, byteArray, 1); gRescueTeamInfoRef->isTeamRenamed = byteArray[0] & 1; nullsub_102(&auStack32); - return auStack32.unk8; + return auStack32.count; } diff --git a/src/save.c b/src/save.c index b4b1f8233..b1d07b944 100644 --- a/src/save.c +++ b/src/save.c @@ -42,8 +42,8 @@ extern bool8 sub_800DAB4(u16, u8*, s32); extern bool8 sub_800DAB8(void); extern u32 SaveRecruitedPokemon(u8 *, u32); extern u32 RestoreRecruitedPokemon(void* a, s32 b); -extern u32 SavePokemonStruct2(u8 *, u32); -extern u32 RestorePokemonStruct2(void* a, s32 b); +extern u32 SavePoke2s(u8 *, u32); +extern u32 RestorePoke2s(void* a, s32 b); extern u32 sub_80954CC(void* a, s32 b); extern u32 sub_8095624(u8 *, u32); extern u32 RestoreMailInfo(void* a, s32 b); @@ -57,9 +57,9 @@ u32 sub_8011C1C(void) return gUnknown_203B17C; } -void sub_8011C28(u32 in) +void sub_8011C28(u32 x) { - gUnknown_203B17C = in; + gUnknown_203B17C = x; } s32 sub_8011C34(void) @@ -67,9 +67,9 @@ s32 sub_8011C34(void) return gUnknown_202DE28; } -void sub_8011C40(s32 in) +void sub_8011C40(s32 x) { - gUnknown_202DE28 = in; + gUnknown_202DE28 = x; } char *GetGameInternalName(void) @@ -232,11 +232,11 @@ u32 ReadSaveFromPak(u32 *a) saveStatus = 3; } r4 += 0x4650; - r1 = RestorePokemonStruct2(r4, 0x258); + r1 = RestorePoke2s(r4, 150 * 4); if (r1 != playerSave->unk428) { saveStatus = 3; } - r4 += 0x258; + r4 += 150 * 4; r1 = RestoreTeamInventory(r4, 0x1D8); if (r1 != playerSave->savedTeamInventory) { saveStatus = 3; @@ -252,7 +252,7 @@ u32 ReadSaveFromPak(u32 *a) saveStatus = 3; } r4 += 0x8; - r1 = sub_8097D98(r4, 0x100); + r1 = RestoreAdventureData(r4, 0x100); if (r1 != playerSave->unk43C) { saveStatus = 3; } @@ -350,22 +350,22 @@ u32 WriteSavetoPak(s32 *param_1, u32 param_2) playerSave->savedRecruitedPokemon = SaveRecruitedPokemon(array_ptr,0x4650); array_ptr += 0x4650; - playerSave->unk428 = SavePokemonStruct2(array_ptr,0x258); - array_ptr += 0x258; + playerSave->unk428 = SavePoke2s(array_ptr, 150 * 4); + array_ptr += 150 * 4; playerSave->savedTeamInventory = SaveTeamInventory(array_ptr,0x1D8); array_ptr += 0x1D8; playerSave->savedRescueTeamInfo = SaveRescueTeamInfo(array_ptr,0x10); array_ptr += 0x10; playerSave->savedFriendAreas = SaveFriendAreas(array_ptr,8); array_ptr += 8; - playerSave->unk43C = sub_8097D60(array_ptr,0x100); + playerSave->unk43C = SaveAdventureData(array_ptr, 0x100); array_ptr += 0x100; playerSave->unk440 = sub_8095624(array_ptr,0x594); array_ptr += 0x594; playerSave->savedMailInfo = SaveMailInfo(array_ptr,0x221); - saveStatus1 = WriteSaveSector(param_1,(u8 *)playerSave,sizeof(struct UnkStruct_sub_8011DAC)); - saveStatus2 = WriteSaveSector(param_1,(u8 *)playerSave,sizeof(struct UnkStruct_sub_8011DAC)); + saveStatus1 = WriteSaveSector(param_1, (u8 *)playerSave, sizeof(struct UnkStruct_sub_8011DAC)); + saveStatus2 = WriteSaveSector(param_1, (u8 *)playerSave, sizeof(struct UnkStruct_sub_8011DAC)); MemoryFree(playerSave); if (saveStatus1 != SAVE_COMPLETED) @@ -410,7 +410,7 @@ u32 sub_8012240(void) status = WriteFlashData(0x1F, (u8 *)r5, sizeof(struct unk_struct)); xxx_call_start_bg_music(); MemoryFree(r5); - if(status != 0) + if (status != 0) return SAVE_FAILED; else return SAVE_COMPLETED; @@ -423,12 +423,14 @@ void sub_8012284(void) InitializePlayerData(); } +// Is this the new game func? void sub_8012298(void) { - sub_80976A8(); + ResetAdventureInfo(); sub_80122A8(); } +// Init new game? void sub_80122A8(void) { sub_80122D0(); diff --git a/src/trap_1.c b/src/trap_1.c index 4f0357931..42e8a4692 100644 --- a/src/trap_1.c +++ b/src/trap_1.c @@ -14,88 +14,88 @@ extern u8 gMisakiSan[]; extern u8 gYayoiSan[]; -extern void sub_8082FA8(unkStruct_8094924 *, void *, s32); +extern void WriteBytes(DataSerializer *, void *, s32); -void SaveTile(unkStruct_8094924 *r0, Tile *tile); +static void WriteDungeonTile(DataSerializer *r0, Tile *tile); void sub_80830F8(void * , u32*); -void sub_808312C(void *, u32 *); -void SaveDungeonWeather(unkStruct_8094924 *r0, Weather *weather); -void sub_8083078(void *, u32); -void sub_80830B4(void *, u8); -void sub_8083030(void *, u16); -void SaveEntity(unkStruct_8094924 *param_1, Entity *); -void sub_808300C(unkStruct_8094924 *param_1, u8 *); -void sub_8081788(unkStruct_8094924 *param_1, Item *param_2); -void sub_8080B90(unkStruct_8094924 *param_1); -void SaveItemData(unkStruct_8094924 *param_1); -void sub_8081454(unkStruct_8094924 *param_1); -void sub_808165C(unkStruct_8094924 *param_1); -void SaveDungeonMusic(unkStruct_8094924 *param_1); -void SaveTrapData(unkStruct_8094924 *param_1); -void sub_8080CF0(unkStruct_8094924 *param_1); -void nullsub_98(unkStruct_8094924 *param_1); -void sub_8082F9C(unkStruct_8094924 *param_1, u32, 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 sub_8083060(unkStruct_8094924 *param_1, u32); -void sub_80817F4(unkStruct_8094924 *param_1, u32 param_2); -void sub_80830A0(unkStruct_8094924 *param_1, u32); -void sub_808180C(unkStruct_8094924 *param_1, u32 param_2); -void sub_8083048(unkStruct_8094924 *param_1, u32); -void sub_80818C8(unkStruct_8094924 *param_1, JoinedAt *param_2); -void SaveActionContainer(unkStruct_8094924 *param_1, ActionContainer *param_2); -void sub_8081B34(unkStruct_8094924 *r0, s16 *r1); -void SaveEntityMoves(unkStruct_8094924 *r0, Moves *move); -void sub_8081824(unkStruct_8094924 *param_1, u32 param_2); -void sub_80817B0(unkStruct_8094924 *param_1, u32 param_2); -void SavePosition(void*, Position *); -void SaveAITargetStatus(unkStruct_8094924 *param_1, AITarget* param_2); -void SaveIQFlags(unkStruct_8094924 *r0, u8 *r1); -void SaveSpeedStage(unkStruct_8094924 *param_1, s32 param_2); -void sub_8081854(unkStruct_8094924 *param_1, s32 param_2); -void sub_808183C(unkStruct_8094924 *param_1, s32 param_2); -void SaveMuzzledStatus(unkStruct_8094924 *param_1, Muzzled *param_2); -void SaveEyesightStatus(unkStruct_8094924 *param_1, EyesightStatus *param_2); -void SaveTransformStatus(unkStruct_8094924 *param_1, TransformStatus *param_2); -void SaveItemStatus(unkStruct_8094924 *param_1, ItemStatus *param_2); -void SaveMoveStatus(unkStruct_8094924 *param_1, MoveStatus* param_2); -void SaveLinkedStatus(unkStruct_8094924 *param_1, Linked *param_2); -void SaveVolatileStatus(unkStruct_8094924 *param_1, Volatile *param_2); -void SaveImmobilizeStatus(unkStruct_8094924 *param_1, Immobilize *param_2); -void SaveNonVolatileStatus(unkStruct_8094924 *param_1, NonVolatile *param_2); -void SaveEntitySleep(unkStruct_8094924 *param_1, Sleep* param_2); -void SaveTactic(unkStruct_8094924 *param_1, u8 param_2); -void SaveDungeonHiddenPower(unkStruct_8094924 *param_1, HiddenPower *param_2); -void SaveChargingStatus(unkStruct_8094924 *param_1, Charging *param_2); -void SaveProtectionStatus(unkStruct_8094924 *param_1, Protection *param_2); -void SaveWaitingStatus(unkStruct_8094924 *param_1, Waiting *param_2); -void SaveSpeedCounters(unkStruct_8094924 *param_1, u8 *speedCounters, u32 numCounters); -void SaveClientType(unkStruct_8094924 *param_1, u8 param_2); +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(unkStruct_8094924 *, u8 *); -extern void sub_8081C50(unkStruct_8094924 *); -extern void sub_8081C7C(unkStruct_8094924 *); -extern void sub_8081F2C(unkStruct_8094924 *); -extern void RestoreDungeonMusic(unkStruct_8094924 *); -extern void RestoreItemData(unkStruct_8094924 *); -extern void RestoreTrapData(unkStruct_8094924 *); -extern void sub_808217C(unkStruct_8094924 *); -extern void sub_8082FD4(unkStruct_8094924 *param_1, u8 *r1, u32 r2); -extern void sub_8082FE0(unkStruct_8094924 *, u32 *, u32); -u8 sub_80831DC(unkStruct_8094924 *r0); -u8 sub_8083188(unkStruct_8094924 *r0); -s16 sub_8083170(unkStruct_8094924 *r0); -void sub_80831F8(unkStruct_8094924 *r0, Position *); -void RestoreDungeonWeather(unkStruct_8094924 *r0, Weather *); -void sub_8083220(unkStruct_8094924 *r0, u32 *); -void sub_8083260(unkStruct_8094924 *r0, u32 *); -void RestoreTile(unkStruct_8094924 *r0, Tile *); -extern u16 sub_8083158(unkStruct_8094924 *param_1); -void sub_80820A8(unkStruct_8094924 *r0, Item *); +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(unkStruct_8094924 *param_1); -void sub_8082280(unkStruct_8094924 *param_1,bool8 isTeamMember,s32 index); +u32 sub_80831A0(DataSerializer *param_1); +void RestoreDungeonEntity(DataSerializer *param_1,bool8 isTeamMember,s32 index); extern u8 gYayoiSan[]; @@ -139,62 +139,74 @@ void SetTrap(Tile *tile, u8 id) } } -void sub_8080B30(u32 param_1,u32 param_2) -{ - unkStruct_8094924 uStack_14; - sub_8082F9C(&uStack_14,param_1,param_2); - uStack_14.unkC = 0; - sub_8082FA8(&uStack_14,&uStack_14.unkC,4); - sub_8080B90(&uStack_14); - sub_8081454(&uStack_14); - sub_808165C(&uStack_14); - SaveDungeonMusic(&uStack_14); - SaveItemData(&uStack_14); - SaveTrapData(&uStack_14); - sub_8080CF0(&uStack_14); - sub_808300C(&uStack_14,gYayoiSan); - nullsub_98(&uStack_14); + + + +// 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(unkStruct_8094924 *param_1) +void sub_8080B90(DataSerializer *param_1) { - sub_808300C(param_1,gMisakiSan); - sub_8082FA8(param_1,&gDungeon->dungeonLocation,0x58); + Write8Bytes(param_1, gMisakiSan); + WriteBytes(param_1, &gDungeon->dungeonLocation, 0x58); } -void SaveItemData(unkStruct_8094924 *param_1) +void WriteDungeonItems(DataSerializer *param_1) { - bool8 flag; + bool8 notEmpty; Item *item; Entity *entity; int counter; - u8 local_1c [5]; + u8 emptyItem [5]; - for(counter = 0; counter < 5; counter++) - { - local_1c[counter] = 0; - } - sub_808300C(param_1,gMisakiSan); + for (counter = 0; counter < 5; counter++) + emptyItem[counter] = 0; - for(counter = 0; counter < DUNGEON_MAX_ITEMS; counter++) - { + Write8Bytes(param_1, gMisakiSan); + + for (counter = 0; counter < DUNGEON_MAX_ITEMS; counter++) { entity = gDungeon->items[counter]; - flag = FALSE; - if ((entity != NULL) && (GetEntityType(entity) == ENTITY_ITEM)) { + notEmpty = FALSE; + + if (entity != NULL && GetEntityType(entity) == ENTITY_ITEM) { item = GetItemData(entity); - sub_8081788(param_1,item); - sub_8082FA8(param_1,&entity->pos.x,1); - sub_8082FA8(param_1,&entity->pos.y,1); - flag = TRUE; - } - if (!flag) { - sub_8082FA8(param_1,local_1c,5); + 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(unkStruct_8094924 *param_1) +void SaveTrapData(DataSerializer *param_1) { bool8 flag; Trap *trap; @@ -206,7 +218,7 @@ void SaveTrapData(unkStruct_8094924 *param_1) { local_1c[counter] = -1; } - sub_808300C(param_1,gMisakiSan); + Write8Bytes(param_1,gMisakiSan); for(counter = 0; counter < DUNGEON_MAX_TRAPS; counter++) { @@ -214,35 +226,35 @@ void SaveTrapData(unkStruct_8094924 *param_1) flag = FALSE; if ((entity != NULL) && (GetEntityType(entity) == ENTITY_TRAP)) { trap = GetTrapData(entity); - sub_8082FA8(param_1,&trap->id,1); - sub_8082FA8(param_1,&trap->unk1,1); - sub_8082FA8(param_1,&entity->isVisible,1); - sub_8082FA8(param_1,&entity->pos.x,1); - sub_8082FA8(param_1,&entity->pos.y,1); + 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) { - sub_8082FA8(param_1,local_1c,5); + WriteBytes(param_1,local_1c,5); } } } -void sub_8080CF0(unkStruct_8094924 *param_1) +void sub_8080CF0(DataSerializer *param_1) { s32 counter; - sub_808300C(param_1,gMisakiSan); - sub_8083078(param_1,gDungeon->unk37F0); - sub_8083078(param_1,gDungeon->unk37F4); - sub_80830B4(param_1,gDungeon->plusIsActive[0]); - sub_80830B4(param_1,gDungeon->plusIsActive[1]); - sub_80830B4(param_1,gDungeon->minusIsActive[0]); - sub_80830B4(param_1,gDungeon->minusIsActive[1]); - sub_80830B4(param_1,gDungeon->decoyActive); - sub_80830B4(param_1,gDungeon->unk37FD); - sub_80830B4(param_1,gDungeon->deoxysDefeat); - sub_80830B4(param_1,gDungeon->unk37FF); - sub_8083030(param_1,gDungeon->unk3800); + 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]); @@ -253,7 +265,7 @@ void sub_8080CF0(unkStruct_8094924 *param_1) } } -void SaveEntity(unkStruct_8094924 *param_1, Entity *param_2) +void SaveEntity(DataSerializer *param_1, Entity *param_2) { Position *pos; EntityInfo *info; @@ -301,60 +313,60 @@ void SaveEntity(unkStruct_8094924 *param_1, Entity *param_2) uStack_a8 = 0; uStack_ac = 1; - sub_8083060(param_1,0xaa); - sub_8083060(param_1,0x55); + WriteU8(param_1,0xaa); + WriteU8(param_1,0x55); if (EntityExists(param_2)) { info = GetEntInfo(param_2); - sub_8082FA8(param_1,&uStack_ac,1); - sub_8082FA8(param_1,¶m_2->pos.x,1); - sub_8082FA8(param_1,¶m_2->pos.y,1); - sub_8082FA8(param_1,¶m_2->isVisible,1); - sub_8082FA8(param_1,¶m_2->spawnGenID,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; - sub_8082FA8(param_1,&uStack_a8,1); - sub_8082FA8(param_1,&uStack_a8,1); - sub_8082FA8(param_1,&uStack_a8,1); - sub_8082FA8(param_1,&uStack_a8,1); - sub_8082FA8(param_1,&uStack_a8,2); + 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); } - sub_8083030(param_1,info->flags); + WriteU16(param_1,info->flags); sub_80817F4(param_1,info->apparentID); sub_80817F4(param_1,info->id); - sub_80830B4(param_1,info->isNotTeamMember); - sub_80830B4(param_1,info->isTeamLeader); - sub_8083060(param_1,info->shopkeeper); - sub_8083060(param_1,info->level); - sub_8083060(param_1,info->teamIndex); - sub_80818C8(param_1,&info->joinedAt); - sub_8083048(param_1,info->IQ); - sub_8083048(param_1,info->HP); - sub_8083048(param_1,info->maxHPStat); - sub_8083048(param_1,info->originalHP); - sub_8083060(param_1,info->atk[0]); - sub_8083060(param_1,info->atk[1]); - sub_8083060(param_1,info->def[0]); - sub_8083060(param_1,info->def[1]); - sub_8083078(param_1,info->exp); - sub_8083048(param_1,info->offensiveStages[0]); - sub_8083048(param_1,info->offensiveStages[1]); - sub_8083048(param_1,info->defensiveStages[0]); - sub_8083048(param_1,info->defensiveStages[1]); - sub_8083048(param_1,info->hitChanceStages[0]); - sub_8083048(param_1,info->hitChanceStages[1]); - sub_8083048(param_1,info->flashFireBoost); - sub_80830A0(param_1,info->offensiveMultipliers[0]); - sub_80830A0(param_1,info->offensiveMultipliers[1]); - sub_80830A0(param_1,info->defensiveMultipliers[0]); - sub_80830A0(param_1,info->defensiveMultipliers[1]); + 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]); - sub_8081788(param_1,&info->heldItem); + WriteDungeonItem(param_1,&info->heldItem); sub_80817B0(param_1,info->unk64); temp3 = &info->aiTarget; temp2 = info->IQSkillMenuFlags; @@ -396,7 +408,7 @@ void SaveEntity(unkStruct_8094924 *param_1, Entity *param_2) pos = info->prevPos; for(counter = 0; counter < NUM_PREV_POS; counter++) { - SavePosition(param_1,pos); + WritePosition8(param_1,pos); pos++; } @@ -405,9 +417,9 @@ void SaveEntity(unkStruct_8094924 *param_1, Entity *param_2) SaveIQFlags(param_1,temp1); SaveTactic(param_1,*puStack_a0); SaveDungeonHiddenPower(param_1,psStack_a4); - sub_8083078(param_1,*puStack_9c); - sub_8083078(param_1,*puStack_98); - sub_8083078(param_1,*puStack_94); + 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); @@ -421,416 +433,420 @@ void SaveEntity(unkStruct_8094924 *param_1, Entity *param_2) SaveTransformStatus(param_1,puStack_64); SaveEyesightStatus(param_1,puStack_60); SaveMuzzledStatus(param_1,pbStack_5c); - sub_80830B4(param_1,*pbStack_58); - sub_80830B4(param_1,*pbStack_54); - sub_80830B4(param_1,*pbStack_50); - sub_80830B4(param_1,*puStack_4c); - sub_80830B4(param_1,*pbStack_48); - sub_8083060(param_1,*puStack_34); - sub_80830B4(param_1,*pbStack_44); - sub_80830B4(param_1,*pbStack_40); - sub_80830B4(param_1,*pbStack_3c); - sub_8083060(param_1,*puStack_38); - sub_80830B4(param_1,*pbStack_30); - sub_8083060(param_1,*puStack_2c); - sub_8083060(param_1,*puStack_28); + 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); - SaveSpeedCounters(param_1,info->speedUpCounters,NUM_SPEED_COUNTERS); - SaveSpeedCounters(param_1,info->speedDownCounters,NUM_SPEED_COUNTERS); - sub_8083060(param_1,info->stockpileStage); - sub_8083060(param_1,info->unk113); - sub_8083060(param_1,(u8)info->moveRandomly); + 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); - sub_80830B4(param_1,info->aiNextToTarget); - sub_80830B4(param_1,info->recalculateFollow); - sub_80830B4(param_1,info->waiting); - sub_80830B4(param_1,info->unk146); - sub_80830B4(param_1,info->attacking); - sub_80830B4(param_1,info->unk149); - sub_80830B4(param_1,info->unk14A); - sub_80830B4(param_1,info->unk14B); - sub_80830B4(param_1,info->unk14C); - sub_8083030(param_1,info->visualFlags); - sub_8083030(param_1,info->previousVisualFlags); - sub_80830B4(param_1,info->unk152); - sub_8083060(param_1,info->unk153); - sub_80830B4(param_1,info->unk154); - sub_80830B4(param_1,info->unk155); - sub_80830B4(param_1,info->unk156); - sub_8083060(param_1,info->unk164); - sub_8083060(param_1,info->unk165); - sub_8083060(param_1,info->unk166); - sub_8083060(param_1,info->unk167); - sub_8083060(param_1,info->unk168); - sub_8083060(param_1,info->turnsSinceWarpScarfActivation); - SavePosition(param_1,&(info->targetPos)); - sub_80830A0(param_1,info->unk174); - sub_8083030(param_1,info->abilityEffectFlags); - sub_8083048(param_1,info->unk1F8); - sub_8083048(param_1,info->mobileTurnTimer); - sub_8083078(param_1,info->expGainedInTurn); + 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(unkStruct_8094924 *param_1) +void sub_8081454(DataSerializer *param_1) { int iVar1; int iVar2; int iVar4; - sub_808300C(param_1,gMisakiSan); - sub_80830B4(param_1, gDungeon->unk3A08); - sub_80830B4(param_1, gDungeon->unk3A09); - sub_80830B4(param_1, gDungeon->unk3A0A); - sub_80830B4(param_1, gDungeon->unk3A0B); - sub_8083060(param_1, gDungeon->unk3A0C); - sub_8083060(param_1, gDungeon->unk3A0D); - sub_8083048(param_1, gDungeon->tileset); - sub_8083048(param_1,gDungeon->unk3A10); - sub_8083048(param_1, gDungeon->unk3A12); - sub_8083048(param_1, gDungeon->bossBattleIndex); - sub_8083048(param_1, gDungeon->unk3A16); + 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++) { - SaveTile(param_1,&gDungeon->tiles[iVar1][iVar2]); + WriteDungeonTile(param_1,&gDungeon->tiles[iVar1][iVar2]); } } - SavePosition(param_1,&gDungeon->unkE218); - SavePosition(param_1,&gDungeon->unkE21C); + WritePosition8(param_1,&gDungeon->unkE218); + WritePosition8(param_1,&gDungeon->unkE21C); for(iVar4 = 0; iVar4 < 8; iVar4++) { - SavePosition(param_1,&gDungeon->unkE220[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); + 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++) { - SaveTile(param_1, &gDungeon->unkE27C[iVar1][iVar2]); - sub_8083060(param_1, gDungeon->unkE87C[iVar1][iVar2]); + WriteDungeonTile(param_1, &gDungeon->unkE27C[iVar1][iVar2]); + WriteU8(param_1, gDungeon->unkE87C[iVar1][iVar2]); } } - SaveDungeonWeather(param_1,&gDungeon->weather); + WriteDungeonWeather(param_1,&gDungeon->weather); } -void sub_808165C(unkStruct_8094924 *param_1) +void sub_808165C(DataSerializer *param_1) { - sub_808300C(param_1,gMisakiSan); - sub_8083060(param_1, gDungeon->unk181e8.unk18208); - sub_8083060(param_1, gDungeon->unk181e8.visibilityRange); - sub_80830B4(param_1, gDungeon->unk181e8.blinded); - sub_80830B4(param_1, gDungeon->unk181e8.unk1820B); - sub_80830B4(param_1, gDungeon->unk181e8.unk1820C); - sub_80830B4(param_1, gDungeon->unk181e8.unk1820D); - sub_80830B4(param_1, gDungeon->unk181e8.unk1820E); - sub_80830B4(param_1, gDungeon->unk181e8.unk1820F); - sub_80830B4(param_1, gDungeon->unk181e8.hallucinating); - sub_80830B4(param_1, gDungeon->unk181e8.unk18211); - sub_80830B4(param_1, gDungeon->unk181e8.unk18213); + 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(unkStruct_8094924 *param_1) +void SaveDungeonMusic(DataSerializer *param_1) { - sub_8083048(param_1, (s16)gDungeon->musPlayer.songIndex); - sub_8083048(param_1, (s16)gDungeon->musPlayer.pastSongIndex); - sub_8083048(param_1, (s16)gDungeon->musPlayer.queuedSongIndex); + WriteS16(param_1, (s16)gDungeon->musPlayer.songIndex); + WriteS16(param_1, (s16)gDungeon->musPlayer.pastSongIndex); + WriteS16(param_1, (s16)gDungeon->musPlayer.queuedSongIndex); } -void sub_8081788(unkStruct_8094924 *param_1, Item *param_2) +void WriteDungeonItem(DataSerializer *param_1, Item *param_2) { - sub_8082FA8(param_1, ¶m_2->flags, 1); - sub_8082FA8(param_1, ¶m_2->quantity, 1); - sub_8082FA8(param_1, ¶m_2->id, 1); + WriteBytes(param_1, ¶m_2->flags, 1); + WriteBytes(param_1, ¶m_2->quantity, 1); + WriteBytes(param_1, ¶m_2->id, 1); } -void sub_80817B0(unkStruct_8094924 *param_1, u32 param_2) +void sub_80817B0(DataSerializer *param_1, u32 param_2) { u8 stack; stack = param_2; - sub_8082FA8(param_1, &stack, 1); + WriteBytes(param_1, &stack, 1); } -void SaveActionContainer(unkStruct_8094924 *param_1, ActionContainer *param_2) +void SaveActionContainer(DataSerializer *param_1, ActionContainer *param_2) { - sub_8082FA8(param_1, ¶m_2->direction, 1); - sub_8082FA8(param_1, ¶m_2->itemTargetPosition.x, 1); - sub_8082FA8(param_1, ¶m_2->itemTargetPosition.y, 1); + 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(unkStruct_8094924 *param_1, u32 param_2) +void sub_80817F4(DataSerializer *param_1, u32 param_2) { u16 stack; stack = param_2; - sub_8082FA8(param_1, &stack, 2); + WriteBytes(param_1, &stack, 2); } -void sub_808180C(unkStruct_8094924 *param_1, u32 param_2) +void sub_808180C(DataSerializer *param_1, u32 param_2) { u8 stack; stack = param_2; - sub_8082FA8(param_1, &stack, 1); + WriteBytes(param_1, &stack, 1); } -void sub_8081824(unkStruct_8094924 *param_1, u32 param_2) +void sub_8081824(DataSerializer *param_1, u32 param_2) { u8 stack; stack = param_2; - sub_8082FA8(param_1, &stack, 1); + WriteBytes(param_1, &stack, 1); } -void sub_808183C(unkStruct_8094924 *param_1, s32 param_2) +void sub_808183C(DataSerializer *param_1, s32 param_2) { u8 stack; stack = param_2; - sub_8082FA8(param_1, &stack, 1); + WriteBytes(param_1, &stack, 1); } -void sub_8081854(unkStruct_8094924 *param_1, s32 param_2) +void sub_8081854(DataSerializer *param_1, s32 param_2) { u8 stack; stack = param_2; - sub_8082FA8(param_1, &stack, 1); + WriteBytes(param_1, &stack, 1); } -void SaveSpeedStage(unkStruct_8094924 *param_1, s32 param_2) +void SaveSpeedStage(DataSerializer *param_1, s32 param_2) { - sub_8082FA8(param_1, ¶m_2, 4); + WriteBytes(param_1, ¶m_2, 4); } -void SaveTactic(unkStruct_8094924 *param_1, u8 param_2) +void SaveTactic(DataSerializer *param_1, u8 param_2) { - sub_8082FA8(param_1, ¶m_2, 1); + WriteBytes(param_1, ¶m_2, 1); } -void SaveDungeonHiddenPower(unkStruct_8094924 *param_1, HiddenPower *param_2) +void SaveDungeonHiddenPower(DataSerializer *param_1, HiddenPower *param_2) { - sub_8083048(param_1, param_2->hiddenPowerBasePower); + WriteS16(param_1, param_2->hiddenPowerBasePower); sub_808180C(param_1, param_2->hiddenPowerType); } -void SaveClientType(unkStruct_8094924 *param_1, u8 param_2) +void SaveClientType(DataSerializer *param_1, u8 param_2) { - sub_8083060(param_1, param_2); + WriteU8(param_1, param_2); } -void sub_80818C8(unkStruct_8094924 *param_1, JoinedAt *param_2) +static void WriteJoinedAt(DataSerializer *param_1, JoinedAt *param_2) { - sub_8083060(param_1, param_2->joinedAt); - sub_8083060(param_1, param_2->unk1); + WriteU8(param_1, param_2->joinedAt); + WriteU8(param_1, param_2->unk1); } -void SaveAITargetStatus(unkStruct_8094924 *param_1, AITarget* param_2) +void SaveAITargetStatus(DataSerializer *param_1, AITarget* param_2) { - sub_8082FA8(param_1, ¶m_2->aiObjective, 1); - sub_80830B4(param_1, param_2->aiNotNextToTarget); - sub_80830B4(param_1, param_2->aiTargetingEnemy); - sub_80830B4(param_1, param_2->aiTurningAround); - sub_8083030(param_1, param_2->aiTargetSpawnGenID); - SavePosition(param_1, ¶m_2->aiTargetPos); + 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(unkStruct_8094924 *param_1, Sleep* param_2) +void SaveEntitySleep(DataSerializer *param_1, Sleep* param_2) { - sub_8082FA8(param_1, ¶m_2->sleep, 1); - sub_8083060(param_1, param_2->sleepTurns); + WriteBytes(param_1, ¶m_2->sleep, 1); + WriteU8(param_1, param_2->sleepTurns); } -void SaveNonVolatileStatus(unkStruct_8094924 *param_1, NonVolatile *param_2) +void SaveNonVolatileStatus(DataSerializer *param_1, NonVolatile *param_2) { - sub_8082FA8(param_1, ¶m_2->nonVolatileStatus, 1); - sub_8083060(param_1, param_2->nonVolatileStatusTurns); - sub_8083060(param_1, param_2->nonVolatileStatusDamageCountdown); - sub_8083060(param_1, param_2->unk4); + 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(unkStruct_8094924 *param_1, Immobilize *param_2) +void SaveImmobilizeStatus(DataSerializer *param_1, Immobilize *param_2) { - sub_8082FA8(param_1, ¶m_2->immobilizeStatus, 1); - sub_8083060(param_1, param_2->immobilizeStatusTurns); - sub_8083060(param_1, param_2->immobilizeStatusDamageCountdown); - sub_8083078(param_1, param_2->unk4); + 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(unkStruct_8094924 *param_1, Volatile *param_2) +void SaveVolatileStatus(DataSerializer *param_1, Volatile *param_2) { - sub_8082FA8(param_1, ¶m_2->volatileStatus, 1); - sub_8083060(param_1, param_2->volatileStatusTurns); + WriteBytes(param_1, ¶m_2->volatileStatus, 1); + WriteU8(param_1, param_2->volatileStatusTurns); } -void SaveChargingStatus(unkStruct_8094924 *param_1, Charging *param_2) +void SaveChargingStatus(DataSerializer *param_1, Charging *param_2) { - sub_8082FA8(param_1, ¶m_2->chargingStatus, 1); - sub_8083060(param_1, param_2->chargingStatusTurns); - sub_8083060(param_1, param_2->chargingStatusMoveIndex); + WriteBytes(param_1, ¶m_2->chargingStatus, 1); + WriteU8(param_1, param_2->chargingStatusTurns); + WriteU8(param_1, param_2->chargingStatusMoveIndex); } -void SaveProtectionStatus(unkStruct_8094924 *param_1, Protection *param_2) +void SaveProtectionStatus(DataSerializer *param_1, Protection *param_2) { - sub_8082FA8(param_1, ¶m_2->protectionStatus, 1); - sub_8083060(param_1, param_2->protectionStatusTurns); + WriteBytes(param_1, ¶m_2->protectionStatus, 1); + WriteU8(param_1, param_2->protectionStatusTurns); } -void SaveWaitingStatus(unkStruct_8094924 *param_1, Waiting *param_2) +void SaveWaitingStatus(DataSerializer *param_1, Waiting *param_2) { - sub_8082FA8(param_1, ¶m_2->waitingStatus, 1); - sub_80830B4(param_1, param_2->enemyDecoy); - sub_80830B4(param_1, param_2->unkCA); - sub_8083060(param_1, param_2->waitingStatusTurns); - sub_8083060(param_1, param_2->curseDamageCountdown); + 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(unkStruct_8094924 *param_1, Linked *param_2) +void SaveLinkedStatus(DataSerializer *param_1, Linked *param_2) { - sub_8082FA8(param_1, ¶m_2->linkedStatus, 1); - sub_8083078(param_1, param_2->unkD4); - sub_8083060(param_1, param_2->unkD8); - sub_8083060(param_1, param_2->linkedStatusTurns); - sub_8083060(param_1, param_2->linkedStatusDamageCountdown); + 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(unkStruct_8094924 *param_1, MoveStatus* param_2) +void SaveMoveStatus(DataSerializer *param_1, MoveStatus* param_2) { - sub_8082FA8(param_1, ¶m_2->moveStatus, 1); - sub_8083060(param_1, param_2->moveStatusTurns); + WriteBytes(param_1, ¶m_2->moveStatus, 1); + WriteU8(param_1, param_2->moveStatusTurns); } -void SaveItemStatus(unkStruct_8094924 *param_1, ItemStatus *param_2) +void SaveItemStatus(DataSerializer *param_1, ItemStatus *param_2) { - sub_8082FA8(param_1, ¶m_2->itemStatus, 1); + WriteBytes(param_1, ¶m_2->itemStatus, 1); } -void SaveTransformStatus(unkStruct_8094924 *param_1, TransformStatus *param_2) +void SaveTransformStatus(DataSerializer *param_1, TransformStatus *param_2) { - sub_8082FA8(param_1, ¶m_2->transformStatus, 1); - sub_8083060(param_1, param_2->transformStatusTurns); + WriteBytes(param_1, ¶m_2->transformStatus, 1); + WriteU8(param_1, param_2->transformStatusTurns); } -void SaveEyesightStatus(unkStruct_8094924 *param_1, EyesightStatus *param_2) +void SaveEyesightStatus(DataSerializer *param_1, EyesightStatus *param_2) { - sub_8082FA8(param_1, ¶m_2->eyesightStatus, 1); - sub_8083060(param_1, param_2->eyesightStatusTurns); + WriteBytes(param_1, ¶m_2->eyesightStatus, 1); + WriteU8(param_1, param_2->eyesightStatusTurns); } -void SaveMuzzledStatus(unkStruct_8094924 *param_1, Muzzled *param_2) +void SaveMuzzledStatus(DataSerializer *param_1, Muzzled *param_2) { - sub_8082FA8(param_1, ¶m_2->muzzled, 1); - sub_8083060(param_1, param_2->muzzledTurns); + WriteBytes(param_1, ¶m_2->muzzled, 1); + WriteU8(param_1, param_2->muzzledTurns); } -void SaveEntityMove(unkStruct_8094924 *r0, Move *r1) +void SaveEntityMove(DataSerializer *r0, Move *r1) { - sub_8083060(r0, r1->moveFlags); - sub_8083060(r0, r1->moveFlags2); - sub_8082FA8(r0, &r1->id, 2); - sub_8083060(r0, r1->PP); - sub_8083060(r0, r1->ginseng); + WriteU8(r0, r1->moveFlags); + WriteU8(r0, r1->moveFlags2); + WriteBytes(r0, &r1->id, 2); + WriteU8(r0, r1->PP); + WriteU8(r0, r1->ginseng); } -void SaveEntityMoves(unkStruct_8094924 *r0, Moves *move) +void SaveEntityMoves(DataSerializer *r0, Moves *move) { - s32 index; - for(index = 0; index < MAX_MON_MOVES; index++) - { - SaveEntityMove(r0, &move->moves[index]); + 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]); } - sub_8083060(r0, move->struggleMoveFlags); // Struggle Move flags? + + WriteU8(r0, weather->weatherDamageCounter); + WriteU8(r0, weather->mudSportTurns); + WriteU8(r0, weather->waterSportTurns); + WriteBool8(r0, weather->nullifyWeather); } -void sub_8081B34(unkStruct_8094924 *r0, s16 *r1) +// Read func + +void ReadDungeonState(u8 *buffer, u32 bufLen) { - sub_8083048(r0, r1[0]); - sub_8083048(r0, r1[1]); + 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 SaveIQFlags(unkStruct_8094924 *r0, u8 *r1) -{ - sub_8082FA8(r0, r1, 3); -} - -void SaveTile(unkStruct_8094924 *r0, Tile *tile) -{ - sub_8083030(r0, tile->terrainType); - sub_8083030(r0, tile->unk4); - sub_8082FA8(r0, &tile->room, 1); - sub_8082FA8(r0, &tile->unkE, 1); -} - -void SaveDungeonWeather(unkStruct_8094924 *r0, Weather *weather) -{ - s32 index; - sub_8082FA8(r0, &weather->weather, 1); - sub_8082FA8(r0, &weather->unkE265, 1); - for(index = 0; index < 8; index++) - { - sub_8083060(r0, weather->unkE267[index]); - sub_8083060(r0, weather->naturalWeather[index]); - } - sub_8083060(r0, weather->weatherDamageCounter); - sub_8083060(r0, weather->mudSportTurns); - sub_8083060(r0, weather->waterSportTurns); - sub_80830B4(r0, weather->nullifyWeather); -} - -void sub_8081BF4(u8 *r0, u32 r1) -{ - unkStruct_8094924 uStack_14; - - sub_8082FD4(&uStack_14, r0, r1); - - sub_8082FE0(&uStack_14, &uStack_14.unkC, 4); - sub_8081C50(&uStack_14); - sub_8081C7C(&uStack_14); - sub_8081F2C(&uStack_14); - RestoreDungeonMusic(&uStack_14); - RestoreItemData(&uStack_14); - RestoreTrapData(&uStack_14); - sub_808217C(&uStack_14); - - sub_8083018(&uStack_14, gYayoiSan); - nullsub_98(&uStack_14); -} - -void sub_8081C50(unkStruct_8094924 *r0) +void sub_8081C50(DataSerializer *r0) { sub_8083018(r0, gMisakiSan); - sub_8082FE0(r0, (u32 *)&gDungeon->dungeonLocation, 0x58); + ReadBytes(r0, &gDungeon->dungeonLocation, 0x58); } -void sub_8081C7C(unkStruct_8094924 *r0) +void sub_8081C7C(DataSerializer *r0) { int x; int y; s32 iVar7; sub_8083018(r0,gMisakiSan); - gDungeon->unk3A08 = sub_80831DC(r0); - gDungeon->unk3A09 = sub_80831DC(r0); - gDungeon->unk3A0A = sub_80831DC(r0); - gDungeon->unk3A0B = sub_80831DC(r0); - gDungeon->unk3A0C = sub_8083188(r0); - gDungeon->unk3A0D = sub_8083188(r0); - gDungeon->tileset = sub_8083170(r0); - gDungeon->unk3A10 = sub_8083170(r0); - gDungeon->unk3A12 = sub_8083170(r0); - gDungeon->bossBattleIndex = sub_8083170(r0); - gDungeon->unk3A16 = sub_8083170(r0); + 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++) { @@ -839,16 +855,16 @@ void sub_8081C7C(unkStruct_8094924 *r0) RestoreTile(r0,&gDungeon->tiles[y][x]); } } - sub_80831F8(r0,&gDungeon->unkE218); - sub_80831F8(r0,&gDungeon->unkE21C); + ReadPosition8(r0,&gDungeon->unkE218); + ReadPosition8(r0,&gDungeon->unkE21C); for(iVar7 = 0; iVar7 < 8; iVar7++) { - sub_80831F8(r0,&gDungeon->unkE220[iVar7]); + ReadPosition8(r0,&gDungeon->unkE220[iVar7]); } - sub_8083220(r0,&gDungeon->unkE240); - sub_8083220(r0,&gDungeon->unkE240 + 0x4); - sub_8083260(r0,&gDungeon->unkE240 + 0x8); + sub_8083220(r0, gDungeon->unkE240); + sub_8083220(r0, gDungeon->unkE250); + sub_8083260(r0, gDungeon->unkE260); for(y = 0; y < 8; y++) @@ -856,67 +872,67 @@ void sub_8081C7C(unkStruct_8094924 *r0) for(x = 0; x < 8; x++) { RestoreTile(r0,&gDungeon->unkE27C[y][x]); - gDungeon->unkE87C[y][x] = sub_8083188(r0); + gDungeon->unkE87C[y][x] = ReadU8(r0); } } RestoreDungeonWeather(r0,&gDungeon->weather); } -void RestoreTile(unkStruct_8094924 *r0, Tile *tile) +void RestoreTile(DataSerializer *r0, Tile *tile) { memset(tile, 0, sizeof(Tile)); - tile->terrainType = sub_8083158(r0); - tile->unk4 = sub_8083158(r0); + tile->terrainType = ReadU16(r0); + tile->unk4 = ReadU16(r0); - sub_8082FE0(r0, (u32 *)&tile->room, 1); - sub_8082FE0(r0, (u32 *)&tile->unkE, 1); + ReadBytes(r0, (u32 *)&tile->room, 1); + ReadBytes(r0, (u32 *)&tile->unkE, 1); tile->monster = NULL; tile->object = NULL; } -void RestoreDungeonWeather(unkStruct_8094924 *r0, Weather *weather) +void RestoreDungeonWeather(DataSerializer *r0, Weather *weather) { s32 index; memset(weather, 0, sizeof(Weather)); - sub_8082FE0(r0, (u32 *)&weather->weather, 1); - sub_8082FE0(r0, (u32 *)&weather->unkE265, 1); + ReadBytes(r0, (u32 *)&weather->weather, 1); + ReadBytes(r0, (u32 *)&weather->unkE265, 1); for(index = 0; index < 8; index++) { - weather->unkE267[index] = sub_8083188(r0); - weather->naturalWeather[index] = sub_8083188(r0); + weather->unkE267[index] = ReadU8(r0); + weather->naturalWeather[index] = ReadU8(r0); } - weather->weatherDamageCounter = sub_8083188(r0); - weather->mudSportTurns = sub_8083188(r0); - weather->waterSportTurns = sub_8083188(r0); - weather->nullifyWeather = sub_80831DC(r0); + weather->weatherDamageCounter = ReadU8(r0); + weather->mudSportTurns = ReadU8(r0); + weather->waterSportTurns = ReadU8(r0); + weather->nullifyWeather = ReadBool8(r0); } -void sub_8081F2C(unkStruct_8094924 *param_1) +void sub_8081F2C(DataSerializer *param_1) { sub_8083018(param_1,gMisakiSan); gDungeon->unk181e8.cameraTarget = NULL; - gDungeon->unk181e8.unk18208 = sub_8083188(param_1); - gDungeon->unk181e8.visibilityRange = sub_8083188(param_1); - gDungeon->unk181e8.blinded = sub_80831DC(param_1); - gDungeon->unk181e8.unk1820B = sub_80831DC(param_1); - gDungeon->unk181e8.unk1820C = sub_80831DC(param_1); - gDungeon->unk181e8.unk1820D = sub_80831DC(param_1); - gDungeon->unk181e8.unk1820E = sub_80831DC(param_1); - gDungeon->unk181e8.unk1820F = sub_80831DC(param_1); - gDungeon->unk181e8.hallucinating = sub_80831DC(param_1); - gDungeon->unk181e8.unk18211 = sub_80831DC(param_1); - gDungeon->unk181e8.unk18213 = sub_80831DC(param_1); + 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(unkStruct_8094924 *r0) +void RestoreDungeonMusic(DataSerializer *r0) { - gDungeon->musPlayer.songIndex = sub_8083170(r0); - gDungeon->musPlayer.pastSongIndex = sub_8083170(r0); - gDungeon->musPlayer.queuedSongIndex = sub_8083170(r0); + gDungeon->musPlayer.songIndex = ReadS16(r0); + gDungeon->musPlayer.pastSongIndex = ReadS16(r0); + gDungeon->musPlayer.queuedSongIndex = ReadS16(r0); } -void RestoreItemData(unkStruct_8094924 *r0) { +void RestoreItemData(DataSerializer *r0) { s32 index; Item item; Position pos; @@ -924,22 +940,22 @@ void RestoreItemData(unkStruct_8094924 *r0) { for(index = 0; index < DUNGEON_MAX_ITEMS; index++) { sub_80820A8(r0, &item); - sub_80831F8(r0, &pos); + ReadPosition8(r0, &pos); if(item.flags & ITEM_FLAG_EXISTS) sub_80460F8(&pos, &item, 0); } } -void sub_80820A8(unkStruct_8094924 *param_1, Item *item) +void sub_80820A8(DataSerializer *param_1, Item *item) { memset(item, 0, sizeof(Item)); - sub_8082FE0(param_1,(u32 *)&item->flags,1); - sub_8082FE0(param_1,(u32 *)&item->quantity,1); - sub_8082FE0(param_1,(u32 *)&item->id,1); + ReadBytes(param_1,(u32 *)&item->flags,1); + ReadBytes(param_1,(u32 *)&item->quantity,1); + ReadBytes(param_1,(u32 *)&item->id,1); } -void RestoreTrapData(unkStruct_8094924 *param_1) +void RestoreTrapData(DataSerializer *param_1) { int counter; Tile *tile; @@ -955,10 +971,10 @@ void RestoreTrapData(unkStruct_8094924 *param_1) { trapID = 6; unk1 = 0; - sub_8082FE0(param_1,(u32 *)&trapID,1); - sub_8082FE0(param_1,(u32 *)&unk1,1); - isVisible = sub_80831DC(param_1); - sub_80831F8(param_1, &pos); + ReadBytes(param_1,(u32 *)&trapID,1); + ReadBytes(param_1,(u32 *)&unk1,1); + isVisible = ReadBool8(param_1); + ReadPosition8(param_1, &pos); if(trapID != 0xFF) { @@ -973,29 +989,30 @@ void RestoreTrapData(unkStruct_8094924 *param_1) } } -void sub_808217C(unkStruct_8094924 *param_1) +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] = sub_80831DC(param_1); - gDungeon->plusIsActive[1] = sub_80831DC(param_1); - gDungeon->minusIsActive[0] = sub_80831DC(param_1); - gDungeon->minusIsActive[1] = sub_80831DC(param_1); - gDungeon->decoyActive = sub_80831DC(param_1); - gDungeon->unk37FD = sub_80831DC(param_1); - gDungeon->deoxysDefeat = sub_80831DC(param_1); - gDungeon->unk37FF = sub_80831DC(param_1); - gDungeon->unk3800 = sub_8083158(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++) { - sub_8082280(param_1, TRUE, counter); + RestoreDungeonEntity(param_1, TRUE, counter); } for(counter = 0; counter < DUNGEON_MAX_WILD_POKEMON; counter++) { - sub_8082280(param_1, FALSE, counter); + RestoreDungeonEntity(param_1, FALSE, counter); } } +// RestoreDungeonEntity should be here \ No newline at end of file diff --git a/src/wonder_mail_2.c b/src/wonder_mail_2.c index 7cf6654df..1c42ffa9d 100644 --- a/src/wonder_mail_2.c +++ b/src/wonder_mail_2.c @@ -167,7 +167,7 @@ void sub_802B3E0(void) sUnknown_203B2C8->unk114.clientSpecies = MONSTER_PELIPPER; sUnknown_203B2C8->unk114.unk16 = 2; sUnknown_203B2C8->unk114.moneyReward = 0; - sub_8097790(); + IncrementFriendRescueSuccesses(); mail = GetMailatIndex(sUnknown_203B2C8->unk1); sub_803C37C(&mail->unk4.dungeon, 0, sUnknown_203B2C8->unk114.itemRewards); sUnknown_203B2C8->unk114.teamRankPtsReward = GetDungeonTeamRankPts(&mail->unk4.dungeon, 0); diff --git a/sym_ewram2.txt b/sym_ewram2.txt index 369fb39f6..4bebc1662 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 - sub_8082280) */ +gUnknown_203B410: /* 203B410 (sub_8040150 - RestoreDungeonEntity) */ .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 - sub_8082280) */ +gLeaderPointer: /* 203B450 (xxx_dungeon_8042F6C - RestoreDungeonEntity) */ .space 0x4 .include "src/dungeon_random.o" From ab90cf05001889cad6ea77aecf2286fd61331188 Mon Sep 17 00:00:00 2001 From: Kermalis <29823718+Kermalis@users.noreply.github.com> Date: Sat, 9 Nov 2024 10:35:16 -0500 Subject: [PATCH 04/16] gDungeon->unk644 --- include/structs/str_dungeon.h | 118 ++++++++++++------------ src/code_803D110.c | 20 ++--- src/code_803E724.c | 4 +- src/code_8041AD0.c | 2 +- src/code_804267C.c | 2 +- src/code_8042B34.c | 164 +++++++++++++++++----------------- src/code_8048480.c | 6 +- src/code_805D8C8_1.c | 46 +++++----- src/code_806CD90.c | 20 ++--- src/code_806E8B0.c | 2 +- src/code_806FDF4.c | 16 ++-- src/code_80718D8.c | 24 ++--- src/code_8073CF0.c | 16 ++-- src/code_8077274_1.c | 4 +- src/code_807E1A0.c | 30 +++---- src/code_8084778.c | 2 +- src/code_80848F0.c | 4 +- src/dungeon_action.c | 12 +-- src/dungeon_ai.c | 4 +- src/dungeon_ai_leader.c | 2 +- src/dungeon_ai_targeting.c | 2 +- src/dungeon_cutscenes.c | 10 +-- src/dungeon_engine.c | 16 ++-- src/dungeon_items.c | 2 +- src/dungeon_message.c | 6 +- src/dungeon_move.c | 2 +- src/dungeon_movement.c | 2 +- src/dungeon_music.c | 30 +++---- src/status_actions.c | 2 +- src/trap_1.c | 4 +- 30 files changed, 287 insertions(+), 287 deletions(-) diff --git a/include/structs/str_dungeon.h b/include/structs/str_dungeon.h index 590f23722..3ea209bee 100644 --- a/include/structs/str_dungeon.h +++ b/include/structs/str_dungeon.h @@ -196,12 +196,13 @@ struct unkStruct_Dungeon5C4_sub Entity *unkC; }; -struct unkStruct_Dungeon64C +// size: 0x8 +typedef struct unkStruct_Dungeon64C { u8 unk0; u8 unk1; u32 unk4; -}; +} unkStruct_Dungeon64C; #define UNK_1BBD4_STR_COUNT 10 @@ -230,6 +231,56 @@ struct MessageLogString u8 str[MESSAGE_LOG_BUFFER_SIZE]; }; +// size: 0x58 +typedef struct unkDungeon644 +{ + /* 0x0 */ DungeonLocation dungeonLocation; + /* 0x4 */ DungeonLocation dungeonLocation2; + /* 0x8 */ unkStruct_Dungeon64C unk8; + /* 0x10 */ u8 unk10; + /* 0x11 */ u8 fill11[3]; + /* 0x14 */ u8 unk14; + /* 0x15 */ u8 unk15; + /* 0x16 */ u8 unk16; + /* 0x17 */ u8 unk17; + /* 0x18 */ u8 unk18; + /* 0x19 */ u8 unk19; + /* 0x1A */ u8 fill1A[2]; + /* 0x1C */ s16 fractionalTurn; // Handles turn order when Pokémon have different movement speeds. + /* 0x1E */ s16 unk1E; + /* 0x20 */ s16 unk20; + /* 0x22 */ s16 windTurns; // Turns remaining before getting swept out of the dungeon. + /* 0x24 */ u16 unk24; + /* 0x26 */ u16 bossSongIndex; + /* 0x28 */ u8 unk28; + /* 0x29 */ u8 unk29; + /* 0x2A */ u8 unk2A; + /* 0x2B */ u8 unk2B; + /* 0x2C */ u8 unk2C; + /* 0x2D */ bool8 monsterHouseTriggered; + /* 0x2E */ bool8 monsterHouseTriggeredEvent; + /* 0x2F */ u8 unk2F; + /* 0x30 */ u8 unk30; + /* 0x31 */ u8 unk31; + /* 0x32 */ bool8 itemHoldersIdentified; + /* 0x33 */ u8 fill33; + /* 0x34 */ u8 unk34; + /* 0x35 */ u8 unk35; + /* 0x36 */ u8 unk36; + /* 0x37 */ s8 unk37; + /* 0x38 */ u32 unk38; + /* 0x3C */ u32 unk3C; + /* 0x40 */ s16 unk40; + /* 0x42 */ s16 unk42; + /* 0x44 */ s16 unk44; + /* 0x46 */ u8 unk46; + /* 0x48 */ s32 unk48; + /* 0x4C */ s32 unk4C; + /* 0x50 */ s32 unk50; + /* 0x54 */ u8 unk54; + /* 0x55 */ u8 unk55; +} unkDungeon644; + // size: 0x1CEDC typedef struct Dungeon { @@ -264,61 +315,10 @@ typedef struct Dungeon /* 0x5C0 */ s32 unk5C0; /* 0x5C4 */ struct unkStruct_Dungeon5C4_sub unk5C4[3]; /* 0x5F4 */ u8 faintStringBuffer[80]; - - // TODO: This is the start of a struct that is 0x58 bytes (dungeon data that persists between save/reload). See sub_8080B90 and sub_8081C50 - /* 0x644 */ DungeonLocation dungeonLocation; - /* 0x648 */ DungeonLocation dungeonLocation2; - struct unkStruct_Dungeon64C unk64C; - u8 unk654; - u8 fill655; - u8 fill656; - u8 fill657; - u8 unk658; - u8 unk659; - u8 unk65A; - u8 unk65B; - u8 unk65C; - u8 unk65D; - u8 fill65e[2]; - /* 0x660 */ s16 fractionalTurn; // Handles turn order when Pokémon have different movement speeds. - s16 unk662; - s16 unk664; - /* 0x666 */ s16 windTurns; // Turns remaining before getting swept out of the dungeon. - /* 0x668 */ u16 unk668; - u16 bossSongIndex; - u8 unk66C; - u8 unk66D; - /* 0x66E */ u8 unk66E; - u8 unk66F; - u8 unk670; - /* 0x671 */ bool8 monsterHouseTriggered; - /* 0x672 */ bool8 monsterHouseTriggeredEvent; - u8 unk673; - u8 unk674; - u8 unk675; - /* 0x676 */ bool8 itemHoldersIdentified; - u8 unk677; - u8 unk678; - u8 unk679; - u8 unk67A; - s8 unk67B; - u32 unk67C; - u32 unk680; - s16 unk684; - s16 unk686; - s16 unk688; - /* 0x68A */ u8 unk68A; - u8 fill68B; - s32 unk68C; - s32 unk690; - s32 unk694; - u8 unk698; - u8 unk699; - u8 fill69A[2]; - - EntityInfo unk69C[4]; - EntityInfo unkEBC[1]; // Unsure about the size... See sub_8082A08() - u8 fill10C4[0x343C - 0x10C4]; + unkDungeon644 unk644; // This data persists between save/reload. See sub_8080B90 and sub_8081C50 + EntityInfo unk69C[MAX_TEAM_MEMBERS]; + EntityInfo unkEBC[DUNGEON_MAX_WILD_POKEMON_BODY_SIZE]; + u8 fill2F3C[0x343C - 0x2F3C]; /* 0x343C */ UnkDungeonGlobal_unk1CD98 unk343C[32]; u8 fill353C[0x363c-0x353c]; /* 0x363C */ u8 expYieldRankings[NUM_MONSTERS]; @@ -335,9 +335,9 @@ typedef struct Dungeon /* 0x37FE */ bool8 deoxysDefeat; // Flag set for deoxys in Meteor Cave /* 0x37FE */ u8 unk37FF; s16 unk3800; - u8 fill3802[0x3904 - 0x3802]; + EntityInfo *unk3804[DUNGEON_MAX_ITEMS]; /* 0x3904 */ s16 unk3904; - u8 fill3906[0x3A08 - 0x3906]; + EntityInfo *unk3908[DUNGEON_MAX_TRAPS]; /* 0x3A08 */ u8 unk3A08; /* 0x3A09 */ u8 unk3A09; /* 0x3A0A */ u8 unk3A0A; diff --git a/src/code_803D110.c b/src/code_803D110.c index 937591752..126b5a68d 100644 --- a/src/code_803D110.c +++ b/src/code_803D110.c @@ -83,17 +83,17 @@ void sub_803D4D0(void) OpenedFile *file; struct UnkDungeonFileData *strPtr; - sub_80901D8(&gDungeon->dungeonLocation2, &gDungeon->dungeonLocation); - if (gDungeon->unk1C570.id == gDungeon->dungeonLocation2.id && gDungeon->unk1C570.floor == gDungeon->dungeonLocation2.floor) + sub_80901D8(&gDungeon->unk644.dungeonLocation2, &gDungeon->unk644.dungeonLocation); + if (gDungeon->unk1C570.id == gDungeon->unk644.dungeonLocation2.id && gDungeon->unk1C570.floor == gDungeon->unk644.dungeonLocation2.floor) return; - gDungeon->unk1C570 = gDungeon->dungeonLocation2; + gDungeon->unk1C570 = gDungeon->unk644.dungeonLocation2; file = OpenFileAndGetFileDataPtr(gUnknown_80F4D8C, &gDungeonFileArchive); strPtr = &file->data.dungData->unk0[gDungeon->unk1C570.id][gDungeon->unk1C570.floor]; - gDungeon->unk1CEC8 = GetDungeonFloorCount(gDungeon->dungeonLocation.id); - gDungeon->unk14 = sub_80902C8(gDungeon->dungeonLocation.id); + gDungeon->unk1CEC8 = GetDungeonFloorCount(gDungeon->unk644.dungeonLocation.id); + gDungeon->unk14 = sub_80902C8(gDungeon->unk644.dungeonLocation.id); gDungeon->unk1C574 = file->data.dungData->unk4[strPtr->unk0]; @@ -564,8 +564,8 @@ void ShowDungeonNameBanner(void) } CpuClear((void *)(VRAM + 0x140), 0x1C00); if (sub_80848EC()) { - s32 r8 = gDungeon->dungeonLocation.floor + gDungeon->unk14; - const u8 *dungName = GetDungeonName2(gDungeon->dungeonLocation.id); + s32 r8 = gDungeon->unk644.dungeonLocation.floor + gDungeon->unk14; + const u8 *dungName = GetDungeonName2(gDungeon->unk644.dungeonLocation.id); s32 r5 = 10; for (r7 = 0; r7 < 8; r7++) { @@ -579,7 +579,7 @@ void ShowDungeonNameBanner(void) } var = sub_803DC14(dungName, (224 - CalcStringWidth(dungName)) / 2, 0); - if (IsStairDirectionUp(gDungeon->dungeonLocation.id)) + if (IsStairDirectionUp(gDungeon->unk644.dungeonLocation.id)) r6 = gUnknown_80F6108; else r6 = gUnknown_80F610C; @@ -1069,11 +1069,11 @@ void sub_803E178(void) s32 val = sub_8043D10(); if (val == 0) { - if (gDungeon->dungeonLocation.id == DUNGEON_METEOR_CAVE && !gDungeon->deoxysDefeat) { + if (gDungeon->unk644.dungeonLocation.id == DUNGEON_METEOR_CAVE && !gDungeon->deoxysDefeat) { gDungeon->unk3A12 = 28; } else { - gDungeon->unk3A12 = (IsStairDirectionUp(gDungeon->dungeonLocation.id) != FALSE) ? 23 : 22; + gDungeon->unk3A12 = (IsStairDirectionUp(gDungeon->unk644.dungeonLocation.id) != FALSE) ? 23 : 22; } } else if (val == 1) { diff --git a/src/code_803E724.c b/src/code_803E724.c index 0a5f9dfab..e8c45e0ab 100644 --- a/src/code_803E724.c +++ b/src/code_803E724.c @@ -1313,10 +1313,10 @@ void sub_803FB74(void) } arrPtr = gUnknown_202B038[0][0]; - unkFloor = gDungeon->unk14 + gDungeon->dungeonLocation.floor; + unkFloor = gDungeon->unk14 + gDungeon->unk644.dungeonLocation.floor; if (strPtr->unk3A != unkFloor) { strPtr->unk3A = unkFloor; - if (IsStairDirectionUp(gDungeon->dungeonLocation.id)) { + if (IsStairDirectionUp(gDungeon->unk644.dungeonLocation.id)) { arrPtr[1] = 0; } else { diff --git a/src/code_8041AD0.c b/src/code_8041AD0.c index ad6964532..c9f2733cc 100644 --- a/src/code_8041AD0.c +++ b/src/code_8041AD0.c @@ -221,7 +221,7 @@ void EntityUpdateStatusSprites(Entity *entity) spriteStatus = spriteStatus | STATUS_SPRITE_LOWHP; } } - if ((gDungeon->itemHoldersIdentified) && (entityInfo->heldItem.flags & ITEM_FLAG_EXISTS)) { + if ((gDungeon->unk644.itemHoldersIdentified) && (entityInfo->heldItem.flags & ITEM_FLAG_EXISTS)) { spriteStatus = spriteStatus | STATUS_SPRITE_LOWHP; } if ( (entityInfo->offensiveMultipliers[0] < DEFAULT_STAT_MULTIPLIER) || diff --git a/src/code_804267C.c b/src/code_804267C.c index 9983217bb..6af03624f 100644 --- a/src/code_804267C.c +++ b/src/code_804267C.c @@ -42,7 +42,7 @@ void PlayStairsSound(void) switch (sub_8043D10()) { case 0: default: - songIndex = IsStairDirectionUp(gDungeon->dungeonLocation.id) ? 340 : 341; + songIndex = IsStairDirectionUp(gDungeon->unk644.dungeonLocation.id) ? 340 : 341; break; case 1: case 2: diff --git a/src/code_8042B34.c b/src/code_8042B34.c index aa684d283..84f43a339 100644 --- a/src/code_8042B34.c +++ b/src/code_8042B34.c @@ -266,7 +266,7 @@ struct UnkStruct_xxx_dungeon_8042F6C u8 unkF; u8 unk10; u8 unk11; - struct unkStruct_Dungeon64C unk14; + unkStruct_Dungeon64C unk14; PokemonStruct1 unk1C; u8 *unk74; Dungeon *unk78; @@ -437,20 +437,20 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) gUnknown_203B410 = 100; if (!r6) { - gDungeon->unk678 = r8->unkF; - gDungeon->unk64C = r8->unk14; - gDungeon->windTurns = GetTurnLimit(r8->unk4.id); - gDungeon->unk67A = 0; - gDungeon->unk67B = GetRescuesAllowed(r8->unk4.id); + gDungeon->unk644.unk34 = r8->unkF; + gDungeon->unk644.unk8 = r8->unk14; + gDungeon->unk644.windTurns = GetTurnLimit(r8->unk4.id); + gDungeon->unk644.unk36 = 0; + gDungeon->unk644.unk37 = GetRescuesAllowed(r8->unk4.id); } - gDungeon->unk698 = 0; - gDungeon->unk699 = 0; - gDungeon->unk65C = r8->unk9; - gDungeon->unk65A = r8->unkC; - gDungeon->unk658 = r8->unkA; - gDungeon->unk659 = r8->unkB; - gDungeon->unk65B = r8->unkD; - gDungeon->unk65D = r8->unkE; + gDungeon->unk644.unk54 = 0; + gDungeon->unk644.unk55 = 0; + gDungeon->unk644.unk18 = r8->unk9; + gDungeon->unk644.unk16 = r8->unkC; + gDungeon->unk644.unk14 = r8->unkA; + gDungeon->unk644.unk15 = r8->unkB; + gDungeon->unk644.unk17 = r8->unkD; + gDungeon->unk644.unk19 = r8->unkE; StopDungeonBGM(); sub_803D4AC(); sub_804513C(); @@ -479,35 +479,35 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) if (!r6) { gDungeon->unk181e8.unk1820B = 1; gDungeon->unk181e8.unk1820C = 1; - if (gDungeon->unk678 == 1) { - gDungeon->dungeonLocation.id = r8->unk14.unk0; - gDungeon->dungeonLocation.floor = 1; + if (gDungeon->unk644.unk34 == 1) { + gDungeon->unk644.dungeonLocation.id = r8->unk14.unk0; + gDungeon->unk644.dungeonLocation.floor = 1; } else { - gDungeon->dungeonLocation = r8->unk4; + gDungeon->unk644.dungeonLocation = r8->unk4; } - gDungeon->unk674 = 0; + gDungeon->unk644.unk30 = 0; EnforceMaxItemsAndMoney(); } if (!r6) { - if (gDungeon->unk678 == 1) { - gDungeon->unk67C = r8->unk14.unk4; + if (gDungeon->unk644.unk34 == 1) { + gDungeon->unk644.unk38 = r8->unk14.unk4; } else { - gDungeon->unk67C = Rand32Bit() & 0xFFFFFF; + gDungeon->unk644.unk38 = Rand32Bit() & 0xFFFFFF; } - sub_808408C(gDungeon->unk67C); + sub_808408C(gDungeon->unk644.unk38); } if (!r6) { - if (!sub_80980A4() && gDungeon->dungeonLocation.id == DUNGEON_TINY_WOODS) { + if (!sub_80980A4() && gDungeon->unk644.dungeonLocation.id == DUNGEON_TINY_WOODS) { sub_8043FD0(); } sub_806890C(); } if (r9) { - gFormatArgs[0] = gDungeon->unk67B; + gFormatArgs[0] = gDungeon->unk644.unk37; if (gFormatArgs[0] != 0) { DisplayDungeonMessage(0, gUnknown_80FEC48, 1); } @@ -518,7 +518,7 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) if (r10) { r8->unk1C.heldItem.id = 0; - if (IsLevelResetTo1(gDungeon->dungeonLocation.id)) { + if (IsLevelResetTo1(gDungeon->unk644.dungeonLocation.id)) { sub_808D0D8(&r8->unk1C); } sub_8068A84(&r8->unk1C); @@ -528,7 +528,7 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) } sub_8068614(); - if (!r6 && gDungeon->unk678 == 1) { + if (!r6 && gDungeon->unk644.unk34 == 1) { if (sub_8099394(&sp)) { unkStruct_203B480 *mailStr = GetMailatIndex(sp); if (mailStr->rescuesAllowed) { @@ -553,9 +553,9 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) gLeaderPointer = NULL; gDungeon->unk0 = 0; if (!r6) { - gDungeon->unk680 = YetAnotherRandom24(); - gDungeon->unk668 = 10; - InitDungeonRNG(gDungeon->unk680); + gDungeon->unk644.unk3C = YetAnotherRandom24(); + gDungeon->unk644.unk24 = 10; + InitDungeonRNG(gDungeon->unk644.unk3C); } gDungeon->unk37EC = 0; if (!r6) { @@ -567,7 +567,7 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) gDungeon->deoxysDefeat = FALSE; gDungeon->unk3800 = gUnknown_80F6850[rnd]; gDungeon->unk37FF = 0; - gDungeon->unk675 = 0; + gDungeon->unk644.unk31 = 0; } sub_803D4D0(); gDungeon->unk1 = 0; @@ -588,23 +588,23 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) gDungeon->unkE = 0; gDungeon->unk1BDD4.unk1C05E = 0; if (!r6) { - gDungeon->unk679 = 0; - gDungeon->unk68C = 0; - gDungeon->unk690 = 0; - gDungeon->unk694 = 0; - gDungeon->fractionalTurn = 0; - gDungeon->unk662 = 0; - gDungeon->unk66E = 0; - gDungeon->unk66F = 0; - gDungeon->unk670 = 0; - gDungeon->itemHoldersIdentified = 0; - gDungeon->monsterHouseTriggered = 0; - gDungeon->monsterHouseTriggeredEvent = 0; - gDungeon->bossSongIndex = 999; - gDungeon->unk688 = 0; - gDungeon->unk68A = 0; - gDungeon->unk684 = 99; - gDungeon->unk686 = 99; + gDungeon->unk644.unk35 = 0; + gDungeon->unk644.unk48 = 0; + gDungeon->unk644.unk4C = 0; + gDungeon->unk644.unk50 = 0; + gDungeon->unk644.fractionalTurn = 0; + gDungeon->unk644.unk1E = 0; + gDungeon->unk644.unk2A = 0; + gDungeon->unk644.unk2B = 0; + gDungeon->unk644.unk2C = 0; + gDungeon->unk644.itemHoldersIdentified = 0; + gDungeon->unk644.monsterHouseTriggered = 0; + gDungeon->unk644.monsterHouseTriggeredEvent = 0; + gDungeon->unk644.bossSongIndex = 999; + gDungeon->unk644.unk44 = 0; + gDungeon->unk644.unk46 = 0; + gDungeon->unk644.unk40 = 99; + gDungeon->unk644.unk42 = 99; gDungeon->weather.weather = 0; gDungeon->tileset = gDungeon->unk1C574.unk2; gDungeon->unk3A10 = gDungeon->unk1C574.unk3; @@ -639,8 +639,8 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) if (!r6) { sub_804AFAC(); - gDungeon->windTurns = GetTurnLimit(gDungeon->dungeonLocation.id); - gDungeon->unk67A = 0; + gDungeon->unk644.windTurns = GetTurnLimit(gDungeon->unk644.dungeonLocation.id); + gDungeon->unk644.unk36 = 0; } sub_804AAD4(); sub_8049B8C(); @@ -663,8 +663,8 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) if (!r6) { sub_807FA18(); sub_8045CB0(); - gDungeon->unk694 = gDungeon->unk68C; - gDungeon->unk690 = 0; + gDungeon->unk644.unk50 = gDungeon->unk644.unk48; + gDungeon->unk644.unk4C = 0; sub_8051E3C(); sub_804AAAC(); } @@ -706,8 +706,8 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) sub_8040150(r6); sub_8040A84(); gDungeon->unkB8 = NULL; - gDungeon->unk66C = 0; - gDungeon->unk66D = 0; + gDungeon->unk644.unk28 = 0; + gDungeon->unk644.unk29 = 0; gDungeon->unk12 = 99; gDungeon->unk0 = 1; @@ -757,7 +757,7 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) if (gDungeon->unk5 == 0) { bool8 param = TRUE; - gDungeon->unk654 = 0; + gDungeon->unk644.unk10 = 0; gDungeon->unk181e8.unk18218 = 0; gDungeon->unk181e8.unk18219 = 1; do { @@ -771,12 +771,12 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) sub_8071DA4(leader); } - if (gDungeon->unk654 != 1) { + if (gDungeon->unk644.unk10 != 1) { if (sub_8043ED0(TRUE)) { - gDungeon->unk654 = 1; + gDungeon->unk644.unk10 = 1; } } - if (gDungeon->unk654 == 1 || gDungeon->unk11 != 0) { + if (gDungeon->unk644.unk10 == 1 || gDungeon->unk11 != 0) { if (gDungeon->unk6 == 0) { sub_806AA70(); } @@ -794,7 +794,7 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) if (gDungeon->unk3 == 0 && gDungeon->unk6 == 0 && gDungeon->musPlayer.queuedSongIndex == 0x72 - && gDungeon->dungeonLocation.id == DUNGEON_BURIED_RELIC) + && gDungeon->unk644.dungeonLocation.id == DUNGEON_BURIED_RELIC) { DungeonFadeOutBGM(60); } @@ -826,7 +826,7 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) if (gDungeon->unk3 != 0) { WriteDungeonState(gSerializedData_203B41C, 0x4800); r8->unk7C = 3; - r8->unk80 = gDungeon->dungeonLocation; + r8->unk80 = gDungeon->unk644.dungeonLocation; check = FALSE; } else @@ -841,8 +841,8 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) } sub_806C1D8(); - if (gDungeon->unk654 == 1) { - if (gDungeon->unk66E != 0) { + if (gDungeon->unk644.unk10 == 1) { + if (gDungeon->unk644.unk2A != 0) { sub_804700C(); } check = TRUE; @@ -853,14 +853,14 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) } else if (gDungeon->unk11 == 2) { sub_8083AB0(0x229, NULL, GetLeader()); - if (gDungeon->unk66E != 0) { + if (gDungeon->unk644.unk2A != 0) { IncrementThievingSuccesses(); } check = TRUE; } else if (gDungeon->unk11 == 3) { sub_8083AB0(0x22A, NULL, GetLeader()); - if (gDungeon->unk66E != 0) { + if (gDungeon->unk644.unk2A != 0) { IncrementThievingSuccesses(); } check = TRUE; @@ -870,21 +870,21 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) sub_8083AB0(var, NULL, GetLeader()); check = TRUE; } - else if (gDungeon->unk678 == 1 && sub_8043D10() == 2 && gDungeon->unk654 == 2) { + else if (gDungeon->unk644.unk34 == 1 && sub_8043D10() == 2 && gDungeon->unk644.unk10 == 2) { sub_8083AB0(0x228, NULL, GetLeader()); - if (gDungeon->unk66E != 0) { + if (gDungeon->unk644.unk2A != 0) { IncrementThievingSuccesses(); } check = TRUE; } else { - if (gDungeon->unk66E != 0) { + if (gDungeon->unk644.unk2A != 0) { IncrementThievingSuccesses(); } - if (gDungeon->dungeonLocation.floor + 1 < gDungeon->unk1CEC8) { - gDungeon->dungeonLocation.floor++; - if (gDungeon->dungeonLocation.id == DUNGEON_FROSTY_FOREST - && gDungeon->dungeonLocation.floor == 6 + if (gDungeon->unk644.dungeonLocation.floor + 1 < gDungeon->unk1CEC8) { + gDungeon->unk644.dungeonLocation.floor++; + if (gDungeon->unk644.dungeonLocation.id == DUNGEON_FROSTY_FOREST + && gDungeon->unk644.dungeonLocation.floor == 6 && !sub_8098100(0x1F)) { sub_8097FA8(0x1F); @@ -917,7 +917,7 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) sub_80095CC(1, 0x14); sub_803E13C(); sub_800CDA8(4); - if (gDungeon->unk6 == 0 && sub_8083C88(gDungeon->unk678)) { + if (gDungeon->unk6 == 0 && sub_8083C88(gDungeon->unk644.unk34)) { sub_80841EC(); } @@ -925,9 +925,9 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) if (gDungeon->unk6 != 0) { r8->unk7C = -2; memset(&r8->unk84, 0, sizeof(r8->unk84)); - r8->unk80 = gDungeon->dungeonLocation; - r8->unk84.a0 = gDungeon->dungeonLocation; - r8->unk84.a4 = gDungeon->unk67C; + r8->unk80 = gDungeon->unk644.dungeonLocation; + r8->unk84.a0 = gDungeon->unk644.dungeonLocation; + r8->unk84.a4 = gDungeon->unk644.unk38; } else { @@ -935,10 +935,10 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) } } else if (sub_8083C50()) { - if (gDungeon->unk678 == 1) { + if (gDungeon->unk644.unk34 == 1) { r8->unk7C = 4; } - else if (gDungeon->unk678 == 0) { + else if (gDungeon->unk644.unk34 == 0) { r8->unk7C = 1; sub_8084424(); } @@ -946,7 +946,7 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) r8->unk7C = 1; sub_8084424(); } - r8->unk7E = gDungeon->unk674; + r8->unk7E = gDungeon->unk644.unk30; } else { r8->unk7C = 2; @@ -994,7 +994,7 @@ bool8 sub_8043CE4(s32 dungeonId) u8 sub_8043D10(void) { - if (gDungeon->unk678 == 1 && gDungeon->unk64C.unk1 == gDungeon->dungeonLocation.floor) + if (gDungeon->unk644.unk34 == 1 && gDungeon->unk644.unk8.unk1 == gDungeon->unk644.dungeonLocation.floor) return 2; else if (IsBossFight()) return 1; @@ -1042,7 +1042,7 @@ void sub_8043D60(void) monInfo = GetEntInfo(mon); monInfo->HP = monInfo->maxHPStat; monInfo->belly = monInfo->maxBelly; - gDungeon->itemHoldersIdentified = FALSE; + gDungeon->unk644.itemHoldersIdentified = FALSE; sub_806BFC0(monInfo, 0); monInfo->apparentID = monInfo->id; monInfo->perishSongTurns = 0; @@ -1184,7 +1184,7 @@ void EnforceMaxItemsAndMoney(void) { s32 i; - if (GetMaxItemsAllowed(gDungeon->dungeonLocation.id) == 0) + if (GetMaxItemsAllowed(gDungeon->unk644.dungeonLocation.id) == 0) { for (i = 0; i < INVENTORY_SIZE; i++) { ZeroOutItem(&gTeamInventoryRef->teamItems[i]); @@ -1197,7 +1197,7 @@ void EnforceMaxItemsAndMoney(void) } } - if (!IsKeepMoney(gDungeon->dungeonLocation.id)) { + if (!IsKeepMoney(gDungeon->unk644.dungeonLocation.id)) { gTeamInventoryRef->teamMoney = 0; } } diff --git a/src/code_8048480.c b/src/code_8048480.c index 18379e717..50a17f16f 100644 --- a/src/code_8048480.c +++ b/src/code_8048480.c @@ -687,7 +687,7 @@ void BlastSeedItemAction(Entity *pokemon, Entity * target, u8 param_3) if (param_3 != 0) { entityInfo = GetEntInfo(target); entityInfo_1 = entityInfo; - if (gDungeon->unk675 != 0) { + if (gDungeon->unk644.unk31 != 0) { uVar1 = gUnknown_80F4FA8; TryDisplayDungeonLoggableMessage3(pokemon, target, *gUnknown_80FEAE8); } @@ -710,7 +710,7 @@ void BlastSeedItemAction(Entity *pokemon, Entity * target, u8 param_3) else { entityInfo = GetEntInfo(entity); - if (gDungeon->unk675 != 0) { + if (gDungeon->unk644.unk31 != 0) { uVar1 = gUnknown_80F4FAA; TryDisplayDungeonLoggableMessage3(pokemon, target, *gUnknown_80FEAE8); } @@ -870,7 +870,7 @@ bool8 sub_8048A68(Entity *param_1,Item *item) } else { - if (gDungeon->unk65C == 0) { + if (gDungeon->unk644.unk18 == 0) { DisplayDungeonMessage(0,*gUnknown_80F9BD8,1); return FALSE; } diff --git a/src/code_805D8C8_1.c b/src/code_805D8C8_1.c index 8d0a9ccc9..ee7b804a5 100644 --- a/src/code_805D8C8_1.c +++ b/src/code_805D8C8_1.c @@ -171,7 +171,7 @@ void DungeonHandlePlayerInput(void) return; } - gDungeon->unk673 = 0; + gDungeon->unk644.unk2F = 0; sub_8040A78(); if (gDungeon->unk1 != 0) { gDungeon->unk1 = 0; @@ -193,7 +193,7 @@ void DungeonHandlePlayerInput(void) EntityInfo *leaderInfo = GetEntInfo(leader); sub_80978C8(leaderInfo->id); - if (gDungeon->unk66C != 0) { + if (gDungeon->unk644.unk28 != 0) { if (sub_805E874() != 0) { leaderInfo->action.action = 2; leaderInfo->action.unk4[0].actionUseIndex = 0; @@ -248,7 +248,7 @@ void DungeonHandlePlayerInput(void) if (gRealInputs.held & A_BUTTON && gRealInputs.held & B_BUTTON && FixedPointToInt(leaderInfo->belly) != 0) { sub_8044C50(1); - gDungeon->unk673 = 1; + gDungeon->unk644.unk2F = 1; break; } @@ -259,14 +259,14 @@ void DungeonHandlePlayerInput(void) if (gRealInputs.held & B_BUTTON) { if (FixedPointToInt(leaderInfo->belly) != 0) { sub_8044C50(1); - gDungeon->unk673 = 1; + gDungeon->unk644.unk2F = 1; break; } } else if (ShouldMonsterRunAwayAndShowEffect(leader, TRUE)) { TryDisplayDungeonLoggableMessage(leader, gUnknown_80FD4B0); sub_8044C50(1); - gDungeon->unk673 = 1; + gDungeon->unk644.unk2F = 1; break; } else if (gRealInputs.held & L_BUTTON) { @@ -460,7 +460,7 @@ void DungeonHandlePlayerInput(void) sub_803E46C(0x2F); } - if (gDungeon->unk66D != 0 && !sInDiagonalMode) { + if (gDungeon->unk644.unk29 != 0 && !sInDiagonalMode) { dpadDiagonal = dpadSimple = gRealInputs.pressed; } else { @@ -532,13 +532,13 @@ void DungeonHandlePlayerInput(void) TryDisplayDungeonLoggableMessage(leader, immobilizedMsg); } sub_8044C50(1); - gDungeon->unk673 = 1; + gDungeon->unk644.unk2F = 1; } else { sub_8044C50(2); if ((gRealInputs.held & B_BUTTON || bPress) && FixedPointToInt(leaderInfo->belly) != 0) { if (GetEntInfo(leader)->volatileStatus.volatileStatus != STATUS_CONFUSED) { - gDungeon->unk66C = 1; + gDungeon->unk644.unk28 = 1; } leaderInfo->action.unk4[0].actionUseIndex = 0; } @@ -568,7 +568,7 @@ void DungeonHandlePlayerInput(void) sub_8044C50(0); } else if ((r6.a0_8) == 0) { - gDungeon->unk66D = 0; + gDungeon->unk644.unk29 = 0; if (leaderInfo->action.action != 0) { if (!IsNotAttacking(leader, FALSE)) { sub_803E46C(0xF); @@ -1380,9 +1380,9 @@ void sub_805E738(Entity *a0) void sub_805E804(void) { - gDungeon->unk66D |= gDungeon->unk66C; - gDungeon->unk66C = 0; - while (gDungeon->unk66D != 0 && gRealInputs.held & R_BUTTON) { + gDungeon->unk644.unk29 |= gDungeon->unk644.unk28; + gDungeon->unk644.unk28 = 0; + while (gDungeon->unk644.unk29 != 0 && gRealInputs.held & R_BUTTON) { sub_803E46C(0x54); } } @@ -1406,7 +1406,7 @@ bool8 sub_805E874(void) s32 yAdjacent = y + gAdjacentTileOffsets[direction].y; s32 room; - if (dungeon->unk66C == 0) + if (dungeon->unk644.unk28 == 0) return FALSE; if (leaderTile->object != NULL) return FALSE; @@ -1719,11 +1719,11 @@ void sub_805F02C(void) else if (sub_8047084(ITEM_FLAG_IN_SHOP) || sub_807EF48()) { DisplayDungeonLoggableMessageTrue(r7, gUnknown_80F9C08); } - else if (gDungeon->unk66E) { + else if (gDungeon->unk644.unk2A) { DisplayDungeonLoggableMessageTrue(r7, gUnknown_80F9C2C); } else { - gDungeon->unk679 = 0; + gDungeon->unk644.unk35 = 0; r8->isTeamLeader = TRUE; leaderInfo->isTeamLeader = FALSE; for (i = 0; i < 4; i++) { @@ -2891,7 +2891,7 @@ void sub_8060900(Entity *a0) sub_8044F5C(9, item->id); if (GetItemCategory(item->id) != CATEGORY_POKE) { bool32 r2 = 0; - if (gDungeon->unk65B != 0) { + if (gDungeon->unk644.unk17 != 0) { if (gTeamInventoryRef->teamItems[INVENTORY_SIZE - 1].flags & ITEM_FLAG_EXISTS) { r2 = TRUE; } @@ -2905,7 +2905,7 @@ void sub_8060900(Entity *a0) } } } - if (sUnknownActionUnk4.actionUseIndex == 128 && gDungeon->unk65B != 0) { + if (sUnknownActionUnk4.actionUseIndex == 128 && gDungeon->unk644.unk17 != 0) { sub_8044F5C(10, item->id); } val_sub8044DC8 = sub_8044DC8(item); @@ -2965,7 +2965,7 @@ void sub_8060900(Entity *a0) } } } - else if (gDungeon->unk65B) { + else if (gDungeon->unk644.unk17) { if (gTeamInventoryRef->teamItems[INVENTORY_SIZE - 1].flags & ITEM_FLAG_EXISTS) { sub_8044F5C(0x3E, item->id); } @@ -3026,7 +3026,7 @@ void sub_8060900(Entity *a0) if (GetItemCategory(item->id) == CATEGORY_TMS_HMS) r5 = TRUE; if (GetItemCategory(item->id) == CATEGORY_ORBS) r5 = TRUE; - if (gDungeon->unk65B) { + if (gDungeon->unk644.unk17) { if (r4) { sub_8044F5C(0x3E, item->id); } @@ -3095,7 +3095,7 @@ s32 sub_8060D64(s16 *a0, bool8 a1, bool8 a2, bool8 a3, Entity *a4) s32 i; s32 count = 0; - if (gDungeon->unk65B && !a1) { + if (gDungeon->unk644.unk17 && !a1) { if (gTeamInventoryRef->teamItems[0].flags & ITEM_FLAG_EXISTS) { a0[count++] = 0; } @@ -3161,7 +3161,7 @@ bool8 sub_8060E38(Entity *a0) } } - if (!gDungeon->unk65B) { + if (!gDungeon->unk644.unk17) { var_84.a0[0].unk4 = 3; var_84.a0[0].unk8.unk0.arr[1]++; } @@ -3438,7 +3438,7 @@ void sub_806145C(struct UnkFieldTeamMenuStruct *a0) sub_8044F5C(0x1B, 0); sub_8044F5C(0x19, 0); if (!monInfo->isTeamLeader) { - if (!gDungeon->unk65D && (monInfo->joinedAt.joinedAt != DUNGEON_JOIN_LOCATION_PARTNER || gDungeon->unk65C)) { + if (!gDungeon->unk644.unk19 && (monInfo->joinedAt.joinedAt != DUNGEON_JOIN_LOCATION_PARTNER || gDungeon->unk644.unk18)) { sub_8044F5C(0x34, 0); } sub_8044F5C(0x1C, 0); @@ -3447,7 +3447,7 @@ void sub_806145C(struct UnkFieldTeamMenuStruct *a0) if (!monInfo->isTeamLeader) { sub_8044F5C(0x1A, 0); } - if (!monInfo->isTeamLeader && gDungeon->unk65C && CanLeaderSwitch(gDungeon->dungeonLocation.id)) { + if (!monInfo->isTeamLeader && gDungeon->unk644.unk18 && CanLeaderSwitch(gDungeon->unk644.dungeonLocation.id)) { bool32 r5; sub_8044F5C(0x3B, 0); diff --git a/src/code_806CD90.c b/src/code_806CD90.c index bfa7ca71b..a0414a9c0 100644 --- a/src/code_806CD90.c +++ b/src/code_806CD90.c @@ -736,7 +736,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc } else { PokemonStruct2 *recruitedMon = &gRecruitedPokemonRef->pokemon2[targetData->teamIndex]; - if (targetData->isTeamLeader || (targetData->joinedAt.joinedAt == DUNGEON_JOIN_LOCATION_PARTNER && gDungeon->unk65C == 0)) { + if (targetData->isTeamLeader || (targetData->joinedAt.joinedAt == DUNGEON_JOIN_LOCATION_PARTNER && gDungeon->unk644.unk18 == 0)) { DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80F9CEC[r8]); } else if (IsClientOrTeamBase(targetData->joinedAt.joinedAt)) { @@ -746,7 +746,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80F9DF0[r8]); } else if (sub_806A58C(recruitedMon->unkA)) { - if (gDungeon->unk65D != 0) { + if (gDungeon->unk644.unk19 != 0) { DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80F9D8C[r8]); } else { @@ -775,8 +775,8 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc targetData->unk14C = 1; targetData->belly = targetData->maxBelly; if (targetData->isTeamLeader) { - gDungeon->unk679 = 0; - gDungeon->itemHoldersIdentified = 0; + gDungeon->unk644.unk35 = 0; + gDungeon->unk644.itemHoldersIdentified = 0; } ZeroOutItem(&targetData->heldItem); if (targetData->waitingStruct.waitingStatus == STATUS_SNATCH) { @@ -832,8 +832,8 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc targetData->unk14C = 1; targetData->belly = targetData->maxBelly; if (targetData->isTeamLeader) { - gDungeon->unk679 = 0; - gDungeon->itemHoldersIdentified = 0; + gDungeon->unk644.unk35 = 0; + gDungeon->unk644.itemHoldersIdentified = 0; } ZeroOutItem(heldItem); if (targetData->waitingStruct.waitingStatus == STATUS_SNATCH) { @@ -887,8 +887,8 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc targetData->unk14C = 1; targetData->belly = targetData->maxBelly; if (targetData->isTeamLeader) { - gDungeon->unk679 = 0; - gDungeon->itemHoldersIdentified = 0; + gDungeon->unk644.unk35 = 0; + gDungeon->unk644.itemHoldersIdentified = 0; } if (targetData->waitingStruct.waitingStatus == STATUS_SNATCH) { SendWaitingEndMessage(attacker, target, STATUS_SNATCH); @@ -914,7 +914,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc ZeroOutItem(&targetData->heldItem); } if (targetData->bossFlag) { - gDungeon->bossSongIndex = 999; + gDungeon->unk644.bossSongIndex = 999; } // Give exp @@ -956,7 +956,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc } } else { - if (DoEnemiesEvolveWhenKOed(gDungeon->dungeonLocation.id)) { + if (DoEnemiesEvolveWhenKOed(gDungeon->unk644.dungeonLocation.id)) { attackerData->unk149 = 1; gDungeon->unkD = 1; } diff --git a/src/code_806E8B0.c b/src/code_806E8B0.c index 275e963f6..0d8e7b0a3 100644 --- a/src/code_806E8B0.c +++ b/src/code_806E8B0.c @@ -396,7 +396,7 @@ void CalcDamage(Entity *attacker, Entity *target, u8 moveType, s32 movePower, s3 } // ALSO needed to match. unk694 chosen randomly and it worked with matching. - ASM_MATCH_TRICK(gDungeon->unk694); + ASM_MATCH_TRICK(gDungeon->unk644.unk50); gDungeon->unk134.unk150 = sub_800A048(&unkSp8); { s32 rnd = DungeonRandInt(0x4000); diff --git a/src/code_806FDF4.c b/src/code_806FDF4.c index a3d1775a7..b75499187 100644 --- a/src/code_806FDF4.c +++ b/src/code_806FDF4.c @@ -198,12 +198,12 @@ bool8 sub_806F660(Entity *pokemon,Entity *target) size = GetBodySize(targetInfo->apparentID); if ((1 < ((u16)(gDungeon->bossBattleIndex - 4))) && (gDungeon->bossBattleIndex != 9) && (gDungeon->bossBattleIndex != 0xf)) { if ((u16)(gDungeon->bossBattleIndex - 0x2cU) < 5) { - if (gDungeon->unk65C == 0) { + if (gDungeon->unk644.unk18 == 0) { return FALSE; } } else if (gDungeon->bossBattleIndex == 0x31) { - if (gDungeon->fill655[4] == 0) { + if (gDungeon->unk644.unk15 == 0) { return FALSE; } if (sub_8097900(0x19e) == 0) { @@ -212,12 +212,12 @@ bool8 sub_806F660(Entity *pokemon,Entity *target) } else { - if (IsRecruitingEnabled((gDungeon->dungeonLocation).id) == 0) { + if (IsRecruitingEnabled((gDungeon->unk644.dungeonLocation).id) == 0) { return FALSE; } } } - if (gDungeon->unk65D == 0) + if (gDungeon->unk644.unk19 == 0) { if ((( (2 < (u16)(targetInfo->id - 0x90)) && @@ -689,8 +689,8 @@ bool8 sub_806F9BC(s16 species) unkStruct_8092638 auStack_18; id = species; - if (((gDungeon->unk658 == 0) || (sub_808529C(id) == 0)) || - ((id == MONSTER_MEW && (gDungeon->unk678 == 1)))) { + if (((gDungeon->unk644.unk14 == 0) || (sub_808529C(id) == 0)) || + ((id == MONSTER_MEW && (gDungeon->unk644.unk34 == 1)))) { return FALSE; } else if (id == MONSTER_LATIAS) @@ -779,7 +779,7 @@ bool8 sub_806FA5C(Entity *entity1, Entity *entity2, struct unkStruct_8069D4C *pa pokeStruct2->unkA = -1; pokeStruct2->unkC = pokeIndex; pokeStruct2->speciesNum = param_3->id; - (pokeStruct2->dungeonLocation) = gDungeon->dungeonLocation; + (pokeStruct2->dungeonLocation) = gDungeon->unk644.dungeonLocation; pokeStruct2->unk10 = param_3->HP; pokeStruct2->unk12 = param_3->HP; pokeStruct2->belly = param_3->belly; @@ -1039,7 +1039,7 @@ bool8 sub_806FDF4(Entity *entity1,Entity *entity2,Entity **entityPtr) pokeStruct2->unkA = -1; pokeStruct2->unkC = index; pokeStruct2->speciesNum = local_74.id; - pokeStruct2->dungeonLocation = gDungeon->dungeonLocation; + pokeStruct2->dungeonLocation = gDungeon->unk644.dungeonLocation; pokeStruct2->unk10 = local_74.HP; pokeStruct2->unk12 = local_74.HP; pokeStruct2->belly = local_74.belly; diff --git a/src/code_80718D8.c b/src/code_80718D8.c index 264fefc83..93d57df0a 100644 --- a/src/code_80718D8.c +++ b/src/code_80718D8.c @@ -82,21 +82,21 @@ void sub_8071B48(void) entityPtr = NULL; dungeon = gDungeon; - if ((dungeon->unk664 != 0) && - ((dungeon->dungeonLocation.id != DUNGEON_METEOR_CAVE || (dungeon->unk37FD == 0)))) { - dungeon->unk662++; - if (dungeon->unk66E == 0) { - if ( dungeon->unk662 < gUnknown_80F4DAA) { + if ((dungeon->unk644.unk20 != 0) && + ((dungeon->unk644.dungeonLocation.id != DUNGEON_METEOR_CAVE || (dungeon->unk37FD == 0)))) { + dungeon->unk644.unk1E++; + if (dungeon->unk644.unk2A == 0) { + if ( dungeon->unk644.unk1E < gUnknown_80F4DAA) { return; } } else { - if ( dungeon->unk662 < gUnknown_80F4DAC) { + if ( dungeon->unk644.unk1E < gUnknown_80F4DAC) { return; } } - if (dungeon->unk662 > 900) { + if (dungeon->unk644.unk1E > 900) { entity2 = dungeon->unk17B34; if ((EntityExists(entity2)) && (entity2->spawnGenID == dungeon->unk17B40)) { SetMessageArgument(gFormatBuffer_Monsters[0],entity2,0); @@ -104,7 +104,7 @@ void sub_8071B48(void) } } - dungeon->unk662 = 0; + dungeon->unk644.unk1E = 0; dungeon->unk17B34 = NULL; counter = 0; @@ -117,7 +117,7 @@ void sub_8071B48(void) counter++; } } - if (dungeon->unk66E == 0) { + if (dungeon->unk644.unk2A == 0) { if (gDungeon->unk3A0C == 0xff) { if (counter >= gUnknown_80F4DA6) { return; @@ -135,7 +135,7 @@ void sub_8071B48(void) DisplayDungeonLoggableMessageTrue(0,*gUnknown_80FED68); sub_8042920(entityPtr); } - if (dungeon->unk66E != 0) { + if (dungeon->unk644.unk2A != 0) { index1 = 0x17c; } else { @@ -150,7 +150,7 @@ void sub_8071B48(void) local_2c.species = index1; local_2c.level = level; local_2c.unk2 = 0; - if(DungeonRandInt(100) < GetRandomMovementChance(gDungeon->dungeonLocation.id)) + if(DungeonRandInt(100) < GetRandomMovementChance(gDungeon->unk644.dungeonLocation.id)) { local_2c.unk4 = 1; } @@ -586,7 +586,7 @@ void sub_807218C(Entity *pokemon) } else if(info->joinedAt.joinedAt == DUNGEON_JOIN_LOCATION_PARTNER) { - if(gDungeon->unk65C == 0) + if(gDungeon->unk644.unk18 == 0) r3 = 1; } sub_806A3D4(buffer, r1, 3, r3); diff --git a/src/code_8073CF0.c b/src/code_8073CF0.c index 3986ec9fb..8d5df8ffc 100644 --- a/src/code_8073CF0.c +++ b/src/code_8073CF0.c @@ -177,7 +177,7 @@ void sub_8073D14(Entity *entity) Item *carriedItems[INVENTORY_SIZE + 1]; // plus held s32 newQuantity; - if (gDungeon->unk65B && !_entityInfo->isNotTeamMember) { + if (gDungeon->unk644.unk17 && !_entityInfo->isNotTeamMember) { for (i = 0; i < INVENTORY_SIZE; i++) { carriedItems[i] = &gTeamInventoryRef->teamItems[i]; inventoryIds[i] = i; @@ -361,13 +361,13 @@ void sub_8074094(Entity *entity) UseAttack(NULL); if (!EntityExists(entity) || sub_8044B28()) return; - if (gDungeon->unk679 < 10) - gDungeon->unk679++; - if (gDungeon->unk679 == 1) + if (gDungeon->unk644.unk35 < 10) + gDungeon->unk644.unk35++; + if (gDungeon->unk644.unk35 == 1) str = gUnknown_80FD5DC; - if (gDungeon->unk679 == 2) + if (gDungeon->unk644.unk35 == 2) str = gUnknown_80FD608, sound = FALSE; - if (gDungeon->unk679 == 3) + if (gDungeon->unk644.unk35 == 3) str = gUnknown_80FD628, sound = FALSE; TrySendImmobilizeSleepEndMsg(entity, entity); @@ -377,7 +377,7 @@ void sub_8074094(Entity *entity) str = NULL; } else { - gDungeon->unk679 = 0; + gDungeon->unk644.unk35 = 0; } if (str != NULL) { @@ -930,7 +930,7 @@ bool8 UseAttack(Entity *a0) savedEntityPtr = gDungeon->unkB8; gDungeon->unkB8 = a0; - if (gDungeon->unk66C == 0 && r9) { + if (gDungeon->unk644.unk28 == 0 && r9) { sub_80526D0(0x35); for (loop = 0; loop < 24 / gUnknown_202F378; loop++) { sub_803E46C(7); diff --git a/src/code_8077274_1.c b/src/code_8077274_1.c index 85b2235c4..4c42d26ac 100644 --- a/src/code_8077274_1.c +++ b/src/code_8077274_1.c @@ -365,9 +365,9 @@ void IdentityItemHolders(Entity *pokemon, Entity *target) if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon, target, TRUE))) { entityInfo = GetEntInfo(target); - if (!gDungeon->itemHoldersIdentified) { + if (!gDungeon->unk644.itemHoldersIdentified) { nullsub_89(target); - gDungeon->itemHoldersIdentified = TRUE; + gDungeon->unk644.itemHoldersIdentified = TRUE; EntityUpdateStatusSprites(target); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FC028); } diff --git a/src/code_807E1A0.c b/src/code_807E1A0.c index a1d17e4a3..18f4244bd 100644 --- a/src/code_807E1A0.c +++ b/src/code_807E1A0.c @@ -123,56 +123,56 @@ void sub_807E378(void) leader = GetLeader(); if (EntityExists(leader)) { - uVar2 = gDungeon->windTurns; - if ((gDungeon->windTurns < 1) || - (gDungeon->windTurns--, ((uVar2 - 1) << 0x10) < 1)) { - gDungeon->unk67A = 3; + uVar2 = gDungeon->unk644.windTurns; + if ((gDungeon->unk644.windTurns < 1) || + (gDungeon->unk644.windTurns--, ((uVar2 - 1) << 0x10) < 1)) { + gDungeon->unk644.unk36 = 3; } - if (gDungeon->unk67A == 0) { - if (gDungeon->windTurns < 0xfa) { + if (gDungeon->unk644.unk36 == 0) { + if (gDungeon->unk644.windTurns < 0xfa) { sub_805E804(); sub_806A2BC(leader,1); UseAttack(leader); if (sub_8044B28() == 0) { TryDisplayDungeonLoggableMessage(leader,*gUnknown_80F9C4C); sub_80426C8(gUnknown_80F5FAC[gDungeon->tileset],0); - gDungeon->unk67A = 1; + gDungeon->unk644.unk36 = 1; } } } - else if (gDungeon->unk67A == 1) { - if (gDungeon->windTurns < 0x96) { + else if (gDungeon->unk644.unk36 == 1) { + if (gDungeon->unk644.windTurns < 0x96) { sub_805E804(); sub_806A2BC(leader,1); UseAttack(leader); if (sub_8044B28() == 0) { TryDisplayDungeonLoggableMessage(leader,*gUnknown_80F9C70); sub_80426C8(gUnknown_80F5FAC[gDungeon->tileset],1); - gDungeon->unk67A = 2; + gDungeon->unk644.unk36 = 2; } } } - else if (gDungeon->unk67A == 2) { - if (gDungeon->windTurns < 0x32) { + else if (gDungeon->unk644.unk36 == 2) { + if (gDungeon->unk644.windTurns < 0x32) { sub_805E804(); sub_806A2BC(leader,1); UseAttack(leader); if (sub_8044B28() == 0) { TryDisplayDungeonLoggableMessage(leader,*gUnknown_80F9C8C); sub_80426C8(gUnknown_80F5FAC[gDungeon->tileset],2); - gDungeon->unk67A = 3; + gDungeon->unk644.unk36 = 3; } } } - else if (gDungeon->windTurns < 1) { + else if (gDungeon->unk644.windTurns < 1) { sub_805E804(); sub_806A2BC(leader,1); UseAttack(leader); if (sub_8044B28() == 0) { TryDisplayDungeonLoggableMessage(leader,*gUnknown_80F9CBC); sub_80426C8(gUnknown_80F5FAC[gDungeon->tileset],3); - gDungeon->unk67A = 4; + gDungeon->unk644.unk36 = 4; sub_8068FE0(leader,0x21e,leader); } } diff --git a/src/code_8084778.c b/src/code_8084778.c index 5fdf19ed1..1941474cd 100644 --- a/src/code_8084778.c +++ b/src/code_8084778.c @@ -17,7 +17,7 @@ void sub_8084778(void) for (i = 0; i < MAX_ACCEPTED_JOBS; i++) { wm = GetJobSlotInfo(i); - if (wm->mailType == MAIL_TYPE_TAKEN_JOB && gDungeon->dungeonLocation.id == wm->unk4.dungeon.id && wm->missionType == WONDER_MAIL_MISSION_TYPE_ESCORT_CLIENT) { + if (wm->mailType == MAIL_TYPE_TAKEN_JOB && gDungeon->unk644.dungeonLocation.id == wm->unk4.dungeon.id && wm->missionType == WONDER_MAIL_MISSION_TYPE_ESCORT_CLIENT) { CopyCyanMonsterNametoBuffer(gFormatBuffer_Monsters[3], wm->targetSpecies); break; } diff --git a/src/code_80848F0.c b/src/code_80848F0.c index 7499d8597..a285e2572 100644 --- a/src/code_80848F0.c +++ b/src/code_80848F0.c @@ -42,7 +42,7 @@ void sub_80847D4(void) void sub_8084854(struct unkData_8107234 *param_1) { - if (gDungeon->unk678 != 0) { + if (gDungeon->unk644.unk34 != 0) { gDungeon->unk3A0D = param_1->unk0[5]; } else @@ -64,7 +64,7 @@ void sub_8084854(struct unkData_8107234 *param_1) } } } - gDungeon->unk675 = 1; + gDungeon->unk644.unk31 = 1; sub_807E5E4(WEATHER_CLEAR); } diff --git a/src/dungeon_action.c b/src/dungeon_action.c index 436c0fd25..6f63974a6 100644 --- a/src/dungeon_action.c +++ b/src/dungeon_action.c @@ -64,7 +64,7 @@ void sub_8044820(void) { entityInfo->aiNextToTarget = FALSE; movSpeed = CalcSpeedStage(entity); - if (gSpeedTurns[movSpeed][gDungeon->fractionalTurn] != 0) { + if (gSpeedTurns[movSpeed][gDungeon->unk644.fractionalTurn] != 0) { if (!entityInfo->attacking) { entityInfo->flags &= ~(MOVEMENT_FLAG_UNK_14 | MOVEMENT_FLAG_SWAPPING_PLACES_PETRIFIED_ALLY); entityInfo->recalculateFollow = FALSE; @@ -107,7 +107,7 @@ void TrySpawnMonsterAndActivatePlusMinus(void) u32 isNotEnemy; s32 index; - if (gSpeedTurns[1][gDungeon->fractionalTurn] != 0) { + if (gSpeedTurns[1][gDungeon->unk644.fractionalTurn] != 0) { sub_8071B48(); gDungeon->plusIsActive[0] = FALSE; gDungeon->plusIsActive[1] = FALSE; @@ -151,7 +151,7 @@ void sub_8044AB4(void) { s32 index; - if (gSpeedTurns[1][gDungeon->fractionalTurn + 1] != 0) { + if (gSpeedTurns[1][gDungeon->unk644.fractionalTurn + 1] != 0) { for (index = 0; index < DUNGEON_MAX_POKEMON; index++) { if (EntityExists(gDungeon->allPokemon[index])) { UseAttack(0); @@ -168,16 +168,16 @@ bool8 sub_8044B28(void) { if (gDungeon->unk4 == 0) { if (GetLeader() == NULL) { - gDungeon->unk654 = 1; + gDungeon->unk644.unk10 = 1; } else if (gDungeon->unk2 == 1) { - gDungeon->unk654 = 2; + gDungeon->unk644.unk10 = 2; } else if (gDungeon->unk2 != 2) { return FALSE; } else { - gDungeon->unk654 = 2; + gDungeon->unk644.unk10 = 2; } } return TRUE; diff --git a/src/dungeon_ai.c b/src/dungeon_ai.c index 298cfc4bc..c1a6c04a5 100644 --- a/src/dungeon_ai.c +++ b/src/dungeon_ai.c @@ -51,13 +51,13 @@ void sub_8075900(Entity *pokemon, u8 r1) { if(!sub_8044B28()) { - if(!gDungeon->monsterHouseTriggered) + if(!gDungeon->unk644.monsterHouseTriggered) { if((GetTileAtEntitySafe(pokemon)->terrainType & TERRAIN_TYPE_IN_MONSTER_HOUSE)) { // It's a monster house! TryDisplayDungeonLoggableMessage(GetLeader(), gPtrItsaMonsterHouseMessage); - gDungeon->monsterHouseTriggeredEvent = TRUE; + gDungeon->unk644.monsterHouseTriggeredEvent = TRUE; sub_807AB38(pokemon, r1); sub_8041888(0); if(sub_803F428(&pokemon->pos.x) != 0) diff --git a/src/dungeon_ai_leader.c b/src/dungeon_ai_leader.c index 57dd17a06..d4a3f893f 100644 --- a/src/dungeon_ai_leader.c +++ b/src/dungeon_ai_leader.c @@ -223,7 +223,7 @@ bool8 sub_8072CF4(Entity *entity) HandleUseMoveAIAction(entity); break; case ACTION_STAIRS: - if ((gDungeon->dungeonLocation.id == DUNGEON_METEOR_CAVE) && (!gDungeon->deoxysDefeat)) { + if ((gDungeon->unk644.dungeonLocation.id == DUNGEON_METEOR_CAVE) && (!gDungeon->deoxysDefeat)) { TryDisplayDungeonLoggableMessage(entity,*gUnknown_80FA5B4); // It's impossible to go down the stairs now! } else diff --git a/src/dungeon_ai_targeting.c b/src/dungeon_ai_targeting.c index b29de7390..cfb750cc7 100644 --- a/src/dungeon_ai_targeting.c +++ b/src/dungeon_ai_targeting.c @@ -274,7 +274,7 @@ bool8 CanAIMonsterMoveInDirection(Entity *pokemon, s32 direction, bool8 *pokemon return FALSE; } if (frontTile->terrainType & TERRAIN_TYPE_IN_MONSTER_HOUSE && - !gDungeon->monsterHouseTriggered && + !gDungeon->unk644.monsterHouseTriggered && IQSkillIsEnabled(pokemon, IQ_HOUSE_AVOIDER)) { return FALSE; diff --git a/src/dungeon_cutscenes.c b/src/dungeon_cutscenes.c index 84e3eb41a..71e761cba 100644 --- a/src/dungeon_cutscenes.c +++ b/src/dungeon_cutscenes.c @@ -485,7 +485,7 @@ void SetupBossFightHP(Entity *pokemon, s32 newHP, u16 songIndex) entityInfo->HP = newHP; } - gDungeon->bossSongIndex = songIndex; + gDungeon->unk644.bossSongIndex = songIndex; SetDefaultIQSkills(entityInfo->IQSkillMenuFlags, entityInfo->bossFlag); LoadIQSkills(pokemon); } @@ -501,7 +501,7 @@ u8 sub_8086AE4(s16 _index) { s32 pokeIndex = _index; - if(gDungeon->unk65C == 0) + if(gDungeon->unk644.unk18 == 0) return 1; else return HasRecruitedMon(pokeIndex); @@ -3816,8 +3816,8 @@ void sub_808B1CC(u8 itemID) Position pos; Item item; - pos.x = gDungeon->unk684; - pos.y = gDungeon->unk686; + pos.x = gDungeon->unk644.unk40; + pos.y = gDungeon->unk644.unk42; if ((pos.x < 0) || (pos.y < 0)) { entity = GetLeader(); if (entity == NULL) { @@ -4164,7 +4164,7 @@ void JirachiWish(void) sub_803E708(10,0x46); DisplayDungeonDialogue(&gUnknown_8105D9C); sub_803E708(10,0x46); - gDungeon->unk674 = 1; + gDungeon->unk644.unk30 = 1; } break; } diff --git a/src/dungeon_engine.c b/src/dungeon_engine.c index 572789b5d..d90461c5b 100644 --- a/src/dungeon_engine.c +++ b/src/dungeon_engine.c @@ -52,7 +52,7 @@ bool8 IsCurrentFixedRoomBossFight() bool8 IsMakuhitaTrainingMaze(void) { - if( (u8)(gDungeon->dungeonLocation.id - DUNGEON_NORMAL_MAZE_2) < NUM_DUNGEON_MAZE) + if( (u8)(gDungeon->unk644.dungeonLocation.id - DUNGEON_NORMAL_MAZE_2) < NUM_DUNGEON_MAZE) return TRUE; else return FALSE; @@ -79,9 +79,9 @@ void RunFractionalTurn(bool8 param_1) sub_8044820(); if (!sub_8044B28()) { sub_8044AB4(); - gDungeon->fractionalTurn++; - if (gDungeon->fractionalTurn == 24) { - gDungeon->fractionalTurn = 0; + gDungeon->unk644.fractionalTurn++; + if (gDungeon->unk644.fractionalTurn == 24) { + gDungeon->unk644.fractionalTurn = 0; } } } @@ -105,7 +105,7 @@ static bool8 xxx_dungeon_80442D0(bool8 param_1) { TriggerWeatherAbilities(); movSpeed = CalcSpeedStage(entity); - if (gSpeedTurns[movSpeed][gDungeon->fractionalTurn] == 0) { + if (gSpeedTurns[movSpeed][gDungeon->unk644.fractionalTurn] == 0) { return FALSE; } else @@ -123,8 +123,8 @@ static bool8 xxx_dungeon_80442D0(bool8 param_1) else { if ((UseAttack(0) == 0) && - ((gDungeon->unk66C != 0 || - (gDungeon->unk673 != 0)))) { + ((gDungeon->unk644.unk28 != 0 || + (gDungeon->unk644.unk2F != 0)))) { sub_803E46C(0xc); } GetEntInfo(entity)->speedStageChanged = FALSE; @@ -161,7 +161,7 @@ static bool8 xxx_dungeon_80442D0(bool8 param_1) } else { if (!GetEntInfo(entity)->speedStageChanged) break; - gDungeon->fractionalTurn = 0; + gDungeon->unk644.fractionalTurn = 0; } } } diff --git a/src/dungeon_items.c b/src/dungeon_items.c index 35f307da5..27a7cb2bb 100644 --- a/src/dungeon_items.c +++ b/src/dungeon_items.c @@ -83,7 +83,7 @@ void sub_8046D20(void) u8 sub_8046D70(void) { - if(gDungeon->unk68A) + if(gDungeon->unk644.unk46) return 0; else return 0; diff --git a/src/dungeon_message.c b/src/dungeon_message.c index 3d331311b..718378551 100644 --- a/src/dungeon_message.c +++ b/src/dungeon_message.c @@ -698,7 +698,7 @@ void TryDisplayGeneralTutorialMessage(void) if (DislayTutorialMsg(leader, &gUnknown_80FF020, TRUE)) return; if (DislayTutorialMsg(leader, &gUnknown_80FF080, TRUE)) return; if (DislayTutorialMsg(leader, &gUnknown_80FF0D8, TRUE)) return; - if (gDungeon->dungeonLocation.id == DUNGEON_THUNDERWAVE_CAVE) { + if (gDungeon->unk644.dungeonLocation.id == DUNGEON_THUNDERWAVE_CAVE) { if (DislayTutorialMsg(leader, &gUnknown_80FF13C, TRUE)) return; if (DislayTutorialMsg(leader, &gUnknown_80FF1B4, TRUE)) return; if (DislayTutorialMsg(leader, &gMovementTutorial, TRUE)) return; @@ -834,11 +834,11 @@ void sub_8052FB8(const u8 *str) const u8 *GetCurrentDungeonName(void) { - if (gDungeon->unk678 == 1) { + if (gDungeon->unk644.unk34 == 1) { return GetDungeonName1(DUNGEON_OUT_ON_RESCUE); } else { - return GetDungeonName1(gDungeon->dungeonLocation.id); + return GetDungeonName1(gDungeon->unk644.dungeonLocation.id); } } diff --git a/src/dungeon_move.c b/src/dungeon_move.c index 5a828de6b..59976e5db 100644 --- a/src/dungeon_move.c +++ b/src/dungeon_move.c @@ -1690,7 +1690,7 @@ static s32 TryHitTarget(Entity *attacker, Entity *target, Move *move, struct Dam bool32 isFalseSwipe = (move->id == MOVE_FALSE_SWIPE); if (HasAbility(target, ABILITY_ILLUMINATE)) { - gDungeon->unk662 = 999; + gDungeon->unk644.unk1E = 999; gDungeon->unk17B34 = target; gDungeon->unk17B40 = target->spawnGenID; } diff --git a/src/dungeon_movement.c b/src/dungeon_movement.c index 9a199d3ad..c72b6951d 100644 --- a/src/dungeon_movement.c +++ b/src/dungeon_movement.c @@ -330,7 +330,7 @@ s32 CalcSpeedStage(Entity *pokemon) speed++; } if ((entityInfo->id == MONSTER_KECLEON) && entityInfo->isNotTeamMember && - gDungeon->unk66E) { + gDungeon->unk644.unk2A) { speed++; } if (speed < 0) { diff --git a/src/dungeon_music.c b/src/dungeon_music.c index 2ddedd72b..7a55256cf 100644 --- a/src/dungeon_music.c +++ b/src/dungeon_music.c @@ -62,7 +62,7 @@ void sub_8083AB0(s16 param_0, Entity * target, Entity * entity) temp->spAtk = entityInfo->atk[1]; temp->def = entityInfo->def[0]; temp->spDef = entityInfo->def[1]; - temp->dungeonLocation = gDungeon->dungeonLocation; + temp->dungeonLocation = gDungeon->unk644.dungeonLocation; attackPtr = &temp->attBoost; *attackPtr = 0; spAttPtr = &temp->spAttBoost; @@ -128,8 +128,8 @@ bool8 sub_8083C88(u8 param_1) temp = &gDungeon->unk1CE98; - if ((!HasCheckpoint(gDungeon->dungeonLocation.id) && - ((gDungeon->unk65C != 0) || (param_1 != 0))) || + if ((!HasCheckpoint(gDungeon->unk644.dungeonLocation.id) && + ((gDungeon->unk644.unk18 != 0) || (param_1 != 0))) || (temp->moveID != 0x227)) { return TRUE; } @@ -188,19 +188,19 @@ void sub_8083D88(void) void PlayDungeonFailBGM(void) { DungeonStartNewBGM(MUS_DUNGEON_FAIL); - gDungeon->unk66F = 0; - gDungeon->monsterHouseTriggeredEvent = FALSE; - gDungeon->unk699 = 0; - gDungeon->bossSongIndex = STOP_BGM; + gDungeon->unk644.unk2B = 0; + gDungeon->unk644.monsterHouseTriggeredEvent = FALSE; + gDungeon->unk644.unk55 = 0; + gDungeon->unk644.bossSongIndex = STOP_BGM; } void PlayDungeonCompleteBGM(void) { DungeonStartNewBGM(MUS_DUNGEON_COMPLETE); - gDungeon->unk66F = 0; - gDungeon->monsterHouseTriggeredEvent = FALSE; - gDungeon->unk699 = 0; - gDungeon->bossSongIndex = STOP_BGM; + gDungeon->unk644.unk2B = 0; + gDungeon->unk644.monsterHouseTriggeredEvent = FALSE; + gDungeon->unk644.unk55 = 0; + gDungeon->unk644.bossSongIndex = STOP_BGM; } void sub_8083E28(void) @@ -282,16 +282,16 @@ void UpdateDungeonMusic(void) musPlayer = &gDungeon->musPlayer; - bossSongIndex = &gDungeon->bossSongIndex; + bossSongIndex = &gDungeon->unk644.bossSongIndex; newSongIndex = *bossSongIndex; if (newSongIndex == STOP_BGM) { - if (gDungeon->unk66F != 0) { + if (gDungeon->unk644.unk2B != 0) { newSongIndex = MUS_STOP_THIEF; } - else if (gDungeon->monsterHouseTriggeredEvent) { + else if (gDungeon->unk644.monsterHouseTriggeredEvent) { newSongIndex = MUS_MONSTER_HOUSE; } - else if (gDungeon->unk699 != 0) { + else if (gDungeon->unk644.unk55 != 0) { newSongIndex = MUS_KECLEON_SHOP; } else { diff --git a/src/status_actions.c b/src/status_actions.c index 03f4418f8..2a1fb4171 100644 --- a/src/status_actions.c +++ b/src/status_actions.c @@ -922,7 +922,7 @@ bool8 sub_805BEC8(Entity * pokemon, Entity * target, Move *move, s32 param_4) bool8 EscapeOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4) { SetMessageArgument(gFormatBuffer_Monsters[0],pokemon,0); - if (gDungeon->unk66E != 0) { + if (gDungeon->unk644.unk2A != 0) { TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FD4DC); // $m0 can't escape! } else { diff --git a/src/trap_1.c b/src/trap_1.c index 42e8a4692..63a8161d6 100644 --- a/src/trap_1.c +++ b/src/trap_1.c @@ -173,7 +173,7 @@ void WriteDungeonState(u8 *buffer, u32 bufLen) void sub_8080B90(DataSerializer *param_1) { Write8Bytes(param_1, gMisakiSan); - WriteBytes(param_1, &gDungeon->dungeonLocation, 0x58); + WriteBytes(param_1, &gDungeon->unk644, sizeof(unkDungeon644)); } void WriteDungeonItems(DataSerializer *param_1) @@ -826,7 +826,7 @@ void ReadDungeonState(u8 *buffer, u32 bufLen) void sub_8081C50(DataSerializer *r0) { sub_8083018(r0, gMisakiSan); - ReadBytes(r0, &gDungeon->dungeonLocation, 0x58); + ReadBytes(r0, &gDungeon->unk644, sizeof(unkDungeon644)); } void sub_8081C7C(DataSerializer *r0) 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 05/16] 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 924630560..afbd0fef8 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 fc6d11927..28075ac1e 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 be82e0ed6..10d05dfe9 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 00c92aa91..000000000 --- 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 b0918f42d..b5fd5ca5d 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 a13859592..a95b7e466 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 99c6433b4..df0cd8276 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 ffa26cedf..90934e658 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 000000000..4574e5be7 --- /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 e6e227771..de1baa257 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 000000000..884e9a7f9 --- /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 626fe14ba..0a0a1ac18 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 df17445c2..7649e9970 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 3a2fe8e51..3c7e6c1e5 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 000000000..4398a28d0 --- /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 45ea6a242..d95b12019 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 000000000..93955b4df --- /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 2424fb24e..ec99ed9f0 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 8bed713aa..712807bb5 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 6003f0dfc..571d4d76d 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 3ea209bee..08200e67d 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 19b2ea34e..ab9d054e3 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 fbce67483..1538ea514 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 e8c45e0ab..7c9233200 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 e54661ade..d59122eb5 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 c9f2733cc..9a0baa45a 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 6af03624f..20379e4e0 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 84f43a339..ddc1fe7cf 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 50a17f16f..0ebdbd508 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 f1fe58cc7..c81938b65 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 ee7b804a5..bc9c07e90 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 20741ab54..3b228e59f 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 a0414a9c0..c0cea7dca 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 93d57df0a..c84022775 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 8d5df8ffc..a924f102d 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 c4afc842b..6f4d959e3 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 4c42d26ac..502961be6 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 99f295bbd..b6e987989 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 28df14231..000000000 --- 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 000000000..e7d1d0fda --- /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 71e761cba..65b406f98 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 27a7cb2bb..b89e71097 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 59976e5db..89e241c0c 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 000000000..c83df6003 --- /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 781895657..a53e7fabe 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 2a1fb4171..c9e9e9ee4 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 a0277f8fd..078eee7b8 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 54f96b19e..fcd798538 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 63a8161d6..58285376a 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 4bebc1662..d92c28e28 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" From c3cd344ad92b90f1de320f6d7a68839fb8514a3a Mon Sep 17 00:00:00 2001 From: Kermalis <29823718+Kermalis@users.noreply.github.com> Date: Sun, 10 Nov 2024 18:33:47 -0500 Subject: [PATCH 06/16] Fix WriteMonster weirdmatch --- src/dungeon_serializer.c | 320 +++++++++++++++------------------------ 1 file changed, 123 insertions(+), 197 deletions(-) diff --git a/src/dungeon_serializer.c b/src/dungeon_serializer.c index c83df6003..384165657 100644 --- a/src/dungeon_serializer.c +++ b/src/dungeon_serializer.c @@ -249,227 +249,153 @@ static void WriteDungeonMonsters(DataSerializer *seri) 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; + s32 i; + EntityInfo blankInfo; + u32 one; + u32 zero; + zero = 0; + one = 1; + + WriteU8(seri, 0xAA); + WriteU8(seri, 0x55); - 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); + WriteBytes(seri, &one, 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); + memset(&blankInfo, 0, sizeof(EntityInfo)); + + info = &blankInfo; + WriteBytes(seri, &zero, 1); + WriteBytes(seri, &zero, 1); + WriteBytes(seri, &zero, 1); + WriteBytes(seri, &zero, 1); + WriteBytes(seri, &zero, 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); + + 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++; - } + for (i = 0; i < NUM_PREV_POS; i++) + WriteTilePos(seri, &info->prevPos[i]); - 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); + WriteAITarget(seri, &info->aiTarget); + WriteIQSkills(seri, info->IQSkillMenuFlags); + WriteIQSkills(seri, info->IQSkillFlags); + WriteTactic(seri, info->tactic); + WriteHiddenPower(seri, &info->hiddenPower); + WriteU32(seri, info->unk98); + WriteU32(seri, info->unk9C); + WriteU32(seri, info->unkA0); + WriteSleep(seri, &info->sleep); + WriteNonVolatile(seri, &info->nonVolatile); + WriteImmobilize(seri, &info->immobilize); + WriteVolatile(seri, &info->volatileStatus); + WriteCharging(seri, &info->charging); + WriteProtection(seri, &info->protection); + WriteWaiting(seri, &info->waitingStruct); + WriteLinked(seri, &info->linked); + WriteMoveStatus(seri, &info->moveStatus); + WriteItemStatus(seri, &info->itemStatus); + WriteTransformStatus(seri, &info->transformStatus); + WriteEyesightStatus(seri, &info->eyesightStatus); + WriteMuzzled(seri, &info->muzzled); + WriteBool8(seri, info->powerEars); + WriteBool8(seri, info->scanning); + WriteBool8(seri, info->stairSpotter); + WriteBool8(seri, info->unkF3); + WriteBool8(seri, info->grudge); + WriteU8(seri, info->expMultiplier); + WriteBool8(seri, info->exposed); + WriteBool8(seri, info->isColorChanged); + WriteBool8(seri, info->bossFlag); + WriteU8(seri, info->terrifiedTurns); + WriteBool8(seri, info->useHeldItem); + WriteU8(seri, info->perishSongTurns); + WriteU8(seri, info->unkFE); + WriteMonsterUnkFF(seri, info->unkFF); + 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)); + 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); + WriteClientType(seri, info->clientType); } static void WriteDungeonFloor(DataSerializer *seri) From 2ec9296cc5c635fa62ffa0a58e4bcb2c3111e6b6 Mon Sep 17 00:00:00 2001 From: Kermalis <29823718+Kermalis@users.noreply.github.com> Date: Sun, 10 Nov 2024 19:03:09 -0500 Subject: [PATCH 07/16] Rename nullsub_102 --- include/code_8092334.h | 6 +++--- src/code_803D0D8.c | 12 ++++++------ src/code_8092334.c | 4 +--- src/code_8094F88.c | 4 ++-- src/code_80958E8.c | 4 ++-- src/code_8097670.c | 4 ++-- src/friend_area.c | 4 ++-- src/items.c | 4 ++-- src/pokemon_3.c | 8 ++++---- src/rescue_team_info.c | 4 ++-- 10 files changed, 26 insertions(+), 28 deletions(-) diff --git a/include/code_8092334.h b/include/code_8092334.h index 3c7e6c1e5..afe08ee4e 100644 --- a/include/code_8092334.h +++ b/include/code_8092334.h @@ -3,10 +3,10 @@ #include "data_serializer.h" -void nullsub_102(DataSerializer *seri); -void ReadBits(DataSerializer *seri, void *dst, s32 numBits); -void WriteBits(DataSerializer *seri, void *src, s32 numBits); +void FinishBitSerializer(DataSerializer *seri); void InitBitReader(DataSerializer *seri, u8 *buffer, s32 bufLen); void InitBitWriter(DataSerializer *seri, u8 *buffer, s32 bufLen); +void ReadBits(DataSerializer *seri, void *dst, s32 numBits); +void WriteBits(DataSerializer *seri, void *src, s32 numBits); #endif // GUARD_CODE_8092334_H \ No newline at end of file diff --git a/src/code_803D0D8.c b/src/code_803D0D8.c index 03f37c8af..bafa162e1 100644 --- a/src/code_803D0D8.c +++ b/src/code_803D0D8.c @@ -68,7 +68,7 @@ u8 sub_803D110(u8 *param_1, u8 *param_2, s32 size) { WriteBits(&auStack_88, &local_78[index1], 5); } - nullsub_102(&auStack_88); + FinishBitSerializer(&auStack_88); MemoryCopy8(param_2, auStack_40, save); return 1; } @@ -91,7 +91,7 @@ void sub_803D1A8(u8 *param_1, u8 *param_2, s32 size) ReadBits(&auStack_5c, &local_4c[index], 5); } - nullsub_102(&auStack_5c); + FinishBitSerializer(&auStack_5c); for(index = 0; index < size; index++) { *param_1++ = sub_803D100(local_4c[index]); @@ -129,7 +129,7 @@ bool8 sub_803D204(u8 *buffer,unkStruct_203B480 *param_2) if (local_c4[0] == checksum) { InitBitReader(&uStack_30,&local_c4[1],33); sub_8095774(&uStack_30,param_2); - nullsub_102(&uStack_30); + FinishBitSerializer(&uStack_30); return TRUE; } } @@ -154,7 +154,7 @@ void sub_803D2C0(u8 *buffer, unkStruct_203B480 *mail) InitBitWriter(&auStack_2c,&local_c0[1],33); sub_8095824(&auStack_2c,mail); - nullsub_102(&auStack_2c); + FinishBitSerializer(&auStack_2c); for(index = 1; index < 34; index++) { checksum += + local_c0[index] + index; @@ -201,7 +201,7 @@ bool8 DecodeWonderMailPassword(u8* buffer, WonderMail *mail) if (local_70[0] == checksum) { InitBitReader(&puVar1,&local_70[1],0xc); ReadWonderMailBits(&puVar1,mail); - nullsub_102(&puVar1); + FinishBitSerializer(&puVar1); return TRUE; } } @@ -225,7 +225,7 @@ void sub_803D414(u8 *buffer,WonderMail *mail) InitBitWriter(&uStack_2c,&local_6c[1],12); WriteWonderMailBits(&uStack_2c,mail); - nullsub_102(&uStack_2c); + FinishBitSerializer(&uStack_2c); for(index = 1; index < 0xF; index++) { diff --git a/src/code_8092334.c b/src/code_8092334.c index ea4aed815..c335e247a 100644 --- a/src/code_8092334.c +++ b/src/code_8092334.c @@ -41,10 +41,8 @@ void InitBitWriter(DataSerializer *r0, u8 *buffer, s32 bufLen) MemoryClear8(buffer, bufLen); } -// Finish reading/writing bits -void nullsub_102(DataSerializer *r0) +void FinishBitSerializer(DataSerializer *seri) { - } void WriteBits(DataSerializer *r0, void *src, s32 numBits) diff --git a/src/code_8094F88.c b/src/code_8094F88.c index dd2ea1294..6faf9805f 100644 --- a/src/code_8094F88.c +++ b/src/code_8094F88.c @@ -365,7 +365,7 @@ u32 sub_80954CC(u8 *buffer, u32 size) ReadBits(&backup, &gUnknown_203B48C->unk4[i], 32); } - nullsub_102(&backup); + FinishBitSerializer(&backup); return backup.count; } @@ -411,7 +411,7 @@ u32 sub_8095624(u8 *buffer, u32 b) WriteBits(&backup, &gUnknown_203B48C->unk4[i], 32); } - nullsub_102(&backup); + FinishBitSerializer(&backup); return backup.count; } diff --git a/src/code_80958E8.c b/src/code_80958E8.c index 84fa8e336..25847f048 100644 --- a/src/code_80958E8.c +++ b/src/code_80958E8.c @@ -1379,7 +1379,7 @@ u32 RestoreMailInfo(u8 *r0, u32 size) ReadBits(&backup, &gUnknown_203B490->unk230[index].sub.seed, 24); ReadDungeonLocationBits(&backup, &gUnknown_203B490->unk230[index].sub.dungeon); } - nullsub_102(&backup); + FinishBitSerializer(&backup); return backup.count; } @@ -1423,7 +1423,7 @@ u32 SaveMailInfo(u8 *r0, u32 size) WriteBits(&backup, &gUnknown_203B490->unk230[index].sub.seed, 0x18); WriteDungeonLocationBits(&backup, &gUnknown_203B490->unk230[index].sub.dungeon); } - nullsub_102(&backup); + FinishBitSerializer(&backup); return backup.count; } diff --git a/src/code_8097670.c b/src/code_8097670.c index cb31e4c1b..c1ff0c248 100644 --- a/src/code_8097670.c +++ b/src/code_8097670.c @@ -375,7 +375,7 @@ u32 SaveAdventureData(u8 *buffer, u32 bufLen) WriteAdventureBits(&seri); WriteExclusivePokemon(&seri); - nullsub_102(&seri); + FinishBitSerializer(&seri); return seri.count; } @@ -390,6 +390,6 @@ u32 RestoreAdventureData(u8 *buffer, u32 bufLen) ReadAdventureBits(&seri); ReadExclusivePokemon(&seri); - nullsub_102(&seri); + FinishBitSerializer(&seri); return seri.count; } \ No newline at end of file diff --git a/src/friend_area.c b/src/friend_area.c index 776e6dc5e..5bdb0c9bb 100644 --- a/src/friend_area.c +++ b/src/friend_area.c @@ -241,7 +241,7 @@ u32 SaveFriendAreas(u8 *r0, u32 size) WriteBits(&unk, (u8*)&temp, 1); } - nullsub_102(&unk); + FinishBitSerializer(&unk); return unk.count; } @@ -262,6 +262,6 @@ u32 ReadSavedFriendAreas(u8 *r0, s32 size) gFriendAreas[i] = FALSE; } - nullsub_102(&unk); + FinishBitSerializer(&unk); return unk.count; } diff --git a/src/items.c b/src/items.c index 06a83266a..ab06357de 100644 --- a/src/items.c +++ b/src/items.c @@ -1127,7 +1127,7 @@ s32 SaveTeamInventory(u8* unk0, u32 size) WriteBits(&unk, &gTeamInventoryRef->teamMoney, 24); WriteBits(&unk, &gTeamInventoryRef->teamSavings, 24); - nullsub_102(&unk); + FinishBitSerializer(&unk); return unk.count; } @@ -1152,7 +1152,7 @@ s32 RestoreTeamInventory(u8 *unk0, u32 size) ReadBits(&unk, &gTeamInventoryRef->teamMoney, 24); ReadBits(&unk, &gTeamInventoryRef->teamSavings, 24); - nullsub_102(&unk); + FinishBitSerializer(&unk); return unk.count; } diff --git a/src/pokemon_3.c b/src/pokemon_3.c index b91091d50..95d31bba1 100644 --- a/src/pokemon_3.c +++ b/src/pokemon_3.c @@ -706,7 +706,7 @@ s32 SaveRecruitedPokemon(u8 *a1, s32 a2) // Team leader WriteBits(&backup, &teamLeader, 16); - nullsub_102(&backup); + FinishBitSerializer(&backup); return backup.count; } @@ -745,7 +745,7 @@ s32 RestoreRecruitedPokemon(u8 *a1, s32 a2) if ((u16)data_s16 < NUM_MONSTERS) gRecruitedPokemonRef->pokemon[data_s16].isTeamLeader = TRUE; - nullsub_102(&backup); + FinishBitSerializer(&backup); return backup.count; } @@ -839,7 +839,7 @@ s32 SavePoke2s(u8* buffer, s32 size) WriteBits(&backup, &pokemon2->name, 10 * 8); } - nullsub_102(&backup); + FinishBitSerializer(&backup); return backup.count; } @@ -888,7 +888,7 @@ s32 RestorePoke2s(u8* a1, s32 size) ReadBits(&backup, &pokemon2->name, 80); } - nullsub_102(&backup); + FinishBitSerializer(&backup); return backup.count; } diff --git a/src/rescue_team_info.c b/src/rescue_team_info.c index 13e8b9887..7f0789c9f 100644 --- a/src/rescue_team_info.c +++ b/src/rescue_team_info.c @@ -134,7 +134,7 @@ u32 SaveRescueTeamInfo(u8 *param_1, u32 size) puVar2 = &zero; } WriteBits(&auStack36,puVar2,1); - nullsub_102(&auStack36); + FinishBitSerializer(&auStack36); return auStack36.count; } @@ -148,6 +148,6 @@ u32 ReadRescueTeamInfo(u8 *param_1, u32 size) ReadBits(&auStack32, &gRescueTeamInfoRef->teamRankPts, 0x20); ReadBits(&auStack32, byteArray, 1); gRescueTeamInfoRef->isTeamRenamed = byteArray[0] & 1; - nullsub_102(&auStack32); + FinishBitSerializer(&auStack32); return auStack32.count; } From afa4b04abcdf1f9562dc8300e5949889b68c592a Mon Sep 17 00:00:00 2001 From: Kermalis <29823718+Kermalis@users.noreply.github.com> Date: Sun, 10 Nov 2024 19:43:27 -0500 Subject: [PATCH 08/16] axObject info union --- asm/code_80450F8.s | 644 ------------------------------- include/code_80450F8.h | 10 + include/structs/axdata.h | 7 +- include/structs/dungeon_entity.h | 19 +- include/structs/str_dungeon.h | 4 +- include/tile_types.h | 4 +- ld_script.txt | 1 + src/code_80450F8.c | 491 +++++++++++++++++++++++ src/code_805D8C8_1.c | 9 +- src/code_806E8B0.c | 2 +- src/code_80718D8.c | 1 + src/dungeon_serializer.c | 26 +- src/dungeon_util_1.c | 2 +- src/move_actions.c | 6 +- src/tile_types.c | 2 +- src/trap.c | 2 +- 16 files changed, 551 insertions(+), 679 deletions(-) create mode 100644 include/code_80450F8.h create mode 100644 src/code_80450F8.c diff --git a/asm/code_80450F8.s b/asm/code_80450F8.s index afbd0fef8..84d2e416b 100644 --- a/asm/code_80450F8.s +++ b/asm/code_80450F8.s @@ -5,650 +5,6 @@ .text - thumb_func_start sub_80453AC -sub_80453AC: - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - lsls r0, 16 - asrs r0, 16 - mov r8, r0 - movs r0, 0x1 - negs r0, r0 - mov r9, r0 - mov r0, r8 - bl GetBodySize - lsls r0, 24 - lsrs r6, r0, 24 - movs r5, 0 - movs r0, 0x6 - subs r3, r0, r6 - ldr r4, _080453D8 - b _080453DE - .align 2, 0 -_080453D8: .4byte gUnknown_202EE70 -_080453DC: - adds r5, 0x1 -_080453DE: - cmp r5, r3 - bgt _08045400 - movs r2, 0 - cmp r2, r6 - bge _080453FA - adds r1, r5, r4 - b _080453F4 -_080453EC: - adds r1, 0x1 - adds r2, 0x1 - cmp r2, r6 - bge _080453FA -_080453F4: - ldrb r0, [r1] - cmp r0, 0 - beq _080453EC -_080453FA: - cmp r2, r6 - bne _080453DC - mov r9, r5 -_08045400: - movs r0, 0x1 - negs r0, r0 - cmp r9, r0 - beq _080454FC - movs r5, 0 - ldr r7, _080454DC -_0804540C: - ldr r1, _080454E0 - ldr r0, [r1] - lsls r1, r5, 2 - ldr r2, _080454E4 - adds r0, r2 - adds r0, r1 - ldr r4, [r0] - adds r0, r4, 0 - bl EntityExists - lsls r0, 24 - lsrs r0, 24 - mov r10, r0 - cmp r0, 0 - bne _080454F0 - movs r0, 0x1 - str r0, [r4] - adds r0, r4, 0 - adds r0, 0x24 - strb r5, [r0] - ldr r1, _080454E0 - ldr r0, [r1] - adds r0, r7 - str r0, [r4, 0x70] - mov r2, r8 - strh r2, [r0, 0x2] - movs r0, 0 - mov r1, r8 - bl GetMonsterApparentID - ldr r1, [r4, 0x70] - strh r0, [r1, 0x4] - ldr r0, [r4, 0x70] - movs r5, 0 - strb r5, [r0, 0x6] - movs r0, 0 - mov r1, r8 - bl GetMonsterApparentID - lsls r0, 16 - asrs r0, 16 - bl GetSpriteData - str r0, [r4, 0x64] - mov r1, r9 - lsls r0, r1, 4 - adds r0, 0x40 - adds r1, r4, 0 - adds r1, 0x68 - strh r0, [r1] - adds r1, 0x2 - movs r0, 0x7 - strb r0, [r1] - adds r0, r4, 0 - adds r0, 0x6C - movs r2, 0 - strb r2, [r0] - adds r1, 0x1 - movs r0, 0xFF - strb r0, [r1] - adds r0, r4, 0 - adds r0, 0x6D - movs r5, 0x1 - strb r5, [r0] - adds r0, 0x2 - strb r5, [r0] - mov r0, r10 - str r0, [r4, 0x1C] - bl sub_8045ACC - ldr r0, [r4, 0x70] - ldr r1, _080454E8 - adds r0, r1 - mov r2, r9 - strb r2, [r0] - ldr r0, [r4, 0x70] - movs r5, 0xB4 - lsls r5, 1 - adds r0, r5 - strb r6, [r0] - cmp r6, 0 - beq _080454C6 - ldr r3, _080454EC - movs r2, 0x1 - adds r1, r6, 0 -_080454B6: - mov r5, r9 - adds r0, r5, r3 - strb r2, [r0] - movs r0, 0x1 - add r9, r0 - subs r1, 0x1 - cmp r1, 0 - bne _080454B6 -_080454C6: - ldr r1, _080454E0 - ldr r0, [r1] - movs r2, 0xCD - lsls r2, 3 - adds r0, r2 - ldrh r2, [r0] - adds r1, r2, 0x1 - strh r1, [r0] - strh r2, [r4, 0x26] - adds r0, r4, 0 - b _080454FE - .align 2, 0 -_080454DC: .4byte 0x0000069c -_080454E0: .4byte gDungeon -_080454E4: .4byte 0x0001357c -_080454E8: .4byte 0x00000167 -_080454EC: .4byte gUnknown_202EE70 -_080454F0: - movs r0, 0x82 - lsls r0, 2 - adds r7, r0 - adds r5, 0x1 - cmp r5, 0x3 - ble _0804540C -_080454FC: - movs r0, 0 -_080454FE: - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_80453AC - - thumb_func_start sub_804550C -sub_804550C: - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x8 - lsls r0, 16 - asrs r0, 16 - mov r8, r0 - movs r0, 0x1 - negs r0, r0 - mov r9, r0 - mov r0, r8 - bl GetBodySize - lsls r0, 24 - lsrs r7, r0, 24 - movs r5, 0 - movs r0, 0x10 - subs r3, r0, r7 - ldr r4, _08045538 - b _0804553E - .align 2, 0 -_08045538: .4byte gUnknown_202EE76 -_0804553C: - adds r5, 0x1 -_0804553E: - cmp r5, r3 - bgt _08045560 - movs r2, 0 - cmp r2, r7 - bge _0804555A - adds r1, r5, r4 - b _08045554 -_0804554C: - adds r1, 0x1 - adds r2, 0x1 - cmp r2, r7 - bge _0804555A -_08045554: - ldrb r0, [r1] - cmp r0, 0 - beq _0804554C -_0804555A: - cmp r2, r7 - bne _0804553C - mov r9, r5 -_08045560: - movs r0, 0x1 - negs r0, r0 - cmp r9, r0 - bne _0804556A - b _08045670 -_0804556A: - movs r5, 0 - movs r1, 0x1 - mov r10, r1 - ldr r2, _08045650 - mov r3, r9 - lsls r0, r3, 4 - adds r0, 0xA0 - str r0, [sp] -_0804557A: - ldr r1, _08045654 - ldr r0, [r1] - lsls r1, r5, 2 - ldr r3, _08045658 - adds r0, r3 - adds r0, r1 - ldr r4, [r0] - adds r0, r4, 0 - str r2, [sp, 0x4] - bl EntityExists - lsls r0, 24 - lsrs r6, r0, 24 - ldr r2, [sp, 0x4] - cmp r6, 0 - bne _08045664 - mov r0, r10 - str r0, [r4] - adds r0, r4, 0 - adds r0, 0x24 - strb r5, [r0] - subs r0, 0x2 - strb r6, [r0] - ldr r1, _08045654 - ldr r0, [r1] - adds r0, r2 - str r0, [r4, 0x70] - mov r2, r8 - strh r2, [r0, 0x2] - movs r0, 0 - mov r1, r8 - bl GetMonsterApparentID - ldr r1, [r4, 0x70] - strh r0, [r1, 0x4] - ldr r0, [r4, 0x70] - mov r3, r10 - strb r3, [r0, 0x6] - movs r0, 0 - mov r1, r8 - bl GetMonsterApparentID - lsls r0, 16 - asrs r0, 16 - bl GetSpriteData - str r0, [r4, 0x64] - adds r0, r4, 0 - adds r0, 0x68 - mov r5, sp - ldrh r5, [r5] - strh r5, [r0] - adds r1, r4, 0 - adds r1, 0x6A - movs r0, 0x7 - strb r0, [r1] - adds r0, r4, 0 - adds r0, 0x6C - movs r1, 0 - strb r1, [r0] - adds r1, r4, 0 - adds r1, 0x6B - movs r0, 0xFF - strb r0, [r1] - adds r0, r4, 0 - adds r0, 0x6D - mov r2, r10 - strb r2, [r0] - adds r0, 0x2 - strb r2, [r0] - str r6, [r4, 0x1C] - ldr r0, [r4, 0x70] - ldr r3, _0804565C - adds r0, r3 - mov r5, r9 - strb r5, [r0] - ldr r0, [r4, 0x70] - movs r1, 0xB4 - lsls r1, 1 - adds r0, r1 - strb r7, [r0] - cmp r7, 0 - beq _08045636 - ldr r3, _08045660 - movs r2, 0x1 - adds r1, r7, 0 -_08045626: - mov r5, r9 - adds r0, r5, r3 - strb r2, [r0] - movs r0, 0x1 - add r9, r0 - subs r1, 0x1 - cmp r1, 0 - bne _08045626 -_08045636: - bl sub_8045ACC - ldr r1, _08045654 - ldr r0, [r1] - movs r2, 0xCD - lsls r2, 3 - adds r0, r2 - ldrh r2, [r0] - adds r1, r2, 0x1 - strh r1, [r0] - strh r2, [r4, 0x26] - adds r0, r4, 0 - b _08045672 - .align 2, 0 -_08045650: .4byte 0x00000ebc -_08045654: .4byte gDungeon -_08045658: .4byte 0x0001358c -_0804565C: .4byte 0x00000167 -_08045660: .4byte gUnknown_202EE76 -_08045664: - movs r3, 0x82 - lsls r3, 2 - adds r2, r3 - adds r5, 0x1 - cmp r5, 0xF - ble _0804557A -_08045670: - movs r0, 0 -_08045672: - add sp, 0x8 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_804550C - - thumb_func_start sub_8045684 -sub_8045684: - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - mov r10, r1 - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - lsls r2, 24 - lsrs r2, 24 - mov r9, r2 - movs r5, 0 - ldr r7, _080456E4 - ldr r6, _080456E8 -_080456A2: - ldr r0, [r7] - lsls r1, r5, 2 - ldr r2, _080456EC - adds r0, r2 - adds r0, r1 - ldr r4, [r0] - adds r0, r4, 0 - bl EntityExists - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0 - bne _080456F0 - movs r0, 0x2 - str r0, [r4] - ldr r0, [r7] - adds r0, r6 - str r0, [r4, 0x70] - mov r2, r8 - strb r2, [r0] - ldr r0, [r4, 0x70] - mov r2, r9 - strb r2, [r0, 0x1] - str r1, [r4, 0x1C] - adds r0, r4, 0 - adds r0, 0x22 - strb r1, [r0] - mov r2, r10 - ldr r0, [r2] - str r0, [r4, 0x4] - strh r1, [r4, 0x26] - adds r0, r4, 0 - b _080456FA - .align 2, 0 -_080456E4: .4byte gDungeon -_080456E8: .4byte 0x00003908 -_080456EC: .4byte 0x0001371c -_080456F0: - adds r6, 0x4 - adds r5, 0x1 - cmp r5, 0x3F - ble _080456A2 - movs r0, 0 -_080456FA: - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_8045684 - - thumb_func_start sub_8045708 -sub_8045708: - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - mov r8, r0 - ldr r1, _08045744 - ldr r0, _08045748 - ldr r0, [r0] - ldr r2, _0804574C - adds r0, r2 - movs r3, 0 - ldrsh r0, [r0, r3] - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0x1 - bne _0804579C - mov r1, r8 - movs r2, 0 - ldrsh r0, [r1, r2] - movs r3, 0x2 - ldrsh r1, [r1, r3] - bl GetTileSafe - ldrh r1, [r0] - movs r0, 0x3 - ands r0, r1 - cmp r0, 0x2 - bne _0804579C - b _080457C4 - .align 2, 0 -_08045744: .4byte gDungeonWaterType -_08045748: .4byte gDungeon -_0804574C: .4byte 0x00003a0e -_08045750: - movs r0, 0x3 - str r0, [r4] - ldr r0, _08045798 - adds r1, r6, r0 - mov r2, r9 - ldr r0, [r2] - adds r0, r1 - str r0, [r4, 0x70] - mov r3, r8 - ldr r0, [r3] - str r0, [r4, 0x4] - movs r1, 0 - ldrsh r0, [r3, r1] - lsls r1, r0, 1 - adds r1, r0 - lsls r1, 3 - adds r1, 0x4 - lsls r1, 8 - movs r2, 0x2 - ldrsh r0, [r3, r2] - lsls r2, r0, 1 - adds r2, r0 - lsls r2, 3 - adds r2, 0x4 - lsls r2, 8 - adds r0, r4, 0 - bl SetEntityPixelPos - movs r0, 0 - strh r7, [r4, 0x26] - adds r1, r4, 0 - adds r1, 0x22 - strb r0, [r1] - str r7, [r4, 0x1C] - adds r0, r4, 0 - b _080457C6 - .align 2, 0 -_08045798: .4byte 0x00003804 -_0804579C: - movs r5, 0 - ldr r3, _080457D4 - mov r9, r3 -_080457A2: - mov r1, r9 - ldr r0, [r1] - lsls r6, r5, 2 - ldr r2, _080457D8 - adds r0, r2 - adds r0, r6 - ldr r4, [r0] - adds r0, r4, 0 - bl EntityExists - lsls r0, 24 - lsrs r7, r0, 24 - cmp r7, 0 - beq _08045750 - adds r5, 0x1 - cmp r5, 0x3F - ble _080457A2 -_080457C4: - movs r0, 0 -_080457C6: - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r1} - bx r1 - .align 2, 0 -_080457D4: .4byte gDungeon -_080457D8: .4byte 0x0001361c - thumb_func_end sub_8045708 - - thumb_func_start sub_80457DC -sub_80457DC: - push {r4-r6,lr} - adds r4, r0, 0 - movs r0, 0x5 - str r0, [r4] - movs r6, 0 - movs r5, 0 - strh r5, [r4, 0x4] - strh r5, [r4, 0x6] - adds r0, r4, 0 - movs r1, 0 - movs r2, 0 - bl SetEntityPixelPos - strh r5, [r4, 0x26] - adds r4, 0x22 - strb r6, [r4] - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_80457DC - - thumb_func_start sub_8045804 -sub_8045804: - push {r4-r6,lr} - adds r4, r0, 0 - bl GetEntityType - cmp r0, 0x1 - beq _0804581C - cmp r0, 0x1 - bcc _08045880 - cmp r0, 0x5 - beq _08045880 -_08045818: - movs r0, 0x1 - b _08045882 -_0804581C: - adds r0, r4, 0 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0 - beq _08045880 - ldr r0, _08045874 - ldr r1, [r0] - ldr r0, _08045878 - adds r2, r1, r0 - ldr r5, [r2, 0x10] - ldr r3, [r4, 0x70] - ldrb r0, [r3, 0x6] - cmp r0, 0 - beq _08045818 - ldr r6, _0804587C - adds r0, r1, r6 - ldrb r0, [r0] - cmp r0, 0 - bne _0804584C - adds r0, r3, 0 - adds r0, 0xE4 - ldrb r0, [r0] - cmp r0, 0x1 - beq _08045880 -_0804584C: - adds r0, r2, 0 - adds r0, 0x23 - ldrb r0, [r0] - cmp r0, 0 - bne _08045818 - adds r0, r2, 0 - adds r0, 0x25 - ldrb r0, [r0] - cmp r0, 0 - bne _08045818 - cmp r5, 0 - beq _08045880 - adds r1, r4, 0x4 - adds r0, r2, 0 - bl IsPositionActuallyInSight - lsls r0, 24 - lsrs r0, 24 - b _08045882 - .align 2, 0 -_08045874: .4byte gDungeon -_08045878: .4byte 0x000181e8 -_0804587C: .4byte 0x0001820f -_08045880: - movs r0, 0 -_08045882: - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_8045804 - thumb_func_start sub_8045888 sub_8045888: push {r4,r5,lr} diff --git a/include/code_80450F8.h b/include/code_80450F8.h new file mode 100644 index 000000000..abf7c7d92 --- /dev/null +++ b/include/code_80450F8.h @@ -0,0 +1,10 @@ +#ifndef GUARD_CODE_80227B8_H +#define GUARD_CODE_80227B8_H + +#include "structs/dungeon_entity.h" + +Entity *sub_8045684(u8 a, Position *pos, u8 c); +Entity *sub_8045708(Position *pos); +void sub_80457DC(Entity* ent); + +#endif // GUARD_CODE_80227B8_H \ No newline at end of file diff --git a/include/structs/axdata.h b/include/structs/axdata.h index 8719322ad..cbc027b1f 100644 --- a/include/structs/axdata.h +++ b/include/structs/axdata.h @@ -84,7 +84,12 @@ struct axObject u8 unk45_orientation; u8 unk46; u8 unk47; - /* 0x48 */ struct EntityInfo* info; + /* 0x48 */ union + { + struct Item* item; + struct EntityInfo* monster; + struct EntTrapInfo* trap; + } info; }; // size: 0x80? (assuming it's the last sub-struct of GroundLives) diff --git a/include/structs/dungeon_entity.h b/include/structs/dungeon_entity.h index 712807bb5..579c6e3f9 100644 --- a/include/structs/dungeon_entity.h +++ b/include/structs/dungeon_entity.h @@ -1,15 +1,15 @@ #ifndef GUARD_DUNGEON_ENTITY_H #define GUARD_DUNGEON_ENTITY_H -#include "constants/global.h" #include "constants/dungeon_action.h" -#include "structs/str_position.h" -#include "sprite.h" +#include "constants/global.h" +#include "constants/status.h" +#include "structs/axdata.h" #include "structs/str_items.h" #include "structs/str_moves.h" -#include "structs/axdata.h" - +#include "structs/str_position.h" #include "number_util.h" +#include "sprite.h" #define MAX_STAT_STAGE 20 #define STAT_MULTIPLIER_THRESHOLD 63 @@ -352,6 +352,13 @@ typedef struct EntityInfo u8 unk204; } EntityInfo; +// size: 0x4 +typedef struct EntTrapInfo +{ + /* 0x0 */ u8 unk0; + /* 0x0 */ u8 unk1; +} EntTrapInfo; + // size: 0x74 | Used for Pokémon, items, and traps. typedef struct Entity { @@ -472,7 +479,7 @@ static inline void SetExpMultplier(EntityInfo *info) static inline EntityInfo *GetEntInfo(Entity *ent) { - return ent->axObj.info; + return ent->axObj.info.monster; } #endif diff --git a/include/structs/str_dungeon.h b/include/structs/str_dungeon.h index 08200e67d..66642c31b 100644 --- a/include/structs/str_dungeon.h +++ b/include/structs/str_dungeon.h @@ -354,9 +354,9 @@ typedef struct Dungeon /* 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] + Item unk3804[DUNGEON_MAX_ITEMS]; /* 0x3904 */ s16 unk3904; - EntityInfo *unk3908[DUNGEON_MAX_TRAPS]; // TODO: TrapInfo[DUNGEON_MAX_TRAPS] + EntTrapInfo unk3908[DUNGEON_MAX_TRAPS]; /* 0x3A08 */ bool8 unk3A08; /* 0x3A09 */ bool8 unk3A09; /* 0x3A0A */ bool8 unk3A0A; diff --git a/include/tile_types.h b/include/tile_types.h index ef99fbdab..78ce34014 100644 --- a/include/tile_types.h +++ b/include/tile_types.h @@ -7,10 +7,10 @@ #define DUNGEON_WATER_TYPE_LAVA 1 #define DUNGEON_WATER_TYPE_WATER 2 -extern const u8 gDungeonWaterType[]; +extern const u8 gDungeonWaterType[76]; void sub_804AE84(Position *pos); bool8 IsTileGround(Tile *tile); bool8 IsWaterTileset(); -#endif +#endif // GUARD_TILE_TYPES_H \ No newline at end of file diff --git a/ld_script.txt b/ld_script.txt index ab9d054e3..7c02dd494 100755 --- a/ld_script.txt +++ b/ld_script.txt @@ -216,6 +216,7 @@ SECTIONS { src/dungeon_action.o(.text); src/code_8044CC8.o(.text); src/dungeon_util.o(.text); + src/code_80450F8.o(.text); asm/code_80450F8.o(.text); src/dungeon_visibility.o(.text); src/code_8045A00.o(.text); diff --git a/src/code_80450F8.c b/src/code_80450F8.c new file mode 100644 index 000000000..243bb1e9f --- /dev/null +++ b/src/code_80450F8.c @@ -0,0 +1,491 @@ +#include "global.h" +#include "structs/str_dungeon.h" +#include "code_80450F8.h" +#include "dungeon_map_access.h" +#include "dungeon_range.h" +#include "dungeon_util.h" +#include "tile_types.h" + +// Related to sub_80828E0 +// 93.08% https://decomp.me/scratch/AYGBN +NAKED +Entity *sub_80453AC(s16 id) +{ + asm_unified( +" push {r4-r7,lr}\n" +" mov r7, r10\n" +" mov r6, r9\n" +" mov r5, r8\n" +" push {r5-r7}\n" +" lsls r0, 16\n" +" asrs r0, 16\n" +" mov r8, r0\n" +" movs r0, 0x1\n" +" negs r0, r0\n" +" mov r9, r0\n" +" mov r0, r8\n" +" bl GetBodySize\n" +" lsls r0, 24\n" +" lsrs r6, r0, 24\n" +" movs r5, 0\n" +" movs r0, 0x6\n" +" subs r3, r0, r6\n" +" ldr r4, _080453D8\n" +" b _080453DE\n" +" .align 2, 0\n" +"_080453D8: .4byte gUnknown_202EE70\n" +"_080453DC:\n" +" adds r5, 0x1\n" +"_080453DE:\n" +" cmp r5, r3\n" +" bgt _08045400\n" +" movs r2, 0\n" +" cmp r2, r6\n" +" bge _080453FA\n" +" adds r1, r5, r4\n" +" b _080453F4\n" +"_080453EC:\n" +" adds r1, 0x1\n" +" adds r2, 0x1\n" +" cmp r2, r6\n" +" bge _080453FA\n" +"_080453F4:\n" +" ldrb r0, [r1]\n" +" cmp r0, 0\n" +" beq _080453EC\n" +"_080453FA:\n" +" cmp r2, r6\n" +" bne _080453DC\n" +" mov r9, r5\n" +"_08045400:\n" +" movs r0, 0x1\n" +" negs r0, r0\n" +" cmp r9, r0\n" +" beq _080454FC\n" +" movs r5, 0\n" +" ldr r7, _080454DC\n" +"_0804540C:\n" +" ldr r1, _080454E0\n" +" ldr r0, [r1]\n" +" lsls r1, r5, 2\n" +" ldr r2, _080454E4\n" +" adds r0, r2\n" +" adds r0, r1\n" +" ldr r4, [r0]\n" +" adds r0, r4, 0\n" +" bl EntityExists\n" +" lsls r0, 24\n" +" lsrs r0, 24\n" +" mov r10, r0\n" +" cmp r0, 0\n" +" bne _080454F0\n" +" movs r0, 0x1\n" +" str r0, [r4]\n" +" adds r0, r4, 0\n" +" adds r0, 0x24\n" +" strb r5, [r0]\n" +" ldr r1, _080454E0\n" +" ldr r0, [r1]\n" +" adds r0, r7\n" +" str r0, [r4, 0x70]\n" +" mov r2, r8\n" +" strh r2, [r0, 0x2]\n" +" movs r0, 0\n" +" mov r1, r8\n" +" bl GetMonsterApparentID\n" +" ldr r1, [r4, 0x70]\n" +" strh r0, [r1, 0x4]\n" +" ldr r0, [r4, 0x70]\n" +" movs r5, 0\n" +" strb r5, [r0, 0x6]\n" +" movs r0, 0\n" +" mov r1, r8\n" +" bl GetMonsterApparentID\n" +" lsls r0, 16\n" +" asrs r0, 16\n" +" bl GetSpriteData\n" +" str r0, [r4, 0x64]\n" +" mov r1, r9\n" +" lsls r0, r1, 4\n" +" adds r0, 0x40\n" +" adds r1, r4, 0\n" +" adds r1, 0x68\n" +" strh r0, [r1]\n" +" adds r1, 0x2\n" +" movs r0, 0x7\n" +" strb r0, [r1]\n" +" adds r0, r4, 0\n" +" adds r0, 0x6C\n" +" movs r2, 0\n" +" strb r2, [r0]\n" +" adds r1, 0x1\n" +" movs r0, 0xFF\n" +" strb r0, [r1]\n" +" adds r0, r4, 0\n" +" adds r0, 0x6D\n" +" movs r5, 0x1\n" +" strb r5, [r0]\n" +" adds r0, 0x2\n" +" strb r5, [r0]\n" +" mov r0, r10\n" +" str r0, [r4, 0x1C]\n" +" bl sub_8045ACC\n" +" ldr r0, [r4, 0x70]\n" +" ldr r1, _080454E8\n" +" adds r0, r1\n" +" mov r2, r9\n" +" strb r2, [r0]\n" +" ldr r0, [r4, 0x70]\n" +" movs r5, 0xB4\n" +" lsls r5, 1\n" +" adds r0, r5\n" +" strb r6, [r0]\n" +" cmp r6, 0\n" +" beq _080454C6\n" +" ldr r3, _080454EC\n" +" movs r2, 0x1\n" +" adds r1, r6, 0\n" +"_080454B6:\n" +" mov r5, r9\n" +" adds r0, r5, r3\n" +" strb r2, [r0]\n" +" movs r0, 0x1\n" +" add r9, r0\n" +" subs r1, 0x1\n" +" cmp r1, 0\n" +" bne _080454B6\n" +"_080454C6:\n" +" ldr r1, _080454E0\n" +" ldr r0, [r1]\n" +" movs r2, 0xCD\n" +" lsls r2, 3\n" +" adds r0, r2\n" +" ldrh r2, [r0]\n" +" adds r1, r2, 0x1\n" +" strh r1, [r0]\n" +" strh r2, [r4, 0x26]\n" +" adds r0, r4, 0\n" +" b _080454FE\n" +" .align 2, 0\n" +"_080454DC: .4byte 0x0000069c\n" +"_080454E0: .4byte gDungeon\n" +"_080454E4: .4byte 0x0001357c\n" +"_080454E8: .4byte 0x00000167\n" +"_080454EC: .4byte gUnknown_202EE70\n" +"_080454F0:\n" +" movs r0, 0x82\n" +" lsls r0, 2\n" +" adds r7, r0\n" +" adds r5, 0x1\n" +" cmp r5, 0x3\n" +" ble _0804540C\n" +"_080454FC:\n" +" movs r0, 0\n" +"_080454FE:\n" +" pop {r3-r5}\n" +" mov r8, r3\n" +" mov r9, r4\n" +" mov r10, r5\n" +" pop {r4-r7}\n" +" pop {r1}\n" +" bx r1" +); +} + +// Related to sub_8082A08 +// 91.51% https://decomp.me/scratch/Fp0Kw +NAKED +Entity *sub_804550C(s16 a) +{ + asm_unified( +" push {r4-r7,lr}\n" +" mov r7, r10\n" +" mov r6, r9\n" +" mov r5, r8\n" +" push {r5-r7}\n" +" sub sp, 0x8\n" +" lsls r0, 16\n" +" asrs r0, 16\n" +" mov r8, r0\n" +" movs r0, 0x1\n" +" negs r0, r0\n" +" mov r9, r0\n" +" mov r0, r8\n" +" bl GetBodySize\n" +" lsls r0, 24\n" +" lsrs r7, r0, 24\n" +" movs r5, 0\n" +" movs r0, 0x10\n" +" subs r3, r0, r7\n" +" ldr r4, _08045538\n" +" b _0804553E\n" +" .align 2, 0\n" +"_08045538: .4byte gUnknown_202EE76\n" +"_0804553C:\n" +" adds r5, 0x1\n" +"_0804553E:\n" +" cmp r5, r3\n" +" bgt _08045560\n" +" movs r2, 0\n" +" cmp r2, r7\n" +" bge _0804555A\n" +" adds r1, r5, r4\n" +" b _08045554\n" +"_0804554C:\n" +" adds r1, 0x1\n" +" adds r2, 0x1\n" +" cmp r2, r7\n" +" bge _0804555A\n" +"_08045554:\n" +" ldrb r0, [r1]\n" +" cmp r0, 0\n" +" beq _0804554C\n" +"_0804555A:\n" +" cmp r2, r7\n" +" bne _0804553C\n" +" mov r9, r5\n" +"_08045560:\n" +" movs r0, 0x1\n" +" negs r0, r0\n" +" cmp r9, r0\n" +" bne _0804556A\n" +" b _08045670\n" +"_0804556A:\n" +" movs r5, 0\n" +" movs r1, 0x1\n" +" mov r10, r1\n" +" ldr r2, _08045650\n" +" mov r3, r9\n" +" lsls r0, r3, 4\n" +" adds r0, 0xA0\n" +" str r0, [sp]\n" +"_0804557A:\n" +" ldr r1, _08045654\n" +" ldr r0, [r1]\n" +" lsls r1, r5, 2\n" +" ldr r3, _08045658\n" +" adds r0, r3\n" +" adds r0, r1\n" +" ldr r4, [r0]\n" +" adds r0, r4, 0\n" +" str r2, [sp, 0x4]\n" +" bl EntityExists\n" +" lsls r0, 24\n" +" lsrs r6, r0, 24\n" +" ldr r2, [sp, 0x4]\n" +" cmp r6, 0\n" +" bne _08045664\n" +" mov r0, r10\n" +" str r0, [r4]\n" +" adds r0, r4, 0\n" +" adds r0, 0x24\n" +" strb r5, [r0]\n" +" subs r0, 0x2\n" +" strb r6, [r0]\n" +" ldr r1, _08045654\n" +" ldr r0, [r1]\n" +" adds r0, r2\n" +" str r0, [r4, 0x70]\n" +" mov r2, r8\n" +" strh r2, [r0, 0x2]\n" +" movs r0, 0\n" +" mov r1, r8\n" +" bl GetMonsterApparentID\n" +" ldr r1, [r4, 0x70]\n" +" strh r0, [r1, 0x4]\n" +" ldr r0, [r4, 0x70]\n" +" mov r3, r10\n" +" strb r3, [r0, 0x6]\n" +" movs r0, 0\n" +" mov r1, r8\n" +" bl GetMonsterApparentID\n" +" lsls r0, 16\n" +" asrs r0, 16\n" +" bl GetSpriteData\n" +" str r0, [r4, 0x64]\n" +" adds r0, r4, 0\n" +" adds r0, 0x68\n" +" mov r5, sp\n" +" ldrh r5, [r5]\n" +" strh r5, [r0]\n" +" adds r1, r4, 0\n" +" adds r1, 0x6A\n" +" movs r0, 0x7\n" +" strb r0, [r1]\n" +" adds r0, r4, 0\n" +" adds r0, 0x6C\n" +" movs r1, 0\n" +" strb r1, [r0]\n" +" adds r1, r4, 0\n" +" adds r1, 0x6B\n" +" movs r0, 0xFF\n" +" strb r0, [r1]\n" +" adds r0, r4, 0\n" +" adds r0, 0x6D\n" +" mov r2, r10\n" +" strb r2, [r0]\n" +" adds r0, 0x2\n" +" strb r2, [r0]\n" +" str r6, [r4, 0x1C]\n" +" ldr r0, [r4, 0x70]\n" +" ldr r3, _0804565C\n" +" adds r0, r3\n" +" mov r5, r9\n" +" strb r5, [r0]\n" +" ldr r0, [r4, 0x70]\n" +" movs r1, 0xB4\n" +" lsls r1, 1\n" +" adds r0, r1\n" +" strb r7, [r0]\n" +" cmp r7, 0\n" +" beq _08045636\n" +" ldr r3, _08045660\n" +" movs r2, 0x1\n" +" adds r1, r7, 0\n" +"_08045626:\n" +" mov r5, r9\n" +" adds r0, r5, r3\n" +" strb r2, [r0]\n" +" movs r0, 0x1\n" +" add r9, r0\n" +" subs r1, 0x1\n" +" cmp r1, 0\n" +" bne _08045626\n" +"_08045636:\n" +" bl sub_8045ACC\n" +" ldr r1, _08045654\n" +" ldr r0, [r1]\n" +" movs r2, 0xCD\n" +" lsls r2, 3\n" +" adds r0, r2\n" +" ldrh r2, [r0]\n" +" adds r1, r2, 0x1\n" +" strh r1, [r0]\n" +" strh r2, [r4, 0x26]\n" +" adds r0, r4, 0\n" +" b _08045672\n" +" .align 2, 0\n" +"_08045650: .4byte 0x00000ebc\n" +"_08045654: .4byte gDungeon\n" +"_08045658: .4byte 0x0001358c\n" +"_0804565C: .4byte 0x00000167\n" +"_08045660: .4byte gUnknown_202EE76\n" +"_08045664:\n" +" movs r3, 0x82\n" +" lsls r3, 2\n" +" adds r2, r3\n" +" adds r5, 0x1\n" +" cmp r5, 0xF\n" +" ble _0804557A\n" +"_08045670:\n" +" movs r0, 0\n" +"_08045672:\n" +" add sp, 0x8\n" +" pop {r3-r5}\n" +" mov r8, r3\n" +" mov r9, r4\n" +" mov r10, r5\n" +" pop {r4-r7}\n" +" pop {r1}\n" +" bx r1" +); +} + +Entity *sub_8045684(u8 a, Position *pos, u8 c) +{ + Entity *entity; + s32 i; + + for (i = 0; i < DUNGEON_MAX_TRAPS; i++) { + entity = gDungeon->traps[i]; + if (!EntityExists(entity)) { + entity->type = ENTITY_TRAP; + entity->axObj.info.trap = &gDungeon->unk3908[i]; + entity->axObj.info.trap->unk0 = a; + entity->axObj.info.trap->unk1 = c; + + entity->unk1C = 0; + entity->unk22 = 0; + entity->pos = *pos; + entity->spawnGenID = 0; + return entity; + } + } + + return NULL; +} + +Entity *sub_8045708(Position *pos) +{ + s32 i; + Entity *ent; + + if (gDungeonWaterType[gDungeon->tileset] == DUNGEON_WATER_TYPE_LAVA + && (GetTileSafe(pos->x, pos->y)->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY)) == TERRAIN_TYPE_SECONDARY) { + return NULL; + } + + for (i = 0; i < DUNGEON_MAX_ITEMS; i++) { + ent = gDungeon->items[i]; + if (!EntityExists(ent)) { + ent->type = ENTITY_ITEM; + ent->axObj.info.item = &gDungeon->unk3804[i]; + + ent->pos = *pos; + SetEntityPixelPos(ent, ((pos->x * 24) + 4) * 0x100, ((pos->y * 24) + 4) * 0x100); + ent->spawnGenID = 0; + ent->unk22 = 0; + ent->unk1C = 0; + return ent; + } + } + + return NULL; +} + +void sub_80457DC(Entity* ent) +{ + ent->type = ENTITY_UNK_5; + ent->pos.x = 0; + ent->pos.y = 0; + SetEntityPixelPos(ent, 0, 0); + ent->spawnGenID = 0; + ent->unk22 = 0; +} + +bool8 sub_8045804(Entity *ent) +{ + UnkDungeonGlobal_unk181E8_sub* saveTyping; + Entity* camTarget; + EntityInfo *entInfo; + + switch (GetEntityType(ent)) { + case ENTITY_MONSTER: { + if (ent->isVisible) { + saveTyping = &gDungeon->unk181e8; + camTarget = saveTyping->cameraTarget; + entInfo = GetEntInfo(ent); + + if (!entInfo->isNotTeamMember) + return TRUE; + + if (!saveTyping->unk1820F && entInfo->transformStatus.transformStatus == STATUS_INVISIBLE) + return FALSE; + + if (saveTyping->unk1820B || saveTyping->unk1820D) + return TRUE; + + if (camTarget != NULL) + return IsPositionActuallyInSight(&saveTyping->cameraPos, &ent->pos); + } + return FALSE; + } + default: { + return TRUE; + } + case ENTITY_NOTHING: + case ENTITY_UNK_5: { + return FALSE; + } + } +} \ No newline at end of file diff --git a/src/code_805D8C8_1.c b/src/code_805D8C8_1.c index bc9c07e90..a20dc29d6 100644 --- a/src/code_805D8C8_1.c +++ b/src/code_805D8C8_1.c @@ -2297,7 +2297,7 @@ typedef struct UnkTextStruct3 { } UnkTextStruct3; extern void sub_803ECB4(UnkTextStruct3 *a0, u8 a1); -void CreateFieldItemMenu(s32 a0, Entity *a1, bool8 a2, bool8 a3, UnkTextStruct3 *a4, UnkTextStruct2_sub2 *a5); +static void CreateFieldItemMenu(s32 a0, Entity *a1, bool8 a2, bool8 a3, UnkTextStruct3 *a4, UnkTextStruct2_sub2 *a5); // Inline needed to (fake?)match. static inline void sub_805FC30_SetUpTxtStruct(UnkTextStruct3 *src) @@ -2660,7 +2660,7 @@ bool8 sub_805FD74(Entity * a0, struct UnkMenuBitsStruct *a1) extern const struct UnkTextStruct2 gUnknown_8106B6C; extern const struct unkStruct_8090F58 gUnknown_8106B60; -void CreateFieldItemMenu(s32 a0, Entity *a1, bool8 a2, bool8 a3, UnkTextStruct3 *a4, UnkTextStruct2_sub2 *a5) +static void CreateFieldItemMenu(s32 a0, Entity *a1, bool8 a2, bool8 a3, UnkTextStruct3 *a4, UnkTextStruct2_sub2 *a5) { s32 i, x, y; s32 r10; @@ -2785,8 +2785,9 @@ void CreateFieldItemMenu(s32 a0, Entity *a1, bool8 a2, bool8 a3, UnkTextStruct3 default: { Entity *chosenTeamMember = gDungeon->teamPokemon[sUnknown_202F248[a0] - MAX_TEAM_MEMBERS]; if (EntityExists(chosenTeamMember)) { - Item *item = &GetEntInfo(chosenTeamMember)->heldItem; - SetMessageArgument_2(gFormatBuffer_Monsters[0], chosenTeamMember->axObj.info, 0); + EntityInfo *monInfo = GetEntInfo(chosenTeamMember); + Item *item = &monInfo->heldItem; + SetMessageArgument_2(gFormatBuffer_Monsters[0], monInfo, 0); PrintFormattedStringOnWindow(x, 0, gUnknown_80FE940, 0, 0); if (item->flags & ITEM_FLAG_EXISTS) { gUnknown_202EE10.unk1A++; diff --git a/src/code_806E8B0.c b/src/code_806E8B0.c index 0d8e7b0a3..8da4a347b 100644 --- a/src/code_806E8B0.c +++ b/src/code_806E8B0.c @@ -17,6 +17,7 @@ #include "status.h" #include "type_chart.h" #include "dungeon_random.h" +#include "code_80450F8.h" #include "code_8045A00.h" #include "dungeon_items.h" #include "structs/str_damage.h" @@ -30,7 +31,6 @@ extern bool8 sub_806E100(struct unkStruct_80943A8 *param_1, Entity *pokemon, Ent extern void sub_8041B74(Entity *pokemon); extern void sub_8041B5C(Entity *pokemon); extern void HandleDealingDamage(Entity *attacker, Entity *target, struct DamageStruct *dmgStruct, bool32 isFalseSwipe, bool32 giveExp, s16 arg4, bool32 arg8, s32 argC); -extern void sub_80457DC(Entity *); extern const s32 gUnknown_80F54B4[NUM_EFFECTIVENESS][NUM_EFFECTIVENESS]; extern const s32 gUnknown_80F504C[]; diff --git a/src/code_80718D8.c b/src/code_80718D8.c index c84022775..fda3037bd 100644 --- a/src/code_80718D8.c +++ b/src/code_80718D8.c @@ -5,6 +5,7 @@ #include "dungeon_leader.h" #include "dungeon_message.h" #include "code_8041AD0.h" +#include "code_80450F8.h" #include "code_8045A00.h" #include "code_8077274_1.h" #include "constants/dungeon.h" diff --git a/src/dungeon_serializer.c b/src/dungeon_serializer.c index 384165657..9016fd767 100644 --- a/src/dungeon_serializer.c +++ b/src/dungeon_serializer.c @@ -1,6 +1,7 @@ #include "global.h" #include "globaldata.h" #include "code_800F958.h" +#include "code_80450F8.h" #include "code_8045A00.h" #include "code_805D8C8.h" #include "code_806CD90.h" @@ -133,7 +134,6 @@ 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) @@ -1145,10 +1145,10 @@ static Entity* sub_80828E0(s16 id, s16 apparentID, s32 index) 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.info.monster = &gDungeon->unk69C[index]; + entity->axObj.info.monster->id = id_; + entity->axObj.info.monster->apparentID = appID; + entity->axObj.info.monster->isNotTeamMember = FALSE; entity->axObj.spriteFile = GetSpriteData(appID); entity->axObj.unk40_maybeAnimTimer = (r4 * 0x10) + 0x40; @@ -1160,8 +1160,8 @@ static Entity* sub_80828E0(s16 id, s16 apparentID, s32 index) entity->unk1C = 0; sub_8045ACC(); - entity->axObj.info->unk167 = r4; - entity->axObj.info->unk168 = apparentBodySize; + entity->axObj.info.monster->unk167 = r4; + entity->axObj.info.monster->unk168 = apparentBodySize; for (r1 = 0; r1 < apparentBodySize; r1++) { gUnknown_202EE70[r4] = 1; @@ -1213,10 +1213,10 @@ static Entity* sub_8082A08(s16 id, s16 apparentID, s32 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.info.monster = &gDungeon->unkEBC[index]; + entity->axObj.info.monster->id = id_; + entity->axObj.info.monster->apparentID = appID; + entity->axObj.info.monster->isNotTeamMember = TRUE; entity->axObj.spriteFile = GetSpriteData(appID); entity->axObj.unk40_maybeAnimTimer = (r8 * 0x10) + 0xA0; @@ -1227,8 +1227,8 @@ static Entity* sub_8082A08(s16 id, s16 apparentID, s32 index) entity->axObj.unk47 = 1; entity->unk1C = 0; - entity->axObj.info->unk167 = r8; - entity->axObj.info->unk168 = apparentBodySize; + entity->axObj.info.monster->unk167 = r8; + entity->axObj.info.monster->unk168 = apparentBodySize; for (r1 = 0; r1 < apparentBodySize; r1++) { gUnknown_202EE76[r8] = 1; diff --git a/src/dungeon_util_1.c b/src/dungeon_util_1.c index 423c50056..677a040b2 100644 --- a/src/dungeon_util_1.c +++ b/src/dungeon_util_1.c @@ -3,6 +3,7 @@ #include "code_803E46C.h" #include "code_803E668.h" +#include "code_80450F8.h" #include "code_806CD90.h" #include "constants/direction.h" #include "constants/dungeon.h" @@ -21,7 +22,6 @@ extern void sub_803F4A0(u32); extern void sub_803F878(s32, s32); extern void sub_8068FE0(Entity *, u32, Entity*); -extern void sub_80457DC(Entity *); extern void sub_80694C0(Entity *, s32, s32, u32); diff --git a/src/move_actions.c b/src/move_actions.c index f245bb2a0..479362d3e 100644 --- a/src/move_actions.c +++ b/src/move_actions.c @@ -186,7 +186,7 @@ extern void sub_806F370(Entity *r0, Entity *r1, u32, u32, u8 *, u8, s32, u32, u3 extern void sub_804652C(Entity *, Entity *, Item *, u32, Position *); extern void CalcDamage(Entity *, Entity *, u8, u32, u32, s32 *, u32, u16, u32); extern void sub_8045C28(Item *, u8 , u8); -extern void sub_805A7D4(Entity *, Entity *, Item *, Position *); +static void sub_805A7D4(Entity *, Entity *, Item *, Position *); extern void MudWaterSportEffect(u32); extern void CalcDamage(Entity *, Entity *, u8, u32, u32, s32 *, u32, u16, u32); extern void sub_806A6E8(Entity *); @@ -2632,7 +2632,7 @@ bool8 KnockOffMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_ } } -void sub_805A7D4(Entity * pokemon, Entity * target, Item *item, Position *pos) +static void sub_805A7D4(Entity * pokemon, Entity * target, Item *item, Position *pos) { Entity stackEntity; @@ -2640,7 +2640,7 @@ void sub_805A7D4(Entity * pokemon, Entity * target, Item *item, Position *pos) stackEntity.unk24 = 0; stackEntity.isVisible = TRUE; stackEntity.unk22 = 0; - stackEntity.axObj.info = (EntityInfo*) item; + stackEntity.axObj.info.item = item; stackEntity.pos.x = target->pos.x + pos->x; stackEntity.pos.y = target->pos.y + pos->y; SetEntityPixelPos(&stackEntity,(target->pos.x * 0x18 + 4) * 0x100, diff --git a/src/tile_types.c b/src/tile_types.c index 078eee7b8..fc0f64d2c 100644 --- a/src/tile_types.c +++ b/src/tile_types.c @@ -5,7 +5,7 @@ #include "dungeon_map_access.h" #include "dungeon_util.h" -const u8 gDungeonWaterType[] = { +const u8 gDungeonWaterType[76] = { DUNGEON_WATER_TYPE_NONE, DUNGEON_WATER_TYPE_NONE, DUNGEON_WATER_TYPE_NONE, diff --git a/src/trap.c b/src/trap.c index fcd798538..abc60d817 100644 --- a/src/trap.c +++ b/src/trap.c @@ -2,6 +2,7 @@ #include "trap.h" #include "code_803E668.h" +#include "code_80450F8.h" #include "code_8041AD0.h" #include "code_8045A00.h" #include "dungeon_message.h" @@ -85,7 +86,6 @@ void sub_8071DA4(Entity *); extern u8 sub_803F428(Position *pos); void sub_806A1E8(Entity *pokemon); u8 sub_803D6FC(void); -Entity *sub_8045684(u8, Position *, u8); extern void sub_807DF38(Entity *pokemon, Entity *target, Position *pos, u32, u8 moveType, s16); void sub_807FC3C(Position *pos, u32 trapID, u32 param_3) From 0df055bcc6fc09fd67ae7c0a802e7d2280ae404b Mon Sep 17 00:00:00 2001 From: Kermalis <29823718+Kermalis@users.noreply.github.com> Date: Sun, 10 Nov 2024 22:51:33 -0500 Subject: [PATCH 09/16] Replace EntTrapInfo with Trap --- include/code_80450F8.h | 2 +- include/dungeon_util.h | 15 ++++++++++----- include/structs/axdata.h | 2 +- include/structs/dungeon_entity.h | 12 ------------ include/structs/str_dungeon.h | 3 ++- include/structs/str_traps.h | 5 +++-- src/code_803E724.c | 12 ++++++------ src/code_80450F8.c | 15 +++++++++------ src/code_806E8B0.c | 1 + src/code_8072B78.c | 4 ++-- src/code_80861A8.c | 1 + src/dungeon_util.c | 8 ++++---- src/status_checks.c | 2 +- 13 files changed, 41 insertions(+), 41 deletions(-) diff --git a/include/code_80450F8.h b/include/code_80450F8.h index abf7c7d92..82374dd0c 100644 --- a/include/code_80450F8.h +++ b/include/code_80450F8.h @@ -3,7 +3,7 @@ #include "structs/dungeon_entity.h" -Entity *sub_8045684(u8 a, Position *pos, u8 c); +Entity *sub_8045684(u8 trapID, Position *pos, u8 c); Entity *sub_8045708(Position *pos); void sub_80457DC(Entity* ent); diff --git a/include/dungeon_util.h b/include/dungeon_util.h index b28f72e31..e2b1d27e2 100644 --- a/include/dungeon_util.h +++ b/include/dungeon_util.h @@ -11,13 +11,18 @@ extern const Position gAdjacentTileOffsets[NUM_DIRECTIONS]; bool8 EntityExists(Entity *pokemon); u32 GetEntityType(Entity *entity); u8 GetEntityRoom(Entity *entity); -Trap *GetTrapData(Entity *entity); -Trap* GetTrapData_1(Entity *entity); -Item *GetItemData(Entity *entity); struct Tile *GetTileAtEntitySafe(Entity *entity); -Item *GetItemData_1(Entity *entity); void sub_804535C(Entity *entity, Position32 *pos); void SetEntityPixelPos(Entity *entity, s32 x, s32 y); void IncreaseEntityPixelPos(Entity *entity, s32 x, s32 y); -#endif +static inline EntityInfo *GetEntInfo(Entity *entity) +{ + return entity->axObj.info.monster; +} +Item *GetItemData(Entity *entity); +Item *GetItemData_1(Entity *entity); +Trap *GetTrapData(Entity *entity); +Trap* GetTrapData_1(Entity *entity); + +#endif // GUARD_DUNGEON_UTIL_H \ No newline at end of file diff --git a/include/structs/axdata.h b/include/structs/axdata.h index cbc027b1f..a08151b7b 100644 --- a/include/structs/axdata.h +++ b/include/structs/axdata.h @@ -88,7 +88,7 @@ struct axObject { struct Item* item; struct EntityInfo* monster; - struct EntTrapInfo* trap; + struct Trap* trap; } info; }; diff --git a/include/structs/dungeon_entity.h b/include/structs/dungeon_entity.h index 579c6e3f9..0bf034ef3 100644 --- a/include/structs/dungeon_entity.h +++ b/include/structs/dungeon_entity.h @@ -352,13 +352,6 @@ typedef struct EntityInfo u8 unk204; } EntityInfo; -// size: 0x4 -typedef struct EntTrapInfo -{ - /* 0x0 */ u8 unk0; - /* 0x0 */ u8 unk1; -} EntTrapInfo; - // size: 0x74 | Used for Pokémon, items, and traps. typedef struct Entity { @@ -477,9 +470,4 @@ static inline void SetExpMultplier(EntityInfo *info) SetRegularExpMultiplier(info); } -static inline EntityInfo *GetEntInfo(Entity *ent) -{ - return ent->axObj.info.monster; -} - #endif diff --git a/include/structs/str_dungeon.h b/include/structs/str_dungeon.h index 66642c31b..5f20fad1b 100644 --- a/include/structs/str_dungeon.h +++ b/include/structs/str_dungeon.h @@ -7,6 +7,7 @@ #include "structs/map.h" #include "structs/rgb.h" #include "structs/str_position.h" +#include "structs/str_traps.h" #include "sprite.h" #define DUNGEON_MAX_SIZE_X 56 @@ -356,7 +357,7 @@ typedef struct Dungeon /* 0x3800 */ s16 deoxysForm; Item unk3804[DUNGEON_MAX_ITEMS]; /* 0x3904 */ s16 unk3904; - EntTrapInfo unk3908[DUNGEON_MAX_TRAPS]; + Trap unk3908[DUNGEON_MAX_TRAPS]; /* 0x3A08 */ bool8 unk3A08; /* 0x3A09 */ bool8 unk3A09; /* 0x3A0A */ bool8 unk3A0A; diff --git a/include/structs/str_traps.h b/include/structs/str_traps.h index 1c3d4f9e4..8727333da 100644 --- a/include/structs/str_traps.h +++ b/include/structs/str_traps.h @@ -3,10 +3,11 @@ #include "constants/trap.h" -typedef struct Trap +// size: 0x4 +typedef struct Trap { /* 0x0 */ u8 id; /* 0x1 */ u8 unk1; } Trap; -#endif // GUARD_STR_TRAPS_H +#endif // GUARD_STR_TRAPS_H \ No newline at end of file diff --git a/src/code_803E724.c b/src/code_803E724.c index 7c9233200..f33a118a8 100644 --- a/src/code_803E724.c +++ b/src/code_803E724.c @@ -849,9 +849,9 @@ void sub_803F27C(bool8 a0) strPtr->blinded = 0; strPtr->hallucinating = 0; strPtr->unk1820F = 0; - strPtr->unk1820D = 0; + strPtr->unk1820D = FALSE; strPtr->unk18211 = 0; - strPtr->unk1820E = 0; + strPtr->unk1820E = FALSE; strPtr->unk1820B = 0; strPtr->unk1820C = 0; } @@ -979,8 +979,8 @@ void sub_803F580(u8 a0) strPtr->cameraPixelPos.y = (cameraTarget->pixelPos.y / 256) - 96; if (HasHeldItem(cameraTarget, ITEM_X_RAY_SPECS) && info->isTeamLeader) { - strPtr->unk1820D = 1; - strPtr->unk1820E = 1; + strPtr->unk1820D = TRUE; + strPtr->unk1820E = TRUE; } else { strPtr->unk1820D = info->powerEars; @@ -1112,8 +1112,8 @@ void sub_803F878(s32 a0, s32 a1) strPtr->cameraPixelPos.y = (a1 / 256) - 96; strPtr->cameraPos.x = a0 / 6144; strPtr->cameraPos.y = a1 / 6144; - strPtr->unk1820D = 0; - strPtr->unk1820E = 0; + strPtr->unk1820D = FALSE; + strPtr->unk1820E = FALSE; strPtr->unk18211 = 0; strPtr->unk18216 = 0; diff --git a/src/code_80450F8.c b/src/code_80450F8.c index 243bb1e9f..6e1b42eb3 100644 --- a/src/code_80450F8.c +++ b/src/code_80450F8.c @@ -391,7 +391,7 @@ Entity *sub_804550C(s16 a) ); } -Entity *sub_8045684(u8 a, Position *pos, u8 c) +Entity *sub_8045684(u8 trapID, Position *pos, u8 c) { Entity *entity; s32 i; @@ -401,7 +401,7 @@ Entity *sub_8045684(u8 a, Position *pos, u8 c) if (!EntityExists(entity)) { entity->type = ENTITY_TRAP; entity->axObj.info.trap = &gDungeon->unk3908[i]; - entity->axObj.info.trap->unk0 = a; + entity->axObj.info.trap->id = trapID; entity->axObj.info.trap->unk1 = c; entity->unk1C = 0; @@ -457,19 +457,19 @@ bool8 sub_8045804(Entity *ent) { UnkDungeonGlobal_unk181E8_sub* saveTyping; Entity* camTarget; - EntityInfo *entInfo; + EntityInfo *monInfo; switch (GetEntityType(ent)) { case ENTITY_MONSTER: { if (ent->isVisible) { saveTyping = &gDungeon->unk181e8; camTarget = saveTyping->cameraTarget; - entInfo = GetEntInfo(ent); + monInfo = GetEntInfo(ent); - if (!entInfo->isNotTeamMember) + if (!monInfo->isNotTeamMember) return TRUE; - if (!saveTyping->unk1820F && entInfo->transformStatus.transformStatus == STATUS_INVISIBLE) + if (!saveTyping->unk1820F && monInfo->transformStatus.transformStatus == STATUS_INVISIBLE) return FALSE; if (saveTyping->unk1820B || saveTyping->unk1820D) @@ -480,6 +480,9 @@ bool8 sub_8045804(Entity *ent) } return FALSE; } + /*case ENTITY_TRAP: + case ENTITY_ITEM: + case ENTITY_UNK_4:*/ default: { return TRUE; } diff --git a/src/code_806E8B0.c b/src/code_806E8B0.c index 8da4a347b..c1862ccea 100644 --- a/src/code_806E8B0.c +++ b/src/code_806E8B0.c @@ -21,6 +21,7 @@ #include "code_8045A00.h" #include "dungeon_items.h" #include "structs/str_damage.h" +#include "dungeon_util.h" void sub_8042940(Entity *r0); void sub_80428B0(Entity *r0); diff --git a/src/code_8072B78.c b/src/code_8072B78.c index 12a3b08da..d3b1eddb1 100644 --- a/src/code_8072B78.c +++ b/src/code_8072B78.c @@ -2,9 +2,10 @@ #include "code_805D8C8.h" #include "code_806CD90.h" #include "dungeon_map_access.h" +#include "dungeon_message.h" #include "dungeon_movement.h" #include "dungeon_random.h" -#include "dungeon_message.h" +#include "dungeon_util.h" #include "moves.h" #include "pokemon_mid.h" #include "pokemon_mid.h" @@ -13,7 +14,6 @@ #include "structs/map.h" #include "structs/str_pokemon.h" -extern Position gAdjacentTileOffsets[]; extern u8 *gUnknown_80FE2EC[]; struct unkStruct_806B7F8 diff --git a/src/code_80861A8.c b/src/code_80861A8.c index df08b8531..e53b058e0 100644 --- a/src/code_80861A8.c +++ b/src/code_80861A8.c @@ -5,6 +5,7 @@ #include "code_803E668.h" #include "code_806CD90.h" #include "dungeon_music.h" +#include "dungeon_util.h" extern const unkStruct_2039DB0 gUnknown_8107380; diff --git a/src/dungeon_util.c b/src/dungeon_util.c index 56885cb0b..4db47a0a0 100644 --- a/src/dungeon_util.c +++ b/src/dungeon_util.c @@ -47,22 +47,22 @@ u8 GetEntityRoom(Entity *entity) Trap* GetTrapData(Entity *entity) { - return (Trap *) GetEntInfo(entity); + return entity->axObj.info.trap; } Item* GetItemData(Entity *entity) { - return (Item *) GetEntInfo(entity); + return entity->axObj.info.item; } Trap* GetTrapData_1(Entity *entity) { - return (Trap *) GetEntInfo(entity); + return entity->axObj.info.trap; } Item* GetItemData_1(Entity *entity) { - return (Item*) GetEntInfo(entity); + return entity->axObj.info.item; } Tile *GetTileAtEntity(Entity *entity) diff --git a/src/status_checks.c b/src/status_checks.c index e7643e2f6..14d05b60c 100644 --- a/src/status_checks.c +++ b/src/status_checks.c @@ -1,6 +1,6 @@ #include "global.h" #include "status_checks.h" - +#include "dungeon_util.h" #include "charge_move.h" #include "code_8045A00.h" #include "dungeon_message.h" From 875e3fefa1407981c62749611022b6245481ec2d Mon Sep 17 00:00:00 2001 From: Kermalis <29823718+Kermalis@users.noreply.github.com> Date: Mon, 11 Nov 2024 10:13:58 -0500 Subject: [PATCH 10/16] Complete code_80450F8.s --- asm/code_80450F8.s | 141 ----------------------------------------- include/code_803E724.h | 8 +++ ld_script.txt | 1 - src/code_803E724.c | 1 + src/code_8041AD0.c | 4 +- src/code_80450F8.c | 50 +++++++++++++++ src/dungeon_ai.c | 4 +- src/dungeon_message.c | 4 +- src/dungeon_move.c | 2 +- src/move_actions.c | 6 +- src/trap.c | 6 +- 11 files changed, 72 insertions(+), 155 deletions(-) delete mode 100644 asm/code_80450F8.s create mode 100644 include/code_803E724.h diff --git a/asm/code_80450F8.s b/asm/code_80450F8.s deleted file mode 100644 index 84d2e416b..000000000 --- a/asm/code_80450F8.s +++ /dev/null @@ -1,141 +0,0 @@ - #include "asm/constants/gba_constants.inc" - #include "asm/macros.inc" - - .syntax unified - - .text - - thumb_func_start sub_8045888 -sub_8045888: - push {r4,r5,lr} - adds r4, r0, 0 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0 - beq _08045988 - ldr r1, [r4, 0xC] - cmp r1, 0 - bge _0804589C - adds r1, 0xFF -_0804589C: - asrs r1, 8 - ldr r0, _080458F0 - ldr r2, [r0] - ldr r3, _080458F4 - adds r0, r2, r3 - movs r5, 0 - ldrsh r0, [r0, r5] - subs r3, r1, r0 - ldr r0, [r4, 0x10] - cmp r0, 0 - bge _080458B4 - adds r0, 0xFF -_080458B4: - asrs r0, 8 - ldr r5, _080458F8 - adds r1, r2, r5 - movs r5, 0 - ldrsh r1, [r1, r5] - subs r1, r0, r1 - movs r0, 0x20 - negs r0, r0 - cmp r3, r0 - blt _08045988 - cmp r1, r0 - blt _08045988 - movs r0, 0x88 - lsls r0, 1 - cmp r3, r0 - bgt _08045988 - cmp r1, 0xC0 - bgt _08045988 - ldr r0, _080458FC - adds r5, r2, r0 - adds r0, r4, 0 - bl GetEntityType - cmp r0, 0x5 - bhi _08045984 - lsls r0, 2 - ldr r1, _08045900 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .align 2, 0 -_080458F0: .4byte gDungeon -_080458F4: .4byte 0x000181f0 -_080458F8: .4byte 0x000181f2 -_080458FC: .4byte 0x000181e8 -_08045900: .4byte _08045904 - .align 2, 0 -_08045904: - .4byte _08045988 - .4byte _08045934 - .4byte _08045964 - .4byte _0804591C - .4byte _08045984 - .4byte _08045988 -_0804591C: - adds r0, r5, 0 - adds r0, 0x26 -_08045920: - ldrb r0, [r0] - cmp r0, 0 - bne _08045984 - adds r0, r4, 0x4 - bl sub_803F428 - lsls r0, 24 -_0804592E: - cmp r0, 0 - bne _08045984 - b _08045988 -_08045934: - ldr r1, [r4, 0x70] - ldrb r0, [r1, 0x6] - cmp r0, 0 - beq _08045984 - ldr r0, _0804595C - ldr r0, [r0] - ldr r2, _08045960 - adds r0, r2 - ldrb r0, [r0] - cmp r0, 0 - bne _08045954 - adds r0, r1, 0 - adds r0, 0xE4 - ldrb r0, [r0] - cmp r0, 0x1 - beq _08045988 -_08045954: - adds r0, r5, 0 - adds r0, 0x25 - b _08045920 - .align 2, 0 -_0804595C: .4byte gDungeon -_08045960: .4byte 0x0001820f -_08045964: - ldr r0, _0804597C - ldr r0, [r0] - ldr r3, _08045980 - adds r0, r3 - ldrb r0, [r0] - cmp r0, 0 - bne _08045984 - adds r0, r4, 0 - adds r0, 0x20 - ldrb r0, [r0] - b _0804592E - .align 2, 0 -_0804597C: .4byte gDungeon -_08045980: .4byte 0x0001820f -_08045984: - movs r0, 0x1 - b _0804598A -_08045988: - movs r0, 0 -_0804598A: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8045888 - - .align 2, 0 diff --git a/include/code_803E724.h b/include/code_803E724.h new file mode 100644 index 000000000..a72345f17 --- /dev/null +++ b/include/code_803E724.h @@ -0,0 +1,8 @@ +#ifndef GUARD_CODE_803E724_H +#define GUARD_CODE_803E724_H + +#include "structs/str_position.h" + +bool8 sub_803F428(Position *pos); + +#endif // GUARD_CODE_803E724_H \ No newline at end of file diff --git a/ld_script.txt b/ld_script.txt index 7c02dd494..33ff81de7 100755 --- a/ld_script.txt +++ b/ld_script.txt @@ -217,7 +217,6 @@ SECTIONS { src/code_8044CC8.o(.text); src/dungeon_util.o(.text); src/code_80450F8.o(.text); - asm/code_80450F8.o(.text); src/dungeon_visibility.o(.text); src/code_8045A00.o(.text); asm/code_8045A00.o(.text); diff --git a/src/code_803E724.c b/src/code_803E724.c index f33a118a8..58a187058 100644 --- a/src/code_803E724.c +++ b/src/code_803E724.c @@ -22,6 +22,7 @@ #include "dungeon_items.h" #include "constants/item.h" #include "constants/status.h" +#include "code_803E724.h" extern s32 gDungeonBrightness; extern u32 gUnknown_202EDD0; diff --git a/src/code_8041AD0.c b/src/code_8041AD0.c index 9a0baa45a..a7be0fc28 100644 --- a/src/code_8041AD0.c +++ b/src/code_8041AD0.c @@ -1,6 +1,7 @@ #include "global.h" #include "code_800E9A8.h" #include "code_803E46C.h" +#include "code_803E724.h" #include "code_804267C.h" #include "code_806CD90.h" #include "code_8041AD0.h" @@ -34,7 +35,6 @@ extern void sub_803ED30(u8, Entity *pokemon, u8, u8); extern void sub_804151C(Entity *pokemon, u32 r1, u8 r2); extern u32 sub_806F62C(u32); extern void PlaySoundEffect(u32); -extern u8 sub_803F428(Position *pos); extern void sub_8041550(Entity *pokemon, u32, u32, u32, u32, u32); void EntityUpdateStatusSprites(Entity *entity); @@ -869,7 +869,7 @@ void sub_80421C0(Entity *pokemon, u16 r1) void sub_80421EC(Position *pos, u16 r1) { - if(sub_803F428(pos) != 0) + if(sub_803F428(pos)) PlaySoundEffect(r1); } diff --git a/src/code_80450F8.c b/src/code_80450F8.c index 6e1b42eb3..6c87acccd 100644 --- a/src/code_80450F8.c +++ b/src/code_80450F8.c @@ -1,5 +1,6 @@ #include "global.h" #include "structs/str_dungeon.h" +#include "code_803E724.h" #include "code_80450F8.h" #include "dungeon_map_access.h" #include "dungeon_range.h" @@ -491,4 +492,53 @@ bool8 sub_8045804(Entity *ent) return FALSE; } } +} + +bool8 sub_8045888(Entity *ent) +{ + if (ent->isVisible) { + s32 x = (ent->pixelPos.x / 256) - gDungeon->unk181e8.cameraPixelPos.x; + s32 y = (ent->pixelPos.y / 256) - gDungeon->unk181e8.cameraPixelPos.y; + + if (x >= -32 && y >= -32 && x <= 272 && y <= 192) { + UnkDungeonGlobal_unk181E8_sub *saveTyping = &gDungeon->unk181e8; + + switch (GetEntityType(ent)) { + case ENTITY_ITEM: { + if (!saveTyping->unk1820E && !sub_803F428(&ent->pos)) + return FALSE; + break; + } + case ENTITY_MONSTER: { + EntityInfo *monInfo = GetEntInfo(ent); + + if (monInfo->isNotTeamMember) { + if (!gDungeon->unk181e8.unk1820F && monInfo->transformStatus.transformStatus == STATUS_INVISIBLE) + return FALSE; + + if (!saveTyping->unk1820D && !sub_803F428(&ent->pos)) + return FALSE; + } + break; + } + case ENTITY_TRAP: { + if (!gDungeon->unk181e8.unk1820F && !ent->isVisible) + return FALSE; + break; + } + case ENTITY_NOTHING: + case ENTITY_UNK_5: { + return FALSE; + } + case ENTITY_UNK_4: + default: { + break; + } + } + + return TRUE; + } + } + + return FALSE; } \ No newline at end of file diff --git a/src/dungeon_ai.c b/src/dungeon_ai.c index c1a6c04a5..fa05e9021 100644 --- a/src/dungeon_ai.c +++ b/src/dungeon_ai.c @@ -2,6 +2,7 @@ #include "dungeon_ai.h" #include "code_803E668.h" +#include "code_803E724.h" #include "code_8045A00.h" #include "dungeon_message.h" #include "code_8077274_1.h" @@ -41,7 +42,6 @@ extern char *gPtrItsaMonsterHouseMessage; extern u8 sub_8044B28(void); extern void sub_807AB38(Entity *, u32); extern void sub_8041888(u32); -extern u8 sub_803F428(s16 *); void sub_8075900(Entity *pokemon, u8 r1) { @@ -60,7 +60,7 @@ void sub_8075900(Entity *pokemon, u8 r1) gDungeon->unk644.monsterHouseTriggeredEvent = TRUE; sub_807AB38(pokemon, r1); sub_8041888(0); - if(sub_803F428(&pokemon->pos.x) != 0) + if(sub_803F428(&pokemon->pos)) sub_803E708(0x78, 0x39); } } diff --git a/src/dungeon_message.c b/src/dungeon_message.c index 718378551..026ef5362 100644 --- a/src/dungeon_message.c +++ b/src/dungeon_message.c @@ -3,6 +3,7 @@ #include "dungeon.h" #include "structs/dungeon_entity.h" #include "code_803E46C.h" +#include "code_803E724.h" #include "string_format.h" #include "code_800E9E4.h" #include "menu_input.h" @@ -30,7 +31,6 @@ static void DisplayMessageAddToLog(Entity *pokemon, const u8 *str, u8 r2); static bool8 sub_8052DC0(Entity *); extern bool8 sub_8045888(Entity *pokemon); -extern u8 sub_803F428(Position *); extern void sub_805E804(void); extern void sub_803EAF0(s32, s32); extern void sub_8040238(void); @@ -171,7 +171,7 @@ void TryDisplayDungeonLoggableMessage5(Entity *pokemon, Position *pos, const u8 { u8 flag; flag = sub_8045888(pokemon) ? TRUE : FALSE; - if(sub_803F428(pos) != 0) + if(sub_803F428(pos)) { flag = TRUE; } diff --git a/src/dungeon_move.c b/src/dungeon_move.c index 89e241c0c..0f7f3bebf 100644 --- a/src/dungeon_move.c +++ b/src/dungeon_move.c @@ -36,11 +36,11 @@ #include "status_actions.h" #include "code_8045A00.h" #include "code_803E668.h" +#include "code_803E724.h" #include "code_803E46C.h" #include "code_8041AD0.h" extern void sub_80429C8(Entity *r0); -extern u8 sub_803F428(Position *); extern bool8 sub_8045888(Entity *r0); extern void HandleDealingDamage(Entity *attacker, Entity *target, struct DamageStruct *dmgStruct, bool32 isFalseSwipe, bool32 giveExp, s16 arg4, bool32 arg8, s32 argC); extern void CalcDamage(Entity *, Entity *, u8, u32, u32, struct DamageStruct *dmgStruct, u32, u16, u32); diff --git a/src/move_actions.c b/src/move_actions.c index 479362d3e..7bf1aee60 100644 --- a/src/move_actions.c +++ b/src/move_actions.c @@ -1,6 +1,7 @@ #include "global.h" #include "charge_move.h" #include "code_803E46C.h" +#include "code_803E724.h" #include "code_8045A00.h" #include "code_806CD90.h" #include "code_8077274_1.h" @@ -180,7 +181,6 @@ extern void sub_806A5B8(Entity *entity); extern void sub_80694C0(Entity *, s32, s32, u32); void sub_8075900(Entity *pokemon, u8 r1); extern u8 sub_8044B28(void); -extern u8 sub_803F428(Position *pos); extern void sub_807EC28(bool8); extern void sub_806F370(Entity *r0, Entity *r1, u32, u32, u8 *, u8, s32, u32, u32, u32); extern void sub_804652C(Entity *, Entity *, Item *, u32, Position *); @@ -2695,7 +2695,7 @@ _0805A8C2: pos2.y = ((temp2 - target->pixelPos.y) / 0xc); - if (((check = sub_803F428(&target->pos), r9 = &target->pos, check != 0)) || (sub_803F428(&pos1) != 0)) { + if (((check = sub_803F428(&target->pos), r9 = &target->pos, check)) || (sub_803F428(&pos1))) { for(counter = 0; counter < 0xC; counter++) { IncreaseEntityPixelPos(target,pos2.x,pos2.y); @@ -2718,7 +2718,7 @@ _0805A8C2: else { _0805A9FE: if (EntityExists(target)) { - if ((sub_803F428(r9) != 0) || (sub_803F428(&pos1) != 0)) { + if ((sub_803F428(r9)) || (sub_803F428(&pos1))) { for(counter = 0; counter < 0xC; counter++) { IncreaseEntityPixelPos(target, -pos2.x,-pos2.y); diff --git a/src/trap.c b/src/trap.c index abc60d817..fe730421d 100644 --- a/src/trap.c +++ b/src/trap.c @@ -2,6 +2,7 @@ #include "trap.h" #include "code_803E668.h" +#include "code_803E724.h" #include "code_80450F8.h" #include "code_8041AD0.h" #include "code_8045A00.h" @@ -83,7 +84,6 @@ void DealDamageToEntity(Entity *,s16,u32,u32); void sub_806F480(Entity *, u32); void sub_804225C(Entity *, Position *, u8); void sub_8071DA4(Entity *); -extern u8 sub_803F428(Position *pos); void sub_806A1E8(Entity *pokemon); u8 sub_803D6FC(void); extern void sub_807DF38(Entity *pokemon, Entity *target, Position *pos, u32, u8 moveType, s16); @@ -265,7 +265,7 @@ void sub_807FE9C(Entity *pokemon, Position *pos, int param_3, char param_4) text = *gUnknown_80FDB7C; } if (text != NULL) { - if (sub_803F428(pos) != '\0') { + if (sub_803F428(pos)) { sub_8049ED4(); } TryDisplayDungeonLoggableMessage3(pokemon,target,text); @@ -274,7 +274,7 @@ void sub_807FE9C(Entity *pokemon, Position *pos, int param_3, char param_4) } } } - if (sub_803F428(pos) != '\0') { + if (sub_803F428(pos)) { sub_80421C0(0,0x15c); sub_8049ED4(); sub_804225C(pokemon,pos,trapData->id); From 248d1c633c6470a0fefa34fbbb419a3fb553326d Mon Sep 17 00:00:00 2001 From: Kermalis <29823718+Kermalis@users.noreply.github.com> Date: Mon, 11 Nov 2024 10:16:38 -0500 Subject: [PATCH 11/16] Update code_80450F8.c --- src/code_80450F8.c | 132 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) diff --git a/src/code_80450F8.c b/src/code_80450F8.c index 6c87acccd..88ad322bc 100644 --- a/src/code_80450F8.c +++ b/src/code_80450F8.c @@ -9,6 +9,70 @@ // Related to sub_80828E0 // 93.08% https://decomp.me/scratch/AYGBN +/*Entity *sub_80453AC(s16 id) +{ + s32 something; // r1 + s32 uVar8; // r2 + Entity *entity; // r4 + s32 r5; + u8 bodySize; // r6 + s32 id_; // r8 + //register s32 id_ asm("r8"); // r8 + s32 r9; + + id_ = id; // SpeciesId() ? + r9 = -1; + bodySize = GetBodySize(id_); + + for (r5 = 0; r5 <= MAX_TEAM_BODY_SIZE - bodySize; r5++) { + for (uVar8 = 0; uVar8 < bodySize; uVar8++) { + if (gUnknown_202EE70[r5 + uVar8] != 0) + break; + } + + if (uVar8 == bodySize) { + r9 = r5; + break; + } + } + + if (r9 != -1) { + for (r5 = 0; r5 < MAX_TEAM_MEMBERS; r5++) { + entity = gDungeon->teamPokemon[r5]; + if (!EntityExists(entity)) { + entity->type = ENTITY_MONSTER; + entity->unk24 = r5; + entity->axObj.info = &gDungeon->unk69C[r5]; + entity->axObj.info->id = id_; + entity->axObj.info->apparentID = sub_8069F54(NULL, id_); + entity->axObj.info->isNotTeamMember = FALSE; + + entity->axObj.spriteFile = GetSpriteData(sub_8069F54(NULL, id_)); + entity->axObj.unk40_maybeAnimTimer = (r9 * 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 = r9; + entity->axObj.info->unk168 = bodySize; + + for (something = 0; something < bodySize; something++) { + gUnknown_202EE70[r9] = 1; + r9++; + } + + entity->spawnGenID = gDungeon->unk668++; + return entity; + } + } + } + + return NULL; +}*/ NAKED Entity *sub_80453AC(s16 id) { @@ -195,6 +259,74 @@ Entity *sub_80453AC(s16 id) // Related to sub_8082A08 // 91.51% https://decomp.me/scratch/Fp0Kw +/*Entity *sub_804550C(s16 a) +{ + s32 something; // r1 + s32 uVar8; // r2 + Entity *entity; // r4 + s32 r5; + u8 r6; + s32 id; // r8 + s32 r9; + s32 timer; // sp0 + + id = a; + r9 = -1; + r6 = GetBodySize(id); + + for (r5 = 0; r5 <= DUNGEON_MAX_WILD_POKEMON_BODY_SIZE - r6; r5++) { + for (uVar8 = 0; uVar8 < r6; uVar8++) { + if (gUnknown_202EE76[r5 + uVar8] != 0) + break; + } + + if (uVar8 == r6) { + r9 = r5; + break; + } + } + + if (r9 != -1) { + for (r5 = 0; r5 < DUNGEON_MAX_WILD_POKEMON_BODY_SIZE; r5++) { + timer = (r9 * 0x10) + 0xA0; + entity = gDungeon->wildPokemon[r5]; + if (!EntityExists(entity)) { + entity->type = ENTITY_MONSTER; + entity->unk24 = r5; + entity->unk22 = 0; + entity->axObj.info = &gDungeon->unkEBC[r5]; + entity->axObj.info->id = id; + entity->axObj.info->apparentID = sub_8069F54(NULL, id); + entity->axObj.info->isNotTeamMember = TRUE; + + entity->axObj.spriteFile = GetSpriteData(sub_8069F54(NULL, id)); + entity->axObj.unk40_maybeAnimTimer = timer; + 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 = r9; + entity->axObj.info->unk168 = r6; + + for (something = 0; something < r6; something++) { + gUnknown_202EE76[r9] = 1; + r9++; + } + + sub_8045ACC(); + + entity->spawnGenID = gDungeon->unk668++; + return entity; + } + } + } + + return NULL; +}*/ NAKED Entity *sub_804550C(s16 a) { From de1e9dcb0828e8dd68baced5b00c90d7d4e2ee65 Mon Sep 17 00:00:00 2001 From: Kermalis <29823718+Kermalis@users.noreply.github.com> Date: Fri, 15 Nov 2024 16:13:01 -0500 Subject: [PATCH 12/16] Clean common strings and personality test 1 --- include/common_strings.h | 2 +- include/constants/common_strings_hints.h | 10 +- .../common_strings_kangaskhan_storage.h | 6 +- include/constants/personality_test.h | 5 +- ld_script.txt | 6 + src/code_80450F8.c | 2 +- src/code_80972F4.c | 4 +- src/common_strings.c | 358 ++- src/data/code_80140DC.h | 22 +- src/data/code_80227B8.h | 4 +- src/data/common_strings_felicity_bank.h | 224 -- src/data/common_strings_gulpin_shop.h | 457 ---- src/data/common_strings_hints.h | 67 - src/data/common_strings_kangaskhan_storage.h | 276 --- src/data/common_strings_kecleon_bros.h | 656 ------ src/data/common_strings_makuhita_dojo.h | 202 -- src/data/common_strings_wigglytuff_shop.h | 320 --- src/data/debug_menu1.h | 35 +- src/data/friend_rescue_menus.h | 369 ++- src/data/ground_main.h | 4 +- src/data/locale/felicity_bank_usa.h | 157 ++ src/data/locale/gulpin_shop_usa.h | 352 +++ src/data/locale/hints_usa.h | 60 + src/data/locale/kangaskhan_storage_usa.h | 189 ++ src/data/locale/kecleon_bros_usa.h | 470 ++++ src/data/locale/makuhita_dojo_usa.h | 155 ++ src/data/locale/personality_test1_usa.h | 769 ++++++ src/data/locale/wigglytuff_shop_usa.h | 246 ++ src/data/main_menu2.h | 268 +-- src/data/other_menus1.h | 262 +-- src/data/personality_test1.h | 2064 ++++++----------- src/data/post_office_guide1.h | 69 +- src/data/story_missions.h | 125 +- src/data/trade_items_menu.h | 32 +- src/data/wonder_mail_1.h | 104 +- src/data/wonder_mail_main_menu.h | 36 +- src/debug_menu1.c | 1 + src/debug_unused1.c | 2 + src/debug_unused2.c | 2 + src/debug_unused3.c | 2 + src/debug_unused4.c | 2 + src/debug_unused5.c | 2 + src/debug_unused6.c | 2 + src/hints_menu1.c | 2 +- src/kangaskhan_storage1.c | 6 +- src/personality_test1.c | 2 +- 46 files changed, 3966 insertions(+), 4444 deletions(-) delete mode 100644 src/data/common_strings_felicity_bank.h delete mode 100644 src/data/common_strings_gulpin_shop.h delete mode 100644 src/data/common_strings_hints.h delete mode 100644 src/data/common_strings_kangaskhan_storage.h delete mode 100644 src/data/common_strings_kecleon_bros.h delete mode 100644 src/data/common_strings_makuhita_dojo.h delete mode 100644 src/data/common_strings_wigglytuff_shop.h create mode 100644 src/data/locale/felicity_bank_usa.h create mode 100644 src/data/locale/gulpin_shop_usa.h create mode 100644 src/data/locale/hints_usa.h create mode 100644 src/data/locale/kangaskhan_storage_usa.h create mode 100644 src/data/locale/kecleon_bros_usa.h create mode 100644 src/data/locale/makuhita_dojo_usa.h create mode 100644 src/data/locale/personality_test1_usa.h create mode 100644 src/data/locale/wigglytuff_shop_usa.h create mode 100644 src/debug_unused1.c create mode 100644 src/debug_unused2.c create mode 100644 src/debug_unused3.c create mode 100644 src/debug_unused4.c create mode 100644 src/debug_unused5.c create mode 100644 src/debug_unused6.c diff --git a/include/common_strings.h b/include/common_strings.h index 3c6e34f29..8022d3201 100644 --- a/include/common_strings.h +++ b/include/common_strings.h @@ -33,6 +33,6 @@ extern const u8* const gCommonKecleonBros[KECLEON_BROS_MODE_COUNT][KECLEON_DLG_M extern const u8* const gCommonWigglytuff[WIGGLYTUFF_SHOP_MODE_COUNT][WIGGLY_DLG_MAX]; extern const u8* const gCommonGulpin[GULPIN_SHOP_MODE_DIALOGUE_COUNT][GULPIN_DLG_MAX]; extern const u8* const gCommonMakuhita[MAKUHITA_DOJO_MODE_COUNT][MAKUHITA_DLG_MAX]; -extern const Hints gCommonHints[NUM_HINTS]; +extern const Hints gCommonHints[HINT_MAX]; #endif // GUARD_COMMON_STRINGS_H \ No newline at end of file diff --git a/include/constants/common_strings_hints.h b/include/constants/common_strings_hints.h index 7e319f47f..f4eb50bad 100644 --- a/include/constants/common_strings_hints.h +++ b/include/constants/common_strings_hints.h @@ -8,6 +8,14 @@ typedef struct Hints const u8 *body; } Hints; -#define NUM_HINTS 5 +enum HintKind +{ + HINT_TOWN_CONTROLS_1, + HINT_TOWN_CONTROLS_2, + HINT_SAVING, + HINT_ADVENTURES_WITH_FRIENDS, + HINT_BUILDING_A_TEAM, + HINT_MAX +}; #endif // GUARD_COMMON_STRINGS_HINTS_H \ No newline at end of file diff --git a/include/constants/common_strings_kangaskhan_storage.h b/include/constants/common_strings_kangaskhan_storage.h index d286b406e..a09b69436 100644 --- a/include/constants/common_strings_kangaskhan_storage.h +++ b/include/constants/common_strings_kangaskhan_storage.h @@ -24,9 +24,9 @@ enum KangaskhanStorageDialogue KANG_DLG_WITHDRAW_CONFIRMATION, KANG_DLG_YOU_HAVE_NOTHING, KANG_DLG_YOU_ARE_FULL, - KANG_DLG_STORAGE_HAS_NOTHING, - KANG_DLG_DEPOSIT__INVALID_ITEM, - KANG_DLG_DEPOSIT__TOO_MANY_OF_ITEM, + KANG_DLG_STORAGE_EMPTY, + KANG_DLG_DEPOSIT_INVALID_ITEM, + KANG_DLG_DEPOSIT_TOO_MANY_OF_ITEM, KANG_DLG_STORAGE_FULL, KANG_DLG_HOW_IT_WORKS, KANG_DLG_MAX diff --git a/include/constants/personality_test.h b/include/constants/personality_test.h index 0bd9f6025..56129599a 100644 --- a/include/constants/personality_test.h +++ b/include/constants/personality_test.h @@ -17,15 +17,14 @@ enum NaturePersonalities LONELY, QUIRKY, MISC, - }; #define NUM_PARTNERS 10 #define NUM_QUIZ_QUESTIONS 55 #define MAX_ASKED_QUESTIONS 8 #define NUM_PERSONALITIES MISC -#define NUM_PERSONALITY_TEST_EFFECTS (NUM_PERSONALITIES+3) +#define NUM_PERSONALITY_TEST_EFFECTS (NUM_PERSONALITIES + 3) #define BRAVE_2B_TRIGGER 99 -#endif // GUARD_CONSTANTS_PERSONALITY_TEST_H +#endif // GUARD_CONSTANTS_PERSONALITY_TEST_H \ No newline at end of file diff --git a/ld_script.txt b/ld_script.txt index 33ff81de7..cfc2ea804 100755 --- a/ld_script.txt +++ b/ld_script.txt @@ -523,6 +523,12 @@ SECTIONS { src/load_screen.o(.rodata); src/wonder_mail_main_menu.o(.rodata); src/debug_menu1.o(.rodata); + src/debug_unused1.o(.rodata); + src/debug_unused2.o(.rodata); + src/debug_unused3.o(.rodata); + src/debug_unused4.o(.rodata); + src/debug_unused5.o(.rodata); + src/debug_unused6.o(.rodata); src/debug_menu2.o(.rodata); src/debug_menu3.o(.rodata); src/debug_menu4.o(.rodata); diff --git a/src/code_80450F8.c b/src/code_80450F8.c index 88ad322bc..ce3f400d1 100644 --- a/src/code_80450F8.c +++ b/src/code_80450F8.c @@ -270,7 +270,7 @@ Entity *sub_80453AC(s16 id) s32 r9; s32 timer; // sp0 - id = a; + id = a; // SpeciesId() ? r9 = -1; r6 = GetBodySize(id); diff --git a/src/code_80972F4.c b/src/code_80972F4.c index 149fb4e6e..7765d413b 100644 --- a/src/code_80972F4.c +++ b/src/code_80972F4.c @@ -125,7 +125,7 @@ void sub_8097418(s16 index,bool32 param_2) bool8 param_2_u8 = param_2; if (index_s32 != 0xd) { if ((param_2_u8) && (SetScriptVarArrayValue(NULL,RESCUE_SCENARIO_JOB_LIST,index_s32,0), index_s32 < 0x1f)) { - const MissionText *mt = &gStoryMissionText[index_s32]; + const MissionText *mt = &sStoryMissionText[index_s32]; if (mt->unk4 != 0xFF) { sub_8097FA8(mt->unk4); } @@ -169,7 +169,7 @@ const u8 *GetCurrentMissionText(s16 index) { if(index < 0x1F) { - const MissionText *mt = &gStoryMissionText[index]; + const MissionText *mt = &sStoryMissionText[index]; return mt->text; } else diff --git a/src/common_strings.c b/src/common_strings.c index f31059c59..0c88c5ac0 100644 --- a/src/common_strings.c +++ b/src/common_strings.c @@ -2,7 +2,22 @@ #include "globaldata.h" #include "common_strings.h" -// Probably had many entries per ptr because of languages, but USA release is english-only. Check other roms +// The structure of this file seems to be completely different in the EU version. +// Not sure about the JP version though - Kermalis + +#define REGION_USA TRUE // For now + +#if REGION_USA + +#include "data/locale/felicity_bank_usa.h" +#include "data/locale/gulpin_shop_usa.h" +#include "data/locale/hints_usa.h" +#include "data/locale/kangaskhan_storage_usa.h" +#include "data/locale/kecleon_bros_usa.h" +#include "data/locale/makuhita_dojo_usa.h" +#include "data/locale/wigglytuff_shop_usa.h" + +#endif ALIGNED(4) static const u8 sYes0[] = _("Yes"); ALIGNED(4) const u8* const gCommonYes[] = { sYes0 }; @@ -55,10 +70,337 @@ ALIGNED(4) const u8* const gCommonDepositPrompt[] = { sDepositPrompt0 }; ALIGNED(4) static const u8 sWithdrawPrompt0[] = _("Withdraw?"); ALIGNED(4) const u8* const gCommonWithdrawPrompt[] = { sWithdrawPrompt0 }; -#include "data/common_strings_felicity_bank.h" -#include "data/common_strings_kangaskhan_storage.h" -#include "data/common_strings_kecleon_bros.h" -#include "data/common_strings_wigglytuff_shop.h" -#include "data/common_strings_gulpin_shop.h" -#include "data/common_strings_makuhita_dojo.h" -#include "data/common_strings_hints.h" \ No newline at end of file + + +ALIGNED(4) const u8* const gCommonFelicity[FEL_MODE_COUNT][FEL_DLG_MAX] = +{ + [FEL_MODE_AWAKE] = { + [FEL_DLG_WELCOME] = FEL_AWAKE_WELCOME, + [FEL_DLG_HOW_MAY_I_SERVE__NO_MONEY] = FEL_AWAKE_HOW_MAY_I_SERVE__NO_MONEY, + [FEL_DLG_HOW_MAY_I_SERVE__HAS_MONEY] = FEL_AWAKE_HOW_MAY_I_SERVE__HAS_MONEY, + [FEL_DLG_VERY_WELL] = FEL_AWAKE_VERY_WELL, + [FEL_DLG_BYE__NO_MONEY] = FEL_AWAKE_BYE__NO_MONEY, + [FEL_DLG_BYE__HAS_MONEY] = FEL_AWAKE_BYE__HAS_MONEY, + [FEL_DLG_DEPOSIT__HOW_MUCH] = FEL_AWAKE_DEPOSIT__HOW_MUCH, + [FEL_DLG_DEPOSIT__NO_MONEY] = FEL_AWAKE_DEPOSIT__NO_MONEY, + [FEL_DLG_DEPOSIT__BANK_FULL] = FEL_AWAKE_DEPOSIT__BANK_FULL, + [FEL_DLG_DEPOSIT__RECEIPT] = FEL_AWAKE_DEPOSIT__RECEIPT, + [FEL_DLG_WITHDRAW__HOW_MUCH] = FEL_AWAKE_WITHDRAW__HOW_MUCH, + [FEL_DLG_WITHDRAW__NO_MONEY] = FEL_AWAKE_WITHDRAW__NO_MONEY, + [FEL_DLG_WITHDRAW__WALLET_FULL] = FEL_AWAKE_WITHDRAW__WALLET_FULL, + [FEL_DLG_WITHDRAW__RECEIPT] = FEL_AWAKE_WITHDRAW__RECEIPT, + [FEL_DLG_HOW_IT_WORKS] = FEL_AWAKE_HOW_IT_WORKS + }, + [FEL_MODE_ASLEEP] = { + [FEL_DLG_WELCOME] = FEL_ASLEEP_WELCOME, + [FEL_DLG_HOW_MAY_I_SERVE__NO_MONEY] = FEL_ASLEEP_HOW_MAY_I_SERVE__NO_MONEY, + [FEL_DLG_HOW_MAY_I_SERVE__HAS_MONEY] = FEL_ASLEEP_HOW_MAY_I_SERVE__HAS_MONEY, + [FEL_DLG_VERY_WELL] = FEL_ASLEEP_VERY_WELL, + [FEL_DLG_BYE__NO_MONEY] = FEL_ASLEEP_BYE__NO_MONEY, + [FEL_DLG_BYE__HAS_MONEY] = FEL_ASLEP_BYE__HAS_MONEY, + [FEL_DLG_DEPOSIT__HOW_MUCH] = FEL_ASLEEP_DEPOSIT__HOW_MUCH, + [FEL_DLG_DEPOSIT__NO_MONEY] = FEL_ASLEEP_DEPOSIT__NO_MONEY, + [FEL_DLG_DEPOSIT__BANK_FULL] = FEL_ASLEEP_DEPOSIT__BANK_FULL, + [FEL_DLG_DEPOSIT__RECEIPT] = FEL_ASLEEP_DEPOSIT__RECEIPT, + [FEL_DLG_WITHDRAW__HOW_MUCH] = FEL_ASLEEP_WITHDRAW__HOW_MUCH, + [FEL_DLG_WITHDRAW__NO_MONEY] = FEL_ASLEEP_WITHDRAW__NO_MONEY, + [FEL_DLG_WITHDRAW__WALLET_FULL] = FEL_ASLEEP_WITHDRAW__WALLET_FULL, + [FEL_DLG_WITHDRAW__RECEIPT] = FEL_ASLEEP_WITHDRAW__RECEIPT, + [FEL_DLG_HOW_IT_WORKS] = FEL_ASLEEP_HOW_IT_WORKS + } +}; + +ALIGNED(4) const u8* const gCommonKangStorage[KANG_MODE_COUNT][KANG_DLG_MAX] = +{ + [KANG_MODE_AWAKE] = { + [KANG_DLG_WELCOME] = KANG_AWAKE_WELCOME, + [KANG_DLG_ANYTHING_ELSE] = KANG_AWAKE_ANYTHING_ELSE, + [KANG_DLG_BYE] = KANG_AWAKE_BYE, + [KANG_DLG_STORE_WHAT] = KANG_AWAKE_STORE_WHAT, + [KANG_DLG_STORE_MORE] = KANG_AWAKE_STORE_MORE, + [KANG_DLG_DEPOSIT_ONE_PROMPT] = KANG_AWAKE_DEPOSIT_ONE_PROMPT, + [KANG_DLG_DEPOSIT_MANY_PROMPT] = KANG_AWAKE_DEPOSIT_MANY_PROMPT, + [KANG_DLG_DEPOSIT_CONFIRMATION] = KANG_AWAKE_DEPOSIT_CONFIRMATION, + [KANG_DLG_TAKE_WHAT] = KANG_AWAKE_TAKE_WHAT, + [KANG_DLG_TAKE_MORE] = KANG_AWAKE_TAKE_MORE, + [KANG_DLG_WITHDRAW_ONE_PROMPT] = KANG_AWAKE_WITHDRAW_ONE_PROMPT, + [KANG_DLG_WITHDRAW_MANY_PROMPT] = KANG_AWAKE_WITHDRAW_MANY_PROMPT, + [KANG_DLG_WITHDRAW_CONFIRMATION] = KANG_AWAKE_WITHDRAW_CONFIRMATION, + [KANG_DLG_YOU_HAVE_NOTHING] = KANG_AWAKE_YOU_HAVE_NOTHING, + [KANG_DLG_YOU_ARE_FULL] = KANG_AWAKE_YOU_ARE_FULL, + [KANG_DLG_STORAGE_EMPTY] = KANG_AWAKE_STORAGE_HAS_NOTHING, + [KANG_DLG_DEPOSIT_INVALID_ITEM] = KANG_AWAKE_DEPOSIT_INVALID_ITEM, + [KANG_DLG_DEPOSIT_TOO_MANY_OF_ITEM] = KANG_AWAKE_DEPOSIT_TOO_MANY_OF_ITEM, + [KANG_DLG_STORAGE_FULL] = KANG_AWAKE_STORAGE_FULL, + [KANG_DLG_HOW_IT_WORKS] = KANG_AWAKE_HOW_IT_WORKS + }, + [KANG_MODE_ASLEEP] = { + [KANG_DLG_WELCOME] = KANG_ASLEEP_WELCOME, + [KANG_DLG_ANYTHING_ELSE] = KANG_ASLEEP_ANYTHING_ELSE, + [KANG_DLG_BYE] = KANG_ASLEEP_BYE, + [KANG_DLG_STORE_WHAT] = KANG_ASLEEP_STORE_WHAT, + [KANG_DLG_STORE_MORE] = KANG_ASLEEP_STORE_MORE, + [KANG_DLG_DEPOSIT_ONE_PROMPT] = KANG_ASLEEP_DEPOSIT_ONE_PROMPT, + [KANG_DLG_DEPOSIT_MANY_PROMPT] = KANG_ASLEEP_DEPOSIT_MANY_PROMPT, + [KANG_DLG_DEPOSIT_CONFIRMATION] = KANG_ASLEEP_DEPOSIT_CONFIRMATION, + [KANG_DLG_TAKE_WHAT] = KANG_ASLEEP_TAKE_WHAT, + [KANG_DLG_TAKE_MORE] = KANG_ASLEEP_TAKE_MORE, + [KANG_DLG_WITHDRAW_ONE_PROMPT] = KANG_ASLEEP_WITHDRAW_ONE_PROMPT, + [KANG_DLG_WITHDRAW_MANY_PROMPT] = KANG_ASLEEP_WITHDRAW_MANY_PROMPT, + [KANG_DLG_WITHDRAW_CONFIRMATION] = KANG_ASLEEP_WITHDRAW_CONFIRMATION, + [KANG_DLG_YOU_HAVE_NOTHING] = KANG_ASLEEP_YOU_HAVE_NOTHING, + [KANG_DLG_YOU_ARE_FULL] = KANG_ASLEEP_YOU_ARE_FULL, + [KANG_DLG_STORAGE_EMPTY] = KANG_ASLEEP_STORAGE_EMPTY, + [KANG_DLG_DEPOSIT_INVALID_ITEM] = KANG_ASLEEP_DEPOSIT_INVALID_ITEM, + [KANG_DLG_DEPOSIT_TOO_MANY_OF_ITEM] = KANG_ASLEEP_DEPOSIT_TOO_MANY_OF_ITEM, + [KANG_DLG_STORAGE_FULL] = KANG_ASLEEP_STORAGE_FULL, + [KANG_DLG_HOW_IT_WORKS] = KANG_ASLEEP_HOW_IT_WORKS + } +}; + +ALIGNED(4) const u8* const gCommonKecleonBros[KECLEON_BROS_MODE_COUNT][KECLEON_DLG_MAX] = +{ + [KECLEON_BROS_MODE_ITEMS_AWAKE] = { + [KECLEON_DLG_00] = KEC_ITEMS_AWAKE_DLG_00, + [KECLEON_DLG_01] = KEC_ITEMS_AWAKE_DLG_01, + [KECLEON_DLG_02] = KEC_ITEMS_AWAKE_DLG_02, + [KECLEON_DLG_03] = KEC_ITEMS_AWAKE_DLG_03, + [KECLEON_DLG_04] = KEC_ITEMS_AWAKE_DLG_04, + [KECLEON_DLG_05] = KEC_ITEMS_AWAKE_DLG_05, + [KECLEON_DLG_06] = KEC_ITEMS_AWAKE_DLG_06, + [KECLEON_DLG_07] = KEC_ITEMS_AWAKE_DLG_07, + [KECLEON_DLG_08] = KEC_ITEMS_AWAKE_DLG_08, + [KECLEON_DLG_09] = KEC_ITEMS_AWAKE_DLG_09, + [KECLEON_DLG_10] = KEC_ITEMS_AWAKE_DLG_10, + [KECLEON_DLG_11] = KEC_ITEMS_AWAKE_DLG_11, + [KECLEON_DLG_12] = KEC_ITEMS_AWAKE_DLG_12, + [KECLEON_DLG_13] = KEC_ITEMS_AWAKE_DLG_13, + [KECLEON_DLG_14] = KEC_ITEMS_AWAKE_DLG_14, + [KECLEON_DLG_15] = KEC_ITEMS_AWAKE_DLG_15, + [KECLEON_DLG_16] = KEC_ITEMS_AWAKE_DLG_16, + [KECLEON_DLG_17] = KEC_ITEMS_AWAKE_DLG_17, + [KECLEON_DLG_18] = KEC_ITEMS_AWAKE_DLG_18, + [KECLEON_DLG_19] = KEC_ITEMS_AWAKE_DLG_19, + [KECLEON_DLG_20] = KEC_ITEMS_AWAKE_DLG_20, + [KECLEON_DLG_21] = KEC_ITEMS_AWAKE_DLG_21, + [KECLEON_DLG_22] = KEC_ITEMS_AWAKE_DLG_22 + }, + [KECLEON_BROS_MODE_ITEMS_ASLEEP] = { + [KECLEON_DLG_00] = KEC_ITEMS_ASLEEP_DLG_00, + [KECLEON_DLG_01] = KEC_ITEMS_ASLEEP_DLG_01, + [KECLEON_DLG_02] = KEC_ITEMS_ASLEEP_DLG_02, + [KECLEON_DLG_03] = KEC_ITEMS_ASLEEP_DLG_03, + [KECLEON_DLG_04] = KEC_ITEMS_ASLEEP_DLG_04, + [KECLEON_DLG_05] = KEC_ITEMS_ASLEEP_DLG_05, + [KECLEON_DLG_06] = KEC_ITEMS_ASLEEP_DLG_06, + [KECLEON_DLG_07] = KEC_ITEMS_ASLEEP_DLG_07, + [KECLEON_DLG_08] = KEC_ITEMS_ASLEEP_DLG_08, + [KECLEON_DLG_09] = KEC_ITEMS_ASLEEP_DLG_09, + [KECLEON_DLG_10] = KEC_ITEMS_ASLEEP_DLG_10, + [KECLEON_DLG_11] = KEC_ITEMS_ASLEEP_DLG_11, + [KECLEON_DLG_12] = KEC_ITEMS_ASLEEP_DLG_12, + [KECLEON_DLG_13] = KEC_ITEMS_ASLEEP_DLG_13, + [KECLEON_DLG_14] = KEC_ITEMS_ASLEEP_DLG_14, + [KECLEON_DLG_15] = KEC_ITEMS_ASLEEP_DLG_15, + [KECLEON_DLG_16] = KEC_ITEMS_ASLEEP_DLG_16, + [KECLEON_DLG_17] = KEC_ITEMS_ASLEEP_DLG_17, + [KECLEON_DLG_18] = KEC_ITEMS_ASLEEP_DLG_18, + [KECLEON_DLG_19] = KEC_ITEMS_ASLEEP_DLG_19, + [KECLEON_DLG_20] = KEC_ITEMS_ASLEEP_DLG_20, + [KECLEON_DLG_21] = KEC_ITEMS_ASLEEP_DLG_21, + [KECLEON_DLG_22] = KEC_ITEMS_ASLEEP_DLG_22 + }, + [KECLEON_BROS_MODE_WARES_AWAKE] = { + [KECLEON_DLG_00] = KEC_WARES_AWAKE_DLG_00, + [KECLEON_DLG_01] = KEC_WARES_AWAKE_DLG_01, + [KECLEON_DLG_02] = KEC_WARES_AWAKE_DLG_02, + [KECLEON_DLG_03] = KEC_WARES_AWAKE_DLG_03, + [KECLEON_DLG_04] = KEC_WARES_AWAKE_DLG_04, + [KECLEON_DLG_05] = KEC_WARES_AWAKE_DLG_05, + [KECLEON_DLG_06] = KEC_WARES_AWAKE_DLG_06, + [KECLEON_DLG_07] = KEC_WARES_AWAKE_DLG_07, + [KECLEON_DLG_08] = KEC_WARES_AWAKE_DLG_08, + [KECLEON_DLG_09] = KEC_WARES_AWAKE_DLG_09, + [KECLEON_DLG_10] = KEC_WARES_AWAKE_DLG_10, + [KECLEON_DLG_11] = KEC_WARES_AWAKE_DLG_11, + [KECLEON_DLG_12] = KEC_WARES_AWAKE_DLG_12, + [KECLEON_DLG_13] = KEC_WARES_AWAKE_DLG_13, + [KECLEON_DLG_14] = KEC_WARES_AWAKE_DLG_14, + [KECLEON_DLG_15] = KEC_WARES_AWAKE_DLG_15, + [KECLEON_DLG_16] = KEC_WARES_AWAKE_DLG_16, + [KECLEON_DLG_17] = KEC_WARES_AWAKE_DLG_17, + [KECLEON_DLG_18] = KEC_WARES_AWAKE_DLG_18, + [KECLEON_DLG_19] = KEC_WARES_AWAKE_DLG_19, + [KECLEON_DLG_20] = KEC_WARES_AWAKE_DLG_20, + [KECLEON_DLG_21] = KEC_WARES_AWAKE_DLG_21, + [KECLEON_DLG_22] = KEC_WARES_AWAKE_DLG_22 + }, + [KECLEON_BROS_MODE_WARES_ASLEEP] = { + [KECLEON_DLG_00] = KEC_WARES_ASLEEP_DLG_00, + [KECLEON_DLG_01] = KEC_WARES_ASLEEP_DLG_01, + [KECLEON_DLG_02] = KEC_WARES_ASLEEP_DLG_02, + [KECLEON_DLG_03] = KEC_WARES_ASLEEP_DLG_03, + [KECLEON_DLG_04] = KEC_WARES_ASLEEP_DLG_04, + [KECLEON_DLG_05] = KEC_WARES_ASLEEP_DLG_05, + [KECLEON_DLG_06] = KEC_WARES_ASLEEP_DLG_06, + [KECLEON_DLG_07] = KEC_WARES_ASLEEP_DLG_07, + [KECLEON_DLG_08] = KEC_WARES_ASLEEP_DLG_08, + [KECLEON_DLG_09] = KEC_WARES_ASLEEP_DLG_09, + [KECLEON_DLG_10] = KEC_WARES_ASLEEP_DLG_10, + [KECLEON_DLG_11] = KEC_WARES_ASLEEP_DLG_11, + [KECLEON_DLG_12] = KEC_WARES_ASLEEP_DLG_12, + [KECLEON_DLG_13] = KEC_WARES_ASLEEP_DLG_13, + [KECLEON_DLG_14] = KEC_WARES_ASLEEP_DLG_14, + [KECLEON_DLG_15] = KEC_WARES_ASLEEP_DLG_15, + [KECLEON_DLG_16] = KEC_WARES_ASLEEP_DLG_16, + [KECLEON_DLG_17] = KEC_WARES_ASLEEP_DLG_17, + [KECLEON_DLG_18] = KEC_WARES_ASLEEP_DLG_18, + [KECLEON_DLG_19] = KEC_WARES_ASLEEP_DLG_19, + [KECLEON_DLG_20] = KEC_WARES_ASLEEP_DLG_20, + [KECLEON_DLG_21] = KEC_WARES_ASLEEP_DLG_21, + [KECLEON_DLG_22] = KEC_WARES_ASLEEP_DLG_22 + } +}; + +ALIGNED(4) const u8* const gCommonWigglytuff[WIGGLYTUFF_SHOP_MODE_COUNT][WIGGLY_DLG_MAX] = +{ + [WIGGLYTUFF_SHOP_MODE_AWAKE] = { + [WIGGLY_DLG_00] = WIGGLY_AWAKE_DLG_00, + [WIGGLY_DLG_01] = WIGGLY_AWAKE_DLG_01, + [WIGGLY_DLG_02] = WIGGLY_AWAKE_DLG_02, + [WIGGLY_DLG_03] = WIGGLY_AWAKE_DLG_03, + [WIGGLY_DLG_04] = WIGGLY_AWAKE_DLG_04, + [WIGGLY_DLG_05] = WIGGLY_AWAKE_DLG_05, + [WIGGLY_DLG_06] = WIGGLY_AWAKE_DLG_06, + [WIGGLY_DLG_07] = WIGGLY_AWAKE_DLG_07, + [WIGGLY_DLG_08] = WIGGLY_AWAKE_DLG_08, + [WIGGLY_DLG_09] = WIGGLY_AWAKE_DLG_09, + [WIGGLY_DLG_10] = WIGGLY_AWAKE_DLG_10, + [WIGGLY_DLG_11] = WIGGLY_AWAKE_DLG_11, + [WIGGLY_DLG_12] = WIGGLY_AWAKE_DLG_12, + [WIGGLY_DLG_13] = WIGGLY_AWAKE_DLG_13, + [WIGGLY_DLG_14] = WIGGLY_AWAKE_DLG_14, + [WIGGLY_DLG_15] = WIGGLY_AWAKE_DLG_15, + [WIGGLY_DLG_16] = WIGGLY_AWAKE_DLG_16, + [WIGGLY_DLG_17] = WIGGLY_AWAKE_DLG_17, + [WIGGLY_DLG_18] = WIGGLY_AWAKE_DLG_18, + [WIGGLY_DLG_19] = WIGGLY_AWAKE_DLG_19 + }, + [WIGGLYTUFF_SHOP_MODE_ASLEEP] = { + [WIGGLY_DLG_00] = WIGGLY_ASLEEP_DLG_00, + [WIGGLY_DLG_01] = WIGGLY_ASLEEP_DLG_01, + [WIGGLY_DLG_02] = WIGGLY_ASLEEP_DLG_02, + [WIGGLY_DLG_03] = WIGGLY_ASLEEP_DLG_03, + [WIGGLY_DLG_04] = WIGGLY_ASLEEP_DLG_04, + [WIGGLY_DLG_05] = WIGGLY_ASLEEP_DLG_05, + [WIGGLY_DLG_06] = WIGGLY_ASLEEP_DLG_06, + [WIGGLY_DLG_07] = WIGGLY_ASLEEP_DLG_07, + [WIGGLY_DLG_08] = WIGGLY_ASLEEP_DLG_08, + [WIGGLY_DLG_09] = WIGGLY_ASLEEP_DLG_09, + [WIGGLY_DLG_10] = WIGGLY_ASLEEP_DLG_10, + [WIGGLY_DLG_11] = WIGGLY_ASLEEP_DLG_11, + [WIGGLY_DLG_12] = WIGGLY_ASLEEP_DLG_12, + [WIGGLY_DLG_13] = WIGGLY_ASLEEP_DLG_13, + [WIGGLY_DLG_14] = WIGGLY_ASLEEP_DLG_14, + [WIGGLY_DLG_15] = WIGGLY_ASLEEP_DLG_15, + [WIGGLY_DLG_16] = WIGGLY_ASLEEP_DLG_16, + [WIGGLY_DLG_17] = WIGGLY_ASLEEP_DLG_17, + [WIGGLY_DLG_18] = WIGGLY_ASLEEP_DLG_18, + [WIGGLY_DLG_19] = WIGGLY_ASLEEP_DLG_19 + } +}; + +ALIGNED(4) const u8* const gCommonGulpin[GULPIN_SHOP_MODE_DIALOGUE_COUNT][GULPIN_DLG_MAX] = +{ + [GULPIN_SHOP_MODE_AWAKE] = { + [GULPIN_DLG_00] = GULP_AWAKE_DLG_00, + [GULPIN_DLG_01] = GULP_AWAKE_DLG_01, + [GULPIN_DLG_02] = GULP_AWAKE_DLG_02, + [GULPIN_DLG_03] = GULP_AWAKE_DLG_03, + [GULPIN_DLG_04] = GULP_AWAKE_DLG_04, + [GULPIN_DLG_05] = GULP_AWAKE_DLG_05, + [GULPIN_DLG_06] = GULP_AWAKE_DLG_06, + [GULPIN_DLG_07] = GULP_AWAKE_DLG_07, + [GULPIN_DLG_08] = GULP_AWAKE_DLG_08, + [GULPIN_DLG_09] = GULP_AWAKE_DLG_09, + [GULPIN_DLG_10] = GULP_AWAKE_DLG_10, + [GULPIN_DLG_11] = GULP_AWAKE_DLG_11, + [GULPIN_DLG_12] = GULP_AWAKE_DLG_12, + [GULPIN_DLG_13] = GULP_AWAKE_DLG_13, + [GULPIN_DLG_14] = GULP_AWAKE_DLG_14, + [GULPIN_DLG_15] = GULP_AWAKE_DLG_15, + [GULPIN_DLG_16] = GULP_AWAKE_DLG_16, + [GULPIN_DLG_17] = GULP_AWAKE_DLG_17, + [GULPIN_DLG_18] = GULP_AWAKE_DLG_18, + [GULPIN_DLG_19] = GULP_AWAKE_DLG_19, + [GULPIN_DLG_20] = GULP_AWAKE_DLG_20, + [GULPIN_DLG_21] = GULP_AWAKE_DLG_21, + [GULPIN_DLG_22] = GULP_AWAKE_DLG_22, + [GULPIN_DLG_23] = GULP_AWAKE_DLG_23, + [GULPIN_DLG_24] = GULP_AWAKE_DLG_24 + }, + [GULPIN_SHOP_MODE_ASLEEP] = { + [GULPIN_DLG_00] = GULP_ASLEEP_DLG_00, + [GULPIN_DLG_01] = GULP_ASLEEP_DLG_01, + [GULPIN_DLG_02] = GULP_ASLEEP_DLG_02, + [GULPIN_DLG_03] = GULP_ASLEEP_DLG_03, + [GULPIN_DLG_04] = GULP_ASLEEP_DLG_04, + [GULPIN_DLG_05] = GULP_ASLEEP_DLG_05, + [GULPIN_DLG_06] = GULP_ASLEEP_DLG_06, + [GULPIN_DLG_07] = GULP_ASLEEP_DLG_07, + [GULPIN_DLG_08] = GULP_ASLEEP_DLG_08, + [GULPIN_DLG_09] = GULP_ASLEEP_DLG_09, + [GULPIN_DLG_10] = GULP_ASLEEP_DLG_10, + [GULPIN_DLG_11] = GULP_ASLEEP_DLG_11, + [GULPIN_DLG_12] = GULP_ASLEEP_DLG_12, + [GULPIN_DLG_13] = GULP_ASLEEP_DLG_13, + [GULPIN_DLG_14] = GULP_ASLEEP_DLG_14, + [GULPIN_DLG_15] = GULP_ASLEEP_DLG_15, + [GULPIN_DLG_16] = GULP_ASLEEP_DLG_16, + [GULPIN_DLG_17] = GULP_ASLEEP_DLG_17, + [GULPIN_DLG_18] = GULP_ASLEEP_DLG_18, + [GULPIN_DLG_19] = GULP_ASLEEP_DLG_19, + [GULPIN_DLG_20] = GULP_ASLEEP_DLG_20, + [GULPIN_DLG_21] = GULP_ASLEEP_DLG_21, + [GULPIN_DLG_22] = GULP_ASLEEP_DLG_22, + [GULPIN_DLG_23] = GULP_ASLEEP_DLG_23, + [GULPIN_DLG_24] = GULP_ASLEEP_DLG_24 + } +}; + +ALIGNED(4) const u8* const gCommonMakuhita[MAKUHITA_DOJO_MODE_COUNT][MAKUHITA_DLG_MAX] = +{ + [MAKUHITA_DOJO_MODE_AWAKE] = { + [MAKUHITA_DLG_0] = MAKU_AWAKE_DLG_0, + [MAKUHITA_DLG_1] = MAKU_AWAKE_DLG_1, + [MAKUHITA_DLG_2] = MAKU_AWAKE_DLG_2, + [MAKUHITA_DLG_3] = MAKU_AWAKE_DLG_3, + [MAKUHITA_DLG_4] = MAKU_AWAKE_DLG_4, + [MAKUHITA_DLG_5] = MAKU_AWAKE_DLG_5, + [MAKUHITA_DLG_6] = MAKU_AWAKE_DLG_6, + [MAKUHITA_DLG_7] = MAKU_AWAKE_DLG_7, + [MAKUHITA_DLG_8] = MAKU_AWAKE_DLG_8, + [MAKUHITA_DLG_9] = MAKU_AWAKE_DLG_9 + }, + [MAKUHITA_DOJO_MODE_ASLEEP] = { + [MAKUHITA_DLG_0] = MAKU_ASLEEP_DLG_0, + [MAKUHITA_DLG_1] = MAKU_ASLEEP_DLG_1, + [MAKUHITA_DLG_2] = MAKU_ASLEEP_DLG_2, + [MAKUHITA_DLG_3] = MAKU_ASLEEP_DLG_3, + [MAKUHITA_DLG_4] = MAKU_ASLEEP_DLG_4, + [MAKUHITA_DLG_5] = MAKU_ASLEEP_DLG_5, + [MAKUHITA_DLG_6] = MAKU_ASLEEP_DLG_6, + [MAKUHITA_DLG_7] = MAKU_ASLEEP_DLG_7, + [MAKUHITA_DLG_8] = MAKU_ASLEEP_DLG_8, + [MAKUHITA_DLG_9] = MAKU_ASLEEP_DLG_9 + } +}; + +ALIGNED(4) const Hints gCommonHints[HINT_MAX] = +{ + [HINT_TOWN_CONTROLS_1] = {HINTHEADING_TOWN_CONTROLS_1, HINTBODY_TOWN_CONTROLS_1}, + [HINT_TOWN_CONTROLS_2] = {HINTHEADING_TOWN_CONTROLS_2, HINTBODY_TOWN_CONTROLS_2}, + [HINT_SAVING] = {HINTHEADING_SAVING, HINTBODY_SAVING}, + [HINT_ADVENTURES_WITH_FRIENDS] = {HINTHEADING_ADVENTURES_WITH_FRIENDS, HINTBODY_ADVENTURES_WITH_FRIENDS}, + [HINT_BUILDING_A_TEAM] = {HINTHEADING_BUILDING_A_TEAM, HINTBODY_BUILDING_A_TEAM} +}; \ No newline at end of file diff --git a/src/data/code_80140DC.h b/src/data/code_80140DC.h index 7d06ba8b1..a19639132 100644 --- a/src/data/code_80140DC.h +++ b/src/data/code_80140DC.h @@ -1,25 +1,13 @@ -const u8 Yes_80D4878[]; -const u8 No_80D4874[]; - const MenuItem gUnknown_80D485C[] = { - {Yes_80D4878, 1}, - {No_80D4874, 0}, + {_("*Yes"), 1}, + {_("No"), 0}, {NULL, -1} }; -ALIGNED(4) const u8 No_80D4874[] = "No"; -ALIGNED(4) const u8 Yes_80D4878[] = "*Yes"; - -const u8 Yes_80D489C[]; -const u8 No_80D4898[]; - const MenuItem gUnknown_80D4880[] = { - {Yes_80D489C, 1}, - {No_80D4898, 0}, + {_("Yes"), 1}, + {_("*No"), 0}, {NULL, -1} -}; - -ALIGNED(4) const u8 No_80D4898[] = "*No"; -ALIGNED(4) const u8 Yes_80D489C[] = "Yes"; +}; \ No newline at end of file diff --git a/src/data/code_80227B8.h b/src/data/code_80227B8.h index 7098910af..f2709ada2 100644 --- a/src/data/code_80227B8.h +++ b/src/data/code_80227B8.h @@ -1,7 +1,7 @@ static const MenuItem sUnknown_80DC584[3] = { - {"Yes", 2}, - {"No", 3}, + {_("Yes"), 2}, + {_("No"), 3}, {NULL, 1}, }; diff --git a/src/data/common_strings_felicity_bank.h b/src/data/common_strings_felicity_bank.h deleted file mode 100644 index bcf5f8fc0..000000000 --- a/src/data/common_strings_felicity_bank.h +++ /dev/null @@ -1,224 +0,0 @@ -// TODO: The strings are in reverse-order if you insert them in-line with the array creation. -// Our preprocessor doesn't ALIGNED(4) for _("") strings. It does ALIGNED(1). This is why we do it this way for now until that's fixed - -static const u8 sUnknown_80D4A58[]; -static const u8 sUnknown_80D4C14[]; -static const u8 sUnknown_80D4C50[]; -static const u8 sUnknown_80D4CC0[]; -static const u8 sUnknown_80D4D20[]; -static const u8 sUnknown_80D4D44[]; -static const u8 sUnknown_80D4D8C[]; -static const u8 sUnknown_80D4E28[]; -static const u8 sUnknown_80D4E84[]; -static const u8 sUnknown_80D4EB0[]; -static const u8 sUnknown_80D4EDC[]; -static const u8 sUnknown_80D4F08[]; -static const u8 sUnknown_80D4F24[]; -static const u8 sUnknown_80D4F74[]; -static const u8 sUnknown_80D4F94[]; -static const u8 sUnknown_80D4FC8[]; -static const u8 sUnknown_80D5158[]; -static const u8 sUnknown_80D5184[]; -static const u8 sUnknown_80D51DC[]; -static const u8 sUnknown_80D5224[]; -static const u8 sUnknown_80D5244[]; -static const u8 sUnknown_80D527C[]; -static const u8 sUnknown_80D52F8[]; -static const u8 sUnknown_80D5340[]; -static const u8 sUnknown_80D5364[]; -static const u8 sUnknown_80D5380[]; -static const u8 sUnknown_80D538C[]; -static const u8 sUnknown_80D53C8[]; -static const u8 sUnknown_80D53E0[]; - -ALIGNED(4) const u8* const gCommonFelicity[FEL_MODE_COUNT][FEL_DLG_MAX] = -{ - [FEL_MODE_AWAKE] = { - [FEL_DLG_WELCOME] = sUnknown_80D53E0, - [FEL_DLG_HOW_MAY_I_SERVE__NO_MONEY] = sUnknown_80D53C8, - [FEL_DLG_HOW_MAY_I_SERVE__HAS_MONEY] = sUnknown_80D538C, - [FEL_DLG_VERY_WELL] = sUnknown_80D5380, - [FEL_DLG_BYE__NO_MONEY] = sUnknown_80D5364, - [FEL_DLG_BYE__HAS_MONEY] = sUnknown_80D5364, - [FEL_DLG_DEPOSIT__HOW_MUCH] = sUnknown_80D5340, - [FEL_DLG_DEPOSIT__NO_MONEY] = sUnknown_80D52F8, - [FEL_DLG_DEPOSIT__BANK_FULL] = sUnknown_80D527C, - [FEL_DLG_DEPOSIT__RECEIPT] = sUnknown_80D5244, - [FEL_DLG_WITHDRAW__HOW_MUCH] = sUnknown_80D5224, - [FEL_DLG_WITHDRAW__NO_MONEY] = sUnknown_80D51DC, - [FEL_DLG_WITHDRAW__WALLET_FULL] = sUnknown_80D5184, - [FEL_DLG_WITHDRAW__RECEIPT] = sUnknown_80D5158, - [FEL_DLG_HOW_IT_WORKS] = sUnknown_80D4FC8 - }, - [FEL_MODE_ASLEEP] = { - [FEL_DLG_WELCOME] = sUnknown_80D4F94, - [FEL_DLG_HOW_MAY_I_SERVE__NO_MONEY] = sUnknown_80D4F74, - [FEL_DLG_HOW_MAY_I_SERVE__HAS_MONEY] = sUnknown_80D4F24, - [FEL_DLG_VERY_WELL] = sUnknown_80D4F08, - [FEL_DLG_BYE__NO_MONEY] = sUnknown_80D4EDC, - [FEL_DLG_BYE__HAS_MONEY] = sUnknown_80D4EB0, - [FEL_DLG_DEPOSIT__HOW_MUCH] = sUnknown_80D4E84, - [FEL_DLG_DEPOSIT__NO_MONEY] = sUnknown_80D4E28, - [FEL_DLG_DEPOSIT__BANK_FULL] = sUnknown_80D4D8C, - [FEL_DLG_DEPOSIT__RECEIPT] = sUnknown_80D4D44, - [FEL_DLG_WITHDRAW__HOW_MUCH] = sUnknown_80D4D20, - [FEL_DLG_WITHDRAW__NO_MONEY] = sUnknown_80D4CC0, - [FEL_DLG_WITHDRAW__WALLET_FULL] = sUnknown_80D4C50, - [FEL_DLG_WITHDRAW__RECEIPT] = sUnknown_80D4C14, - [FEL_DLG_HOW_IT_WORKS] = sUnknown_80D4A58 - } -}; - -ALIGNED(4) static const u8 sUnknown_80D4A58[] = _( - " Sssnore...\n" - "Ah, you wish to know how the bank\n" - "operates... Very well...{EXTRA_MSG}" - " Zzz...\n" - "If you're defeated in a dungeon,\n" - "you'll lose all your money. Did you know?{EXTRA_MSG}" - " Purr...\n" - "But, you've nothing to fear if you leave\n" - "your money with Felicity Bank...{EXTRA_MSG}" - " Meow... Even if you\n" - "return defeated from a dungeon, your\n" - "money will be safe with me...{EXTRA_MSG}" - " Sssnore...\n" - "I assure you, my bank will keep your\n" - "money safe...{EXTRA_MSG}" - " Zzz...\n" - "Simple, isn't it...?"); - -ALIGNED(4) static const u8 sUnknown_80D4C14[] = _( - " {POKE}... Purr...\n" - "Very well, {COLOR CYAN}{VALUE_0}{RESET} {POKE}.\n" - "Here you are."); - -ALIGNED(4) static const u8 sUnknown_80D4C50[] = _( - " Fnarf? Hunh...?{EXTRA_MSG}" - " Purr... I so do apologize,\n" - "but you couldn't possibly carry any more\n" - "money with you..."); - -ALIGNED(4) static const u8 sUnknown_80D4CC0[] = _( - " Fnarf? Meow...?{EXTRA_MSG}" - " Purr...\n" - "I so hate to disappoint, but you have no\n" - "money saved with me..."); - -ALIGNED(4) static const u8 sUnknown_80D4D20[] = _( - " Zzz...\n" - "How much will you withdraw?"); - -ALIGNED(4) static const u8 sUnknown_80D4D44[] = _( - " Zzz...\n" - "{COLOR CYAN}{VALUE_0}{RESET} {POKE}... Very well...{WAIT_PRESS}\n" - "I will guard it jealously..."); - -ALIGNED(4) static const u8 sUnknown_80D4D8C[] = _( - " Fnarf? Purr...\n" - "Meow! All this money...{WAIT_PRESS}\n" - "Our safe is about to burst...{EXTRA_MSG}" - " Purr...\n" - "I am so sorry to say, but I can't accept\n" - "any more of your money..."); - -ALIGNED(4) static const u8 sUnknown_80D4E28[] = _( - " Sssnore... Hmm?{EXTRA_MSG}" - " Zzz...\n" - "I'm so sorry to say, but you appear not\n" - "to have any money..."); - -ALIGNED(4) static const u8 sUnknown_80D4E84[] = _( - " Purr...\n" - "How much do you wish to deposit?"); - -ALIGNED(4) static const u8 sUnknown_80D4EB0[] = _( - " Zzz... Meow...\n" - "I await your next visit..."); - -ALIGNED(4) static const u8 sUnknown_80D4EDC[] = _( - " Zzz... Purr...\n" - "I await your next visit..."); - -ALIGNED(4) static const u8 sUnknown_80D4F08[] = _( - " Sssnore...\n" - "Very well..."); - -ALIGNED(4) static const u8 sUnknown_80D4F24[] = _( - " Sssnore... Purr...\n" - "Your account contains {COLOR CYAN}{VALUE_0}{RESET} {POKE}...\n" - "How may I serve you?"); - -ALIGNED(4) static const u8 sUnknown_80D4F74[] = _( - " Zzz...\n" - "How may I serve you?"); - -ALIGNED(4) static const u8 sUnknown_80D4F94[] = _( - " Ssssnore... Welcome...\n" - "This is Felicity Bank..."); - -ALIGNED(4) static const u8 sUnknown_80D4FC8[] = _( - " Ah, you wish to know how\n" - "the bank operates. Very well.{EXTRA_MSG}" - " If you are defeated\n" - "in a dungeon, you'll lose all your money.\n" - "Did you know that?{EXTRA_MSG}" - " But you can avoid that!{WAIT_PRESS}\n" - "You've nothing to fear if you leave your\n" - "money with Felicity Bank.{EXTRA_MSG}" - " Even if you return\n" - "defeated from a dungeon, your money will\n" - "be safe with me!{EXTRA_MSG}" - " I assure you, my bank\n" - "will keep your money safe.{EXTRA_MSG}" - " Simple, isn't it?"); - -ALIGNED(4) static const u8 sUnknown_80D5158[] = _( - " Very well, {COLOR CYAN}{VALUE_0}{RESET} {POKE}.\n" - "Here you are."); - -ALIGNED(4) static const u8 sUnknown_80D5184[] = _( - " Oh?{WAIT_PRESS} I do so apologize,\n" - "but you couldn't possibly carry any more\n" - "money with you."); - -ALIGNED(4) static const u8 sUnknown_80D51DC[] = _( - " Oh?{WAIT_PRESS} I so hate to disappoint,\n" - "but you have no money saved with me."); - -ALIGNED(4) static const u8 sUnknown_80D5224[] = _( - " How much will you\n" - "withdraw?"); - -ALIGNED(4) static const u8 sUnknown_80D5244[] = _( - " {COLOR CYAN}{VALUE_0}{RESET} {POKE}. Very well.{WAIT_PRESS}\n" - "I will guard it jealously."); - -ALIGNED(4) static const u8 sUnknown_80D527C[] = _( - " Meow! All this money!{WAIT_PRESS}\n" - "Our safe is about to burst!{EXTRA_MSG}" - " I am so sorry to say, but\n" - "I can't accept any more of your money!"); - -ALIGNED(4) static const u8 sUnknown_80D52F8[] = _( - " Oh?{WAIT_PRESS} I'm so sorry to say,\n" - "but you appear not to have any money."); - -ALIGNED(4) static const u8 sUnknown_80D5340[] = _( - " How much do you wish to\n" - "deposit?"); - -ALIGNED(4) static const u8 sUnknown_80D5364[] = _(" I await your next visit."); - -ALIGNED(4) static const u8 sUnknown_80D5380[] = _(" Very well."); - -ALIGNED(4) static const u8 sUnknown_80D538C[] = _( - " Your account contains\n" - "{COLOR CYAN}{VALUE_0}{RESET} {POKE}.\n" - "How may I serve you?"); - -ALIGNED(4) static const u8 sUnknown_80D53C8[] = _(" How may I serve you?"); - -ALIGNED(4) static const u8 sUnknown_80D53E0[] = _( - " Welcome.\n" - "This is Felicity Bank."); \ No newline at end of file diff --git a/src/data/common_strings_gulpin_shop.h b/src/data/common_strings_gulpin_shop.h deleted file mode 100644 index b23d162c6..000000000 --- a/src/data/common_strings_gulpin_shop.h +++ /dev/null @@ -1,457 +0,0 @@ -static const u8 sUnknown_80D8950[]; -static const u8 sUnknown_80D8AB8[]; -static const u8 sUnknown_80D8BD4[]; -static const u8 sUnknown_80D8C98[]; -static const u8 sUnknown_80D8CC8[]; -static const u8 sUnknown_80D8D64[]; -static const u8 sUnknown_80D8DE8[]; -static const u8 sUnknown_80D8E28[]; -static const u8 sUnknown_80D8E48[]; -static const u8 sUnknown_80D8E9C[]; -static const u8 sUnknown_80D8EC4[]; -static const u8 sUnknown_80D8F98[]; -static const u8 sUnknown_80D9034[]; -static const u8 sUnknown_80D9080[]; -static const u8 sUnknown_80D90BC[]; -static const u8 sUnknown_80D9168[]; -static const u8 sUnknown_80D9194[]; -static const u8 sUnknown_80D91C4[]; -static const u8 sUnknown_80D91E4[]; -static const u8 sUnknown_80D9204[]; -static const u8 sUnknown_80D9234[]; -static const u8 sUnknown_80D9268[]; -static const u8 sUnknown_80D9290[]; -static const u8 sUnknown_80D92B4[]; -static const u8 sUnknown_80D92EC[]; -static const u8 sUnknown_80D9328[]; -static const u8 sUnknown_80D9498[]; -static const u8 sUnknown_80D972C[]; -static const u8 sUnknown_80D98D4[]; -static const u8 sUnknown_80D9904[]; -static const u8 sUnknown_80D9988[]; -static const u8 sUnknown_80D99F0[]; -static const u8 sUnknown_80D9A2C[]; -static const u8 sUnknown_80D9A50[]; -static const u8 sUnknown_80D9ACC[]; -static const u8 sUnknown_80D9B1C[]; -static const u8 sUnknown_80D9BD8[]; -static const u8 sUnknown_80D9C68[]; -static const u8 sUnknown_80D9CC0[]; -static const u8 sUnknown_80D9D00[]; -static const u8 sUnknown_80D9DA4[]; -static const u8 sUnknown_80D9DCC[]; -static const u8 sUnknown_80D9DF4[]; -static const u8 sUnknown_80D9E34[]; -static const u8 sUnknown_80D9E48[]; -static const u8 sUnknown_80D9E88[]; -static const u8 sUnknown_80D9EC0[]; -static const u8 sUnknown_80D9EF4[]; -static const u8 sUnknown_80D9F24[]; -static const u8 sUnknown_80D9F74[]; - -ALIGNED(4) const u8* const gCommonGulpin[GULPIN_SHOP_MODE_DIALOGUE_COUNT][GULPIN_DLG_MAX] = -{ - [GULPIN_SHOP_MODE_AWAKE] = { - [GULPIN_DLG_00] = sUnknown_80D9F74, - [GULPIN_DLG_01] = sUnknown_80D9F24, - [GULPIN_DLG_02] = sUnknown_80D9EF4, - [GULPIN_DLG_03] = sUnknown_80D9EC0, - [GULPIN_DLG_04] = sUnknown_80D9E88, - [GULPIN_DLG_05] = sUnknown_80D9E48, - [GULPIN_DLG_06] = sUnknown_80D9E34, - [GULPIN_DLG_07] = sUnknown_80D9DF4, - [GULPIN_DLG_08] = sUnknown_80D9DCC, - [GULPIN_DLG_09] = sUnknown_80D9DA4, - [GULPIN_DLG_10] = sUnknown_80D9D00, - [GULPIN_DLG_11] = sUnknown_80D9CC0, - [GULPIN_DLG_12] = sUnknown_80D9C68, - [GULPIN_DLG_13] = sUnknown_80D9BD8, - [GULPIN_DLG_14] = sUnknown_80D9B1C, - [GULPIN_DLG_15] = sUnknown_80D9ACC, - [GULPIN_DLG_16] = sUnknown_80D9A50, - [GULPIN_DLG_17] = sUnknown_80D9A2C, - [GULPIN_DLG_18] = sUnknown_80D99F0, - [GULPIN_DLG_19] = sUnknown_80D9988, - [GULPIN_DLG_20] = sUnknown_80D9904, - [GULPIN_DLG_21] = sUnknown_80D98D4, - [GULPIN_DLG_22] = sUnknown_80D972C, - [GULPIN_DLG_23] = sUnknown_80D9498, - [GULPIN_DLG_24] = sUnknown_80D9328 - }, - [GULPIN_SHOP_MODE_ASLEEP] = { - [GULPIN_DLG_00] = sUnknown_80D92EC, - [GULPIN_DLG_01] = sUnknown_80D92B4, - [GULPIN_DLG_02] = sUnknown_80D9290, - [GULPIN_DLG_03] = sUnknown_80D9268, - [GULPIN_DLG_04] = sUnknown_80D9234, - [GULPIN_DLG_05] = sUnknown_80D9204, - [GULPIN_DLG_06] = sUnknown_80D91E4, - [GULPIN_DLG_07] = sUnknown_80D91C4, - [GULPIN_DLG_08] = sUnknown_80D9194, - [GULPIN_DLG_09] = sUnknown_80D9168, - [GULPIN_DLG_10] = sUnknown_80D90BC, - [GULPIN_DLG_11] = sUnknown_80D9080, - [GULPIN_DLG_12] = sUnknown_80D9034, - [GULPIN_DLG_13] = sUnknown_80D8F98, - [GULPIN_DLG_14] = sUnknown_80D8EC4, - [GULPIN_DLG_15] = sUnknown_80D8E9C, - [GULPIN_DLG_16] = sUnknown_80D8E48, - [GULPIN_DLG_17] = sUnknown_80D8E28, - [GULPIN_DLG_18] = sUnknown_80D8DE8, - [GULPIN_DLG_19] = sUnknown_80D8D64, - [GULPIN_DLG_20] = sUnknown_80D8CC8, - [GULPIN_DLG_21] = sUnknown_80D8C98, - [GULPIN_DLG_22] = sUnknown_80D8BD4, - [GULPIN_DLG_23] = sUnknown_80D8AB8, - [GULPIN_DLG_24] = sUnknown_80D8950 - } -}; - -ALIGNED(4) static const u8 sUnknown_80D8950[] = _( - " Zzz... Snuffle...\n" - "I'd go broke if it weren't for those\n" - "forgetful Pokémon...{EXTRA_MSG}" - " Zzz... Gwaaah...\n" - "Especially that {COLOR CYAN}{POKEMON_4}{RESET}...\n" - "It seems to be forgetful...{EXTRA_MSG}" - " Sssnore...\n" - "I hope it forgets more moves...\n" - "So it needs to see me...{EXTRA_MSG}" - " Zzz... Mumble...\n" - "But we decided to get rid of that\n" - "{COLOR CYAN}{POKEMON_4}{RESET}...{EXTRA_MSG}" - " Gwaaaah... Gweh...\n" - "{COLOR CYAN}{POKEMON_4}{RESET} won't be coming around\n" - "anymore... "); - -ALIGNED(4) static const u8 sUnknown_80D8AB8[] = _( - " Zzznork...{WAIT_PRESS}\n" - "Link moves to use them all in\n" - "one turn...{EXTRA_MSG}" - " Zzz... Fnurf...?\n" - "Linked moves...\n" - "Top one goes first...{EXTRA_MSG}" - " Zzz... Hah...?\n" - "Delink moves to break links...{EXTRA_MSG}" - " Zzzzz... Fwaaah...\n" - "Change order of moves with {R_BUTTON}...\n" - "And up and down on {DPAD}...{EXTRA_MSG}" - " Gwaaah... Gweh...\n" - "Make your own links..."); - -ALIGNED(4) static const u8 sUnknown_80D8BD4[] = _( - " Zzz... Zzz...\n" - "A set move can be used...\n" - "Press {L_BUTTON} and {A_BUTTON}...{EXTRA_MSG}" - " Sssnort... Set the move...{WAIT_PRESS}\n" - "Press {L_BUTTON} and {A_BUTTON}...{WAIT_PRESS} Use move!{WAIT_PRESS}\n" - "Convenient...{EXTRA_MSG}" - " Sssnore...\n" - "Switch the set move in a dungeon, too..."); - -ALIGNED(4) static const u8 sUnknown_80D8C98[] = _( - " Zzznork... Fnurfle?\n" - "What do you want to know?"); - -ALIGNED(4) static const u8 sUnknown_80D8CC8[] = _( - " Fgwaaah...\n" - "Here goes...{EXTRA_MSG}" - " Zzznort...\n" - "Gggggggg...{WAIT_PRESS} Pwah!{EXTRA_MSG}" - " Fwaaah hah!\n" - "There...{EXTRA_MSG}" - " Zzz... Mutter...\n" - "{COLOR CYAN}{POKEMON_5}{RESET} forgot...\n" - "{COLOR GREEN}{POKEMON_1}{RESET} and moves linked to it..."); - -ALIGNED(4) static const u8 sUnknown_80D8D64[] = _( - " Fgwaaah...\n" - "Here goes...{EXTRA_MSG}" - " Zzznort...\n" - "Gggggggg...{WAIT_PRESS} Pwah!{EXTRA_MSG}" - " Fwaaah hah!\n" - "There...{EXTRA_MSG}" - " Zzz... Mumble...\n" - "{COLOR CYAN}{POKEMON_5}{RESET} forgot...\n" - "{COLOR GREEN}{POKEMON_1}{RESET}..."); - -ALIGNED(4) static const u8 sUnknown_80D8DE8[] = _( - " Zzz... Fwaah? Forget...?\n" - "{COLOR GREEN}{POKEMON_1}{RESET} and any moves\n" - "linked to it?"); - -ALIGNED(4) static const u8 sUnknown_80D8E28[] = _( - " Zzz... Forget...?\n" - "{COLOR GREEN}{POKEMON_1}{RESET}?"); - -ALIGNED(4) static const u8 sUnknown_80D8E48[] = _( - " Zzznork...? Hunh?\n" - "You're a special Pokémon...{EXTRA_MSG}" - " Mumble...\n" - "I can't help you..."); - -ALIGNED(4) static const u8 sUnknown_80D8E9C[] = _( - " Zzz... Fwaah?\n" - "No moves to remember..."); - -ALIGNED(4) static const u8 sUnknown_80D8EC4[] = _( - " Fgwaaah...\n" - "Here goes...{EXTRA_MSG}" - " Zzznort...\n" - "Gggggggg...{WAIT_PRESS} Pwah! Gulpin!{EXTRA_MSG}" - " Fwaaah hah!\n" - "There...{EXTRA_MSG}" - " Zzz... Mumble...\n" - "{COLOR CYAN_M}{POKEMON_5}{RESET}'s OK...{EXTRA_MSG}" - " Sssnork... Forgotten...\n" - "{COLOR GREEN}{POKEMON_1}{RESET} and moves linked to it...\n" - "Remembered {COLOR CYAN}{POKEMON_0}{RESET}..."); - -ALIGNED(4) static const u8 sUnknown_80D8F98[] = _( - " Fgwaah...\n" - "Here goes...{EXTRA_MSG}" - " Zzznort...\n" - "Gggggggg...{WAIT_PRESS} Pwah! Gulpin!{EXTRA_MSG}" - " Fwaah hah!\n" - "There...{EXTRA_MSG}" - " Zzz... Zzz... {COLOR CYAN_M}{POKEMON_5}{RESET}\n" - "forgot {COLOR GREEN}{POKEMON_1}{RESET}...\n" - "Remembered {COLOR CYAN}{POKEMON_0}{RESET}..."); - -ALIGNED(4) static const u8 sUnknown_80D9034[] = _( - " Zzz? Fnurf? \n" - "Forget {COLOR GREEN}{POKEMON_1}{RESET}...and moves linked\n" - "to it? Remember {COLOR CYAN}{POKEMON_0}{RESET}?"); - -ALIGNED(4) static const u8 sUnknown_80D9080[] = _( - " Zzznort... Grumble...\n" - "Forget {COLOR GREEN}{POKEMON_1}{RESET}?\n" - "Remember {COLOR CYAN}{POKEMON_0}{RESET}?"); - -ALIGNED(4) static const u8 sUnknown_80D90BC[] = _( - " Zzzznort... Move...?\n" - "Remember {COLOR CYAN}{POKEMON_0}{RESET}?{EXTRA_MSG}" - " Fwaah...\n" - "Gggggggggggg...{WAIT_PRESS} Gulpin!{EXTRA_MSG}" - " Fgwaah...\n" - "There...{EXTRA_MSG}" - " Zzz... Zzz...\n" - "{COLOR CYAN_M}{POKEMON_5}{RESET} remembered...\n" - "Hunh? That move, {COLOR CYAN}{POKEMON_0}{RESET}..."); - -ALIGNED(4) static const u8 sUnknown_80D9168[] = _( - " Zzz... Fgwah...?\n" - "Remember what? What move?"); - -ALIGNED(4) static const u8 sUnknown_80D9194[] = _( - " Gwaah... Gwaah...\n" - "Who's gonna link moves?"); - -ALIGNED(4) static const u8 sUnknown_80D91C4[] = _( - " Zzz... Zzz...\n" - "Come again..."); - -ALIGNED(4) static const u8 sUnknown_80D91E4[] = _( - " Zzz... Zzz...\n" - "Keep going...?"); - -ALIGNED(4) static const u8 sUnknown_80D9204[] = _( - " Zzznort... Zzznnort...\n" - "Can't forget that..."); - -ALIGNED(4) static const u8 sUnknown_80D9234[] = _( - " Sssnork... Sssnork...\n" - "Nothing to be delinked..."); - -ALIGNED(4) static const u8 sUnknown_80D9268[] = _( - " Zzz... Grumph...\n" - "Nothing to link..."); - -ALIGNED(4) static const u8 sUnknown_80D9290[] = _( - " Zzz... Grunt?\n" - "Not enough money..."); - -ALIGNED(4) static const u8 sUnknown_80D92B4[] = _( - " Zzz... Gulpin Link Shop...\n" - "Link for just 150 {POKE}..."); - -ALIGNED(4) static const u8 sUnknown_80D92EC[] = _( - " Zzz... Hello...\n" - "Gulpin Link Shop...\n" - "Link for 150 {POKE}..."); - -ALIGNED(4) static const u8 sUnknown_80D9328[] = _( - " What if you had to forget\n" - "a move, but you wanted it back?{WAIT_PRESS}\n" - "Ever face that situation?{EXTRA_MSG}" - " I can help!{WAIT_PRESS}\n" - "Come to me, and I can make you instantly\n" - "remember forgotten moves!{EXTRA_MSG}" - " I...{WAIT_PRESS}\n" - "Well, when Pokémon remember...{WAIT_PRESS}\n" - "I love seeing that instant!{EXTRA_MSG}" - " That look of enlightenment!{WAIT_PRESS}\n" - "That amazed look of pleasure!{EXTRA_MSG}" - " I run this business because\n" - "I live to see that moment!"); - -ALIGNED(4) static const u8 sUnknown_80D9498[] = _( - " When moves are linked...{WAIT_PRESS}\n" - "Two or more moves can be used one after\n" - "another in one turn!{EXTRA_MSG}" - " For example, if the moves\n" - "{COLOR CYAN}Scratch{RESET} and {COLOR CYAN}Growl{RESET} are\n" - "linked...{EXTRA_MSG}" - " Both {COLOR CYAN}Scratch{RESET} and {COLOR CYAN}Growl{RESET} are\n" - "used in one turn!{WAIT_PRESS}\n" - "See? Amazing, huh?{EXTRA_MSG}" - " Using links, heheh...{WAIT_PRESS}\n" - "Well, depending on the moves you link,\n" - "you can get incredible results!{EXTRA_MSG}" - " Oh, yes.\n" - "When moves are linked, they are used in\n" - "sequence from the top one first.{EXTRA_MSG}" - " You can also separate linked\n" - "moves by selecting the Delink command.{EXTRA_MSG}" - " The sequence of moves can\n" - "be changed by pressing {R_BUTTON},\n" - "then pressing up or down on {DPAD}.{EXTRA_MSG}" - " Try to innovate with links.{WAIT_PRESS}\n" - "Try creating links of your very own!"); - -ALIGNED(4) static const u8 sUnknown_80D972C[] = _( - " When you're in a dungeon\n" - "and you're about to use a move...{WAIT_PRESS}\n" - "Isn't it a pain to open a window each time?{EXTRA_MSG}" - " You can avoid that!{WAIT_PRESS}\n" - "You can just conveniently “Set”\n" - "a move for instant use!{EXTRA_MSG}" - " A set move can be instantly\n" - "used with {L_BUTTON} and {A_BUTTON}!{WAIT_PRESS}\n" - "See? Isn't it easy?{EXTRA_MSG}" - " Just set the move...{WAIT_PRESS}\n" - "Hold {L_BUTTON} and then press {A_BUTTON} to use it!{WAIT_PRESS}\n" - "It's very convenient!{EXTRA_MSG}" - " You can also switch the set\n" - "move in a dungeon.\n" - "Do try it out!\n"); - -ALIGNED(4) static const u8 sUnknown_80D98D4[] = _( - " Sure thing!\n" - "What do you need information on?"); - -ALIGNED(4) static const u8 sUnknown_80D9904[] = _( - " OK, here goes!{EXTRA_MSG}" - " Gggggggg...{WAIT_PRESS} Poof!{EXTRA_MSG}" - " There!\n" - "Success!{EXTRA_MSG}" - " {COLOR CYAN}{POKEMON_5}{RESET} has forgotten\n" - "the move {COLOR GREEN}{POKEMON_1}{RESET} and any moves\n" - "linked to it!"); - -ALIGNED(4) static const u8 sUnknown_80D9988[] = _( - " OK, here goes!{EXTRA_MSG}" - " Gggggggg...{WAIT_PRESS} Poof!{EXTRA_MSG}" - " There!\n" - "Success!{EXTRA_MSG}" - " {COLOR CYAN}{POKEMON_5}{RESET} has forgotten\n" - "the move {COLOR GREEN}{POKEMON_1}{RESET}!"); - -ALIGNED(4) static const u8 sUnknown_80D99F0[] = _( - " So, forget the move\n" - "{COLOR GREEN}{POKEMON_1}{RESET} and any moves linked to it?"); - -ALIGNED(4) static const u8 sUnknown_80D9A2C[] = _( - " So, forget the move\n" - "{COLOR GREEN}{POKEMON_1}{RESET}?"); - -ALIGNED(4) static const u8 sUnknown_80D9A50[] = _( - " Uh... Huh?{WAIT_PRESS}\n" - "You appear to be a special Pokémon.{EXTRA_MSG}" - " I can't help you remember\n" - "any moves, I don't think.\n" - "I'm sorry."); - -ALIGNED(4) static const u8 sUnknown_80D9ACC[] = _( - " Uh... Hello?{WAIT_PRESS}\n" - "There don't appear to be any moves that\n" - "can be remembered."); - -ALIGNED(4) static const u8 sUnknown_80D9B1C[] = _( - " OK, here goes!{EXTRA_MSG}" - " Gggggggg...{WAIT_PRESS} Pwah! Gulpin!{EXTRA_MSG}" - " There!\n" - "Success!{EXTRA_MSG}" - " {COLOR CYAN_M}{POKEMON_5}{RESET} is done!{EXTRA_MSG}" - " It's forgotten the move\n" - "{COLOR GREEN}{POKEMON_1}{RESET} and any moves linked to it,\n" - "and {COLOR CYAN}{POKEMON_0}{RESET} has been remembered!"); - -ALIGNED(4) static const u8 sUnknown_80D9BD8[] = _( - " OK, here goes!{EXTRA_MSG}" - " Gggggggg...{WAIT_PRESS} Pwah! Gulpin!{EXTRA_MSG}" - " There!\n" - "Success!{EXTRA_MSG}" - " {COLOR CYAN_M}{POKEMON_5}{RESET} has forgotten\n" - "the move {COLOR GREEN}{POKEMON_1}{RESET} and remembered\n" - "the move {COLOR CYAN}{POKEMON_0}{RESET}!"); - -ALIGNED(4) static const u8 sUnknown_80D9C68[] = _( - " So, forget {COLOR GREEN}{POKEMON_1}{RESET}\n" - "and any moves linked to it, and remember\n" - "the move {COLOR CYAN}{POKEMON_0}{RESET}?"); - -ALIGNED(4) static const u8 sUnknown_80D9CC0[] = _( - " So, forget the move\n" - "{COLOR GREEN}{POKEMON_1}{RESET} and remember the move\n" - "{COLOR CYAN}{POKEMON_0}{RESET}?"); - -ALIGNED(4) static const u8 sUnknown_80D9D00[] = _( - " So, the move {COLOR CYAN}{POKEMON_0}{RESET}\n" - "is the one to be remembered?{WAIT_PRESS}\n" - "OK, here goes!{EXTRA_MSG}" - " Gggggggggggg...{WAIT_PRESS} Gulpin!{EXTRA_MSG}" - " There!\n" - "Success!{EXTRA_MSG}" - " {COLOR CYAN_M}{POKEMON_5}{RESET} has\n" - "remembered the move {COLOR CYAN}{POKEMON_0}{RESET}!"); - -ALIGNED(4) static const u8 sUnknown_80D9DA4[] = _( - " Which move would you like\n" - "to recall?"); - -ALIGNED(4) static const u8 sUnknown_80D9DCC[] = _( - " Good!\n" - "Now, who wants to link moves?"); - -ALIGNED(4) static const u8 sUnknown_80D9DF4[] = _( - " Whenever you get the urge\n" - "to link moves, please come see me!"); - -ALIGNED(4) static const u8 sUnknown_80D9E34[] = _(" Shall we go on?"); - -ALIGNED(4) static const u8 sUnknown_80D9E48[] = _( - " If you forget that move,\n" - "you won't have any moves at all."); - -ALIGNED(4) static const u8 sUnknown_80D9E88[] = _( - " That move isn't linked,\n" - "so it can't be delinked."); - -ALIGNED(4) static const u8 sUnknown_80D9EC0[] = _( - " Too bad.\n" - "There are no moves that can be linked."); - -ALIGNED(4) static const u8 sUnknown_80D9EF4[] = _( - " Uh... Hello?\n" - "You don't have enough money?"); - -ALIGNED(4) static const u8 sUnknown_80D9F24[] = _( - " Welcome to the Gulpin\n" - "Link Shop!\n" - "Link moves all you like for just 150 {POKE}!"); - -ALIGNED(4) static const u8 sUnknown_80D9F74[] = _( - " Hello!\n" - "Welcome to the Gulpin Link Shop!\n" - "Link moves all you like for just 150 {POKE}!"); \ No newline at end of file diff --git a/src/data/common_strings_hints.h b/src/data/common_strings_hints.h deleted file mode 100644 index b8b8589af..000000000 --- a/src/data/common_strings_hints.h +++ /dev/null @@ -1,67 +0,0 @@ -static const u8 sUnknown_80DAAC0[]; -static const u8 sUnknown_80DABD8[]; -static const u8 sUnknown_80DABE8[]; -static const u8 sUnknown_80DAD28[]; -static const u8 sUnknown_80DAD40[]; -static const u8 sUnknown_80DADCC[]; -static const u8 sUnknown_80DADD4[]; -static const u8 sUnknown_80DAECC[]; -static const u8 sUnknown_80DAEE0[]; -static const u8 sUnknown_80DAF54[]; - -ALIGNED(4) const Hints gCommonHints[NUM_HINTS] = -{ - {sUnknown_80DAF54, sUnknown_80DAEE0}, - {sUnknown_80DAECC, sUnknown_80DADD4}, - {sUnknown_80DADCC, sUnknown_80DAD40}, - {sUnknown_80DAD28, sUnknown_80DABE8}, - {sUnknown_80DABD8, sUnknown_80DAAC0} -}; - -ALIGNED(4) static const u8 sUnknown_80DAAC0[] = _( - "Before leaving on an adventure, go visit\n" - "friends in their Friend Areas and pick\n" - "your mission members.\n" - "The team can include members up to\n" - "a total body size of 6{STAR_BULLET}. The body size\n" - "data is under the Info section.\n" - "Dungeons may also limit how many\n" - "members are allowed to go inside."); -ALIGNED(4) static const u8 sUnknown_80DABD8[] = _("Building a Team"); - -ALIGNED(4) static const u8 sUnknown_80DABE8[] = _( - "If new recruits join you, try to return to\n" - "your base without letting them faint.\n" - "If you get them out safely, they'll wait\n" - "for you in their Friend Areas.\n" - "Once you get them out, they'll always\n" - "return home if they faint in a dungeon.\n" - "If you faint in a dungeon, you lose all your\n" - "money and some items, too."); -ALIGNED(4) static const u8 sUnknown_80DAD28[] = _("Adventures with Friends"); - -ALIGNED(4) static const u8 sUnknown_80DAD40[] = _( - "You can save your adventure by\n" - "hopping onto your bed in your base.\n" - "Get in the habit of saving regularly as\n" - "you progress in your adventure."); -ALIGNED(4) static const u8 sUnknown_80DADCC[] = _("Saving"); - -ALIGNED(4) static const u8 sUnknown_80DADD4[] = _( - "Selecting multiple items in storage:\n" - " Select an item, then press {L_BUTTON} or {R_BUTTON}.\n" - "Moving to the Friend Area Map:\n" - " Move out from the town's west side\n" - " while pressing {L_BUTTON} or {R_BUTTON}.\n" - "Moving diagonally on the Friend Area Map:\n" - " {DPAD} while keeping {R_BUTTON} pressed."); -ALIGNED(4) static const u8 sUnknown_80DAECC[] = _("Controls in Town 2"); - -ALIGNED(4) static const u8 sUnknown_80DAEE0[] = _( - "Talk: {A_BUTTON}\n" - "Move: {DPAD}\n" - "Window: {B_BUTTON} lightly\n" - "Message scroll: {A_BUTTON} or {B_BUTTON}\n" - "Cancel: {B_BUTTON}\n" - "Description: Choose item or move, {START_BUTTON}"); -ALIGNED(4) static const u8 sUnknown_80DAF54[] = _("Controls in Town 1"); \ No newline at end of file diff --git a/src/data/common_strings_kangaskhan_storage.h b/src/data/common_strings_kangaskhan_storage.h deleted file mode 100644 index d44c40808..000000000 --- a/src/data/common_strings_kangaskhan_storage.h +++ /dev/null @@ -1,276 +0,0 @@ -static const u8 sUnknown_80D54A4[]; -static const u8 sUnknown_80D555C[]; -static const u8 sUnknown_80D5590[]; -static const u8 sUnknown_80D55C0[]; -static const u8 sUnknown_80D55F4[]; -static const u8 sUnknown_80D5630[]; -static const u8 sUnknown_80D5670[]; -static const u8 sUnknown_80D56AC[]; -static const u8 sUnknown_80D56CC[]; -static const u8 sUnknown_80D5710[]; -static const u8 sUnknown_80D574C[]; -static const u8 sUnknown_80D5774[]; -static const u8 sUnknown_80D57C4[]; -static const u8 sUnknown_80D57F4[]; -static const u8 sUnknown_80D5844[]; -static const u8 sUnknown_80D5884[]; -static const u8 sUnknown_80D58B0[]; -static const u8 sUnknown_80D5900[]; -static const u8 sUnknown_80D5934[]; -static const u8 sUnknown_80D5954[]; -static const u8 sUnknown_80D5984[]; -static const u8 sUnknown_80D5AF0[]; -static const u8 sUnknown_80D5B24[]; -static const u8 sUnknown_80D5B5C[]; -static const u8 sUnknown_80D5BAC[]; -static const u8 sUnknown_80D5BDC[]; -static const u8 sUnknown_80D5C1C[]; -static const u8 sUnknown_80D5C44[]; -static const u8 sUnknown_80D5C74[]; -static const u8 sUnknown_80D5CAC[]; -static const u8 sUnknown_80D5CE4[]; -static const u8 sUnknown_80D5D0C[]; -static const u8 sUnknown_80D5D58[]; -static const u8 sUnknown_80D5D8C[]; -static const u8 sUnknown_80D5DBC[]; -static const u8 sUnknown_80D5DE8[]; -static const u8 sUnknown_80D5E10[]; -static const u8 sUnknown_80D5E60[]; -static const u8 sUnknown_80D5E84[]; -static const u8 sUnknown_80D5E9C[]; - -ALIGNED(4) const u8* const gCommonKangStorage[KANG_MODE_COUNT][KANG_DLG_MAX] = -{ - [KANG_MODE_AWAKE] = { - [KANG_DLG_WELCOME] = sUnknown_80D5E9C, - [KANG_DLG_ANYTHING_ELSE] = sUnknown_80D5E84, - [KANG_DLG_BYE] = sUnknown_80D5E60, - [KANG_DLG_STORE_WHAT] = sUnknown_80D5E10, - [KANG_DLG_STORE_MORE] = sUnknown_80D5DE8, - [KANG_DLG_DEPOSIT_ONE_PROMPT] = sUnknown_80D5DBC, - [KANG_DLG_DEPOSIT_MANY_PROMPT] = sUnknown_80D5D8C, - [KANG_DLG_DEPOSIT_CONFIRMATION] = sUnknown_80D5D58, - [KANG_DLG_TAKE_WHAT] = sUnknown_80D5D0C, - [KANG_DLG_TAKE_MORE] = sUnknown_80D5CE4, - [KANG_DLG_WITHDRAW_ONE_PROMPT] = sUnknown_80D5CAC, - [KANG_DLG_WITHDRAW_MANY_PROMPT] = sUnknown_80D5C74, - [KANG_DLG_WITHDRAW_CONFIRMATION] = sUnknown_80D5C44, - [KANG_DLG_YOU_HAVE_NOTHING] = sUnknown_80D5C1C, - [KANG_DLG_YOU_ARE_FULL] = sUnknown_80D5BDC, - [KANG_DLG_STORAGE_HAS_NOTHING] = sUnknown_80D5BAC, - [KANG_DLG_DEPOSIT__INVALID_ITEM] = sUnknown_80D5B5C, - [KANG_DLG_DEPOSIT__TOO_MANY_OF_ITEM] = sUnknown_80D5B24, - [KANG_DLG_STORAGE_FULL] = sUnknown_80D5AF0, - [KANG_DLG_HOW_IT_WORKS] = sUnknown_80D5984 - }, - [KANG_MODE_ASLEEP] = { - [KANG_DLG_WELCOME] = sUnknown_80D5954, - [KANG_DLG_ANYTHING_ELSE] = sUnknown_80D5934, - [KANG_DLG_BYE] = sUnknown_80D5900, - [KANG_DLG_STORE_WHAT] = sUnknown_80D58B0, - [KANG_DLG_STORE_MORE] = sUnknown_80D5884, - [KANG_DLG_DEPOSIT_ONE_PROMPT] = sUnknown_80D5844, - [KANG_DLG_DEPOSIT_MANY_PROMPT] = sUnknown_80D57F4, - [KANG_DLG_DEPOSIT_CONFIRMATION] = sUnknown_80D57C4, - [KANG_DLG_TAKE_WHAT] = sUnknown_80D5774, - [KANG_DLG_TAKE_MORE] = sUnknown_80D574C, - [KANG_DLG_WITHDRAW_ONE_PROMPT] = sUnknown_80D5710, - [KANG_DLG_WITHDRAW_MANY_PROMPT] = sUnknown_80D56CC, - [KANG_DLG_WITHDRAW_CONFIRMATION] = sUnknown_80D56AC, - [KANG_DLG_YOU_HAVE_NOTHING] = sUnknown_80D5670, - [KANG_DLG_YOU_ARE_FULL] = sUnknown_80D5630, - [KANG_DLG_STORAGE_HAS_NOTHING] = sUnknown_80D55F4, - [KANG_DLG_DEPOSIT__INVALID_ITEM] = sUnknown_80D55C0, - [KANG_DLG_DEPOSIT__TOO_MANY_OF_ITEM] = sUnknown_80D5590, - [KANG_DLG_STORAGE_FULL] = sUnknown_80D555C, - [KANG_DLG_HOW_IT_WORKS] = sUnknown_80D54A4 - } -}; - -ALIGNED(4) static const u8 sUnknown_80D54A4[] = _( - " Zzz... Snork!\n" - "I can store items that you\n" - "found in dungeons...{EXTRA_MSG}" - " Snarfle...\n" - "Things in storage don't get lost...{EXTRA_MSG}" - " Zzz... Zzz...\n" - "That's why...\n" - "Keep important items in storage..."); - -ALIGNED(4) static const u8 sUnknown_80D555C[] = _( - " Zzz... Zzz... No...\n" - "The storage space is full..."); - -ALIGNED(4) static const u8 sUnknown_80D5590[] = _( - " Zzz... No...\n" - "Can't store any more of that..."); - -ALIGNED(4) static const u8 sUnknown_80D55C0[] = _( - " Zzz... Zzz...\n" - "That {COLOR GREEN}{MOVE_ITEM_0}{RESET}...\n" - "Can't store it..."); - -ALIGNED(4) static const u8 sUnknown_80D55F4[] = _( - " Snarfle? Hunh...?{WAIT_PRESS}\n" - "Zzz... Your storage space... Empty..."); - -ALIGNED(4) static const u8 sUnknown_80D5630[] = _( - " Snarfle? Hunh...?{WAIT_PRESS}\n" - "Zzz...\n" - "You don't have enough space..."); - -ALIGNED(4) static const u8 sUnknown_80D5670[] = _( - " Snarfle? Hunh...?{WAIT_PRESS}\n" - "Zzz...\n" - "You don't have anything...?"); - -ALIGNED(4) static const u8 sUnknown_80D56AC[] = _( - " Zzz... Snork!\n" - "There you go..."); - -ALIGNED(4) static const u8 sUnknown_80D56CC[] = _( - " Zzz... Zzz... Hunh...?\n" - "You want those things from storage...\n" - "OK?"); - -ALIGNED(4) static const u8 sUnknown_80D5710[] = _( - " Hunh...? Taking...?\n" - "Oh... You want your {COLOR GREEN}{MOVE_ITEM_0}{RESET}...\n" - "OK?"); - -ALIGNED(4) static const u8 sUnknown_80D574C[] = _( - " Snork! Zzz...\n" - "Taking anything else?"); - -ALIGNED(4) static const u8 sUnknown_80D5774[] = _( - " What...? Take out...?\n" - "Uh-huh... Choose more than one using\n" - "{L_BUTTON} or {R_BUTTON}... Zzz..."); - -ALIGNED(4) static const u8 sUnknown_80D57C4[] = _( - " Zzz... Zzz...\n" - "Yup, I did... Stored away..."); - -ALIGNED(4) static const u8 sUnknown_80D57F4[] = _( - " Hunh, wha--? Storage...?\n" - "I'll put away the things you chose...\n" - "That OK?"); - -ALIGNED(4) static const u8 sUnknown_80D5844[] = _( - " Zzz... Store something?\n" - "Gonna put {COLOR GREEN}{MOVE_ITEM_0}{RESET} in storage...\n" - "OK?"); - -ALIGNED(4) static const u8 sUnknown_80D5884[] = _( - " Do you... Snork...\n" - "Store anything else?"); - -ALIGNED(4) static const u8 sUnknown_80D58B0[] = _( - " Hunh, wha--? Store what...?\n" - "You can choose more than one using\n" - "{L_BUTTON} or {R_BUTTON}..."); - -ALIGNED(4) static const u8 sUnknown_80D5900[] = _( - " Snuffle... Mutter...\n" - "Thank you...\n" - "Come again..."); - -ALIGNED(4) static const u8 sUnknown_80D5934[] = _( - " Zzz... Snork...\n" - "Anything else?"); - -ALIGNED(4) static const u8 sUnknown_80D5954[] = _( - " Zzz... Zzz...\n" - "Hello, there...\n" - "{POKEMON_6} Storage..."); - -ALIGNED(4) static const u8 sUnknown_80D5984[] = _( - " I can store items that you\n" - "found in dungeons, or that you\n" - "bought from shops.{EXTRA_MSG}" - " If you faint in\n" - "a dungeon, your items will be lost...{WAIT_PRESS}\n" - "But what's in storage will be safe.{EXTRA_MSG}" - " I keep guard over the\n" - "storage space, so anything you leave\n" - "with me won't ever disappear!{EXTRA_MSG}" - " If you have any items that\n" - "you can't bear to lose, be sure to leave\n" - "them with me!"); - -ALIGNED(4) static const u8 sUnknown_80D5AF0[] = _( - " Sorry, dear.\n" - "I've run out of storage space."); - -ALIGNED(4) static const u8 sUnknown_80D5B24[] = _( - " Sorry, dear.\n" - "I can't take any more of that item."); - -ALIGNED(4) static const u8 sUnknown_80D5B5C[] = _( - " Oh, dear, sorry.{WAIT_PRESS}\n" - "That {COLOR GREEN}{MOVE_ITEM_0}{RESET} is an item you\n" - "can't put in storage."); - -ALIGNED(4) static const u8 sUnknown_80D5BAC[] = _( - " Oh?\n" - "You don't have anything stored, dear."); - -ALIGNED(4) static const u8 sUnknown_80D5BDC[] = _( - " Oh? You don't have the room\n" - "to carry any more items, dear."); - -ALIGNED(4) static const u8 sUnknown_80D5C1C[] = _( - " Oh?\n" - "You don't seem to have anything?"); - -ALIGNED(4) static const u8 sUnknown_80D5C44[] = _( - " There you go!\n" - "Just like you asked, sweetie!"); - -ALIGNED(4) static const u8 sUnknown_80D5C74[] = _( - " I'll take the items you\n" - "chose out of storage. OK?"); - -ALIGNED(4) static const u8 sUnknown_80D5CAC[] = _( - " Fine, I'll take your\n" - "{COLOR GREEN}{MOVE_ITEM_0}{RESET} out of storage. OK?"); - -ALIGNED(4) static const u8 sUnknown_80D5CE4[] = _( - " Would you like to take\n" - "anything else?"); - -ALIGNED(4) static const u8 sUnknown_80D5D0C[] = _( - " What will you take out?\n" - "You can choose more than one item using\n" - "{L_BUTTON} or {R_BUTTON}."); - -ALIGNED(4) static const u8 sUnknown_80D5D58[] = _( - " OK, stored away!\n" - "You can count on me, honey."); - -ALIGNED(4) static const u8 sUnknown_80D5D8C[] = _( - " I'll put the items you chose\n" - "in storage. OK?"); - -ALIGNED(4) static const u8 sUnknown_80D5DBC[] = _( - " I'll put your\n" - "{COLOR GREEN}{MOVE_ITEM_0}{RESET} in storage. OK?"); - -ALIGNED(4) static const u8 sUnknown_80D5DE8[] = _( - " Do you want to store\n" - "anything else?"); - -ALIGNED(4) static const u8 sUnknown_80D5E10[] = _( - " What do you want to store?\n" - "You can choose more than one item using\n" - "{L_BUTTON} or {R_BUTTON}."); - -ALIGNED(4) static const u8 sUnknown_80D5E60[] = _( - " Thank you, sweetie.\n" - "Come again!"); - -ALIGNED(4) static const u8 sUnknown_80D5E84[] = _(" Anything else, dear?"); - -ALIGNED(4) static const u8 sUnknown_80D5E9C[] = _( - " Hello, there!\n" - "Welcome to {POKEMON_6} Storage."); \ No newline at end of file diff --git a/src/data/common_strings_kecleon_bros.h b/src/data/common_strings_kecleon_bros.h deleted file mode 100644 index 82174ef5e..000000000 --- a/src/data/common_strings_kecleon_bros.h +++ /dev/null @@ -1,656 +0,0 @@ -static const u8 sUnknown_80D6038[]; -static const u8 sUnknown_80D6128[]; -static const u8 sUnknown_80D6168[]; -static const u8 sUnknown_80D61B0[]; -static const u8 sUnknown_80D61D4[]; -static const u8 sUnknown_80D6204[]; -static const u8 sUnknown_80D6250[]; -static const u8 sUnknown_80D627C[]; -static const u8 sUnknown_80D62B0[]; -static const u8 sUnknown_80D630C[]; -static const u8 sUnknown_80D6338[]; -static const u8 sUnknown_80D6364[]; -static const u8 sUnknown_80D6394[]; -static const u8 sUnknown_80D63E8[]; -static const u8 sUnknown_80D6420[]; -static const u8 sUnknown_80D6450[]; -static const u8 sUnknown_80D6478[]; -static const u8 sUnknown_80D6494[]; -static const u8 sUnknown_80D64C0[]; -static const u8 sUnknown_80D64E8[]; -static const u8 sUnknown_80D6508[]; -static const u8 sUnknown_80D652C[]; -static const u8 sUnknown_80D6544[]; -static const u8 sUnknown_80D6564[]; -static const u8 sUnknown_80D6818[]; -static const u8 sUnknown_80D6868[]; -static const u8 sUnknown_80D68A4[]; -static const u8 sUnknown_80D68E0[]; -static const u8 sUnknown_80D6938[]; -static const u8 sUnknown_80D6980[]; -static const u8 sUnknown_80D69B0[]; -static const u8 sUnknown_80D6A04[]; -static const u8 sUnknown_80D6A74[]; -static const u8 sUnknown_80D6AAC[]; -static const u8 sUnknown_80D6B18[]; -static const u8 sUnknown_80D6B50[]; -static const u8 sUnknown_80D6BA0[]; -static const u8 sUnknown_80D6BF4[]; -static const u8 sUnknown_80D6C1C[]; -static const u8 sUnknown_80D6C48[]; -static const u8 sUnknown_80D6C90[]; -static const u8 sUnknown_80D6CB8[]; -static const u8 sUnknown_80D6D08[]; -static const u8 sUnknown_80D6D38[]; -static const u8 sUnknown_80D6D5C[]; -static const u8 sUnknown_80D6D98[]; -static const u8 sUnknown_80D6E30[]; -static const u8 sUnknown_80D6E78[]; -static const u8 sUnknown_80D6EA4[]; -static const u8 sUnknown_80D6EEC[]; -static const u8 sUnknown_80D6F18[]; -static const u8 sUnknown_80D6F4C[]; -static const u8 sUnknown_80D6F8C[]; -static const u8 sUnknown_80D6FD4[]; -static const u8 sUnknown_80D7038[]; -static const u8 sUnknown_80D7064[]; -static const u8 sUnknown_80D7090[]; -static const u8 sUnknown_80D70B4[]; -static const u8 sUnknown_80D7108[]; -static const u8 sUnknown_80D7154[]; -static const u8 sUnknown_80D7184[]; -static const u8 sUnknown_80D71B0[]; -static const u8 sUnknown_80D71CC[]; -static const u8 sUnknown_80D7204[]; -static const u8 sUnknown_80D7228[]; -static const u8 sUnknown_80D7250[]; -static const u8 sUnknown_80D7270[]; -static const u8 sUnknown_80D72A0[]; -static const u8 sUnknown_80D72B8[]; -static const u8 sUnknown_80D7480[]; -static const u8 sUnknown_80D74DC[]; -static const u8 sUnknown_80D7524[]; -static const u8 sUnknown_80D7560[]; -static const u8 sUnknown_80D75AC[]; -static const u8 sUnknown_80D75E0[]; -static const u8 sUnknown_80D7610[]; -static const u8 sUnknown_80D7640[]; -static const u8 sUnknown_80D76A8[]; -static const u8 sUnknown_80D76D4[]; -static const u8 sUnknown_80D7740[]; -static const u8 sUnknown_80D776C[]; -static const u8 sUnknown_80D77C0[]; -static const u8 sUnknown_80D780C[]; -static const u8 sUnknown_80D7830[]; -static const u8 sUnknown_80D785C[]; -static const u8 sUnknown_80D788C[]; -static const u8 sUnknown_80D78CC[]; -static const u8 sUnknown_80D78F8[]; -static const u8 sUnknown_80D7934[]; -static const u8 sUnknown_80D7958[]; -static const u8 sUnknown_80D797C[]; - -ALIGNED(4) const u8* const gCommonKecleonBros[KECLEON_BROS_MODE_COUNT][KECLEON_DLG_MAX] = -{ - [KECLEON_BROS_MODE_ITEMS_AWAKE] = { - [KECLEON_DLG_00] = sUnknown_80D797C, - [KECLEON_DLG_01] = sUnknown_80D7958, - [KECLEON_DLG_02] = sUnknown_80D7934, - [KECLEON_DLG_03] = sUnknown_80D78F8, - [KECLEON_DLG_04] = sUnknown_80D78CC, - [KECLEON_DLG_05] = sUnknown_80D788C, - [KECLEON_DLG_06] = sUnknown_80D785C, - [KECLEON_DLG_07] = sUnknown_80D7830, - [KECLEON_DLG_08] = sUnknown_80D780C, - [KECLEON_DLG_09] = sUnknown_80D77C0, - [KECLEON_DLG_10] = sUnknown_80D776C, - [KECLEON_DLG_11] = sUnknown_80D7740, - [KECLEON_DLG_12] = sUnknown_80D76D4, - [KECLEON_DLG_13] = sUnknown_80D76A8, - [KECLEON_DLG_14] = sUnknown_80D7640, - [KECLEON_DLG_15] = sUnknown_80D7610, - [KECLEON_DLG_16] = sUnknown_80D75E0, - [KECLEON_DLG_17] = sUnknown_80D75AC, - [KECLEON_DLG_18] = sUnknown_80D7560, - [KECLEON_DLG_19] = sUnknown_80D7524, - [KECLEON_DLG_20] = sUnknown_80D74DC, - [KECLEON_DLG_21] = sUnknown_80D7480, - [KECLEON_DLG_22] = sUnknown_80D72B8 - }, - [KECLEON_BROS_MODE_ITEMS_ASLEEP] = { - [KECLEON_DLG_00] = sUnknown_80D72A0, - [KECLEON_DLG_01] = sUnknown_80D7270, - [KECLEON_DLG_02] = sUnknown_80D7250, - [KECLEON_DLG_03] = sUnknown_80D7228, - [KECLEON_DLG_04] = sUnknown_80D7204, - [KECLEON_DLG_05] = sUnknown_80D71CC, - [KECLEON_DLG_06] = sUnknown_80D71B0, - [KECLEON_DLG_07] = sUnknown_80D7184, - [KECLEON_DLG_08] = sUnknown_80D7154, - [KECLEON_DLG_09] = sUnknown_80D7108, - [KECLEON_DLG_10] = sUnknown_80D70B4, - [KECLEON_DLG_11] = sUnknown_80D7090, - [KECLEON_DLG_12] = sUnknown_80D7064, - [KECLEON_DLG_13] = sUnknown_80D7038, - [KECLEON_DLG_14] = sUnknown_80D6FD4, - [KECLEON_DLG_15] = sUnknown_80D6F8C, - [KECLEON_DLG_16] = sUnknown_80D6F4C, - [KECLEON_DLG_17] = sUnknown_80D6F18, - [KECLEON_DLG_18] = sUnknown_80D6EEC, - [KECLEON_DLG_19] = sUnknown_80D6EA4, - [KECLEON_DLG_20] = sUnknown_80D6E78, - [KECLEON_DLG_21] = sUnknown_80D6E30, - [KECLEON_DLG_22] = sUnknown_80D6D98 - }, - [KECLEON_BROS_MODE_WARES_AWAKE] = { - [KECLEON_DLG_00] = sUnknown_80D6D5C, - [KECLEON_DLG_01] = sUnknown_80D6D38, - [KECLEON_DLG_02] = sUnknown_80D6D08, - [KECLEON_DLG_03] = sUnknown_80D6CB8, - [KECLEON_DLG_04] = sUnknown_80D6C90, - [KECLEON_DLG_05] = sUnknown_80D6C48, - [KECLEON_DLG_06] = sUnknown_80D6C1C, - [KECLEON_DLG_07] = sUnknown_80D7830, - [KECLEON_DLG_08] = sUnknown_80D6BF4, - [KECLEON_DLG_09] = sUnknown_80D6BA0, - [KECLEON_DLG_10] = sUnknown_80D6B50, - [KECLEON_DLG_11] = sUnknown_80D6B18, - [KECLEON_DLG_12] = sUnknown_80D6AAC, - [KECLEON_DLG_13] = sUnknown_80D6A74, - [KECLEON_DLG_14] = sUnknown_80D6A04, - [KECLEON_DLG_15] = sUnknown_80D69B0, - [KECLEON_DLG_16] = sUnknown_80D6980, - [KECLEON_DLG_17] = sUnknown_80D6938, - [KECLEON_DLG_18] = sUnknown_80D68E0, - [KECLEON_DLG_19] = sUnknown_80D68A4, - [KECLEON_DLG_20] = sUnknown_80D6868, - [KECLEON_DLG_21] = sUnknown_80D6818, - [KECLEON_DLG_22] = sUnknown_80D6564 - }, - [KECLEON_BROS_MODE_WARES_ASLEEP] = { - [KECLEON_DLG_00] = sUnknown_80D6544, - [KECLEON_DLG_01] = sUnknown_80D652C, - [KECLEON_DLG_02] = sUnknown_80D6508, - [KECLEON_DLG_03] = sUnknown_80D64E8, - [KECLEON_DLG_04] = sUnknown_80D64C0, - [KECLEON_DLG_05] = sUnknown_80D6494, - [KECLEON_DLG_06] = sUnknown_80D6478, - [KECLEON_DLG_07] = sUnknown_80D6450, - [KECLEON_DLG_08] = sUnknown_80D6420, - [KECLEON_DLG_09] = sUnknown_80D63E8, - [KECLEON_DLG_10] = sUnknown_80D6394, - [KECLEON_DLG_11] = sUnknown_80D6364, - [KECLEON_DLG_12] = sUnknown_80D6338, - [KECLEON_DLG_13] = sUnknown_80D630C, - [KECLEON_DLG_14] = sUnknown_80D62B0, - [KECLEON_DLG_15] = sUnknown_80D627C, - [KECLEON_DLG_16] = sUnknown_80D6250, - [KECLEON_DLG_17] = sUnknown_80D6204, - [KECLEON_DLG_18] = sUnknown_80D61D4, - [KECLEON_DLG_19] = sUnknown_80D61B0, - [KECLEON_DLG_20] = sUnknown_80D6168, - [KECLEON_DLG_21] = sUnknown_80D6128, - [KECLEON_DLG_22] = sUnknown_80D6038 - } -}; - -ALIGNED(4) static const u8 sUnknown_80D6038[] = _( - " Zzz... Reep reep...\n" - "Wonder Orbs are convenient...{EXTRA_MSG}" - " Zzzzzz...\n" - "They disappear after one use...{EXTRA_MSG}" - " Zzz... And moves...\n" - "They are ultimate...{EXTRA_MSG}" - " Zzz... Eep...\n" - "Learn moves with Technical Machines...{EXTRA_MSG}" - " Zzz...\n" - "My good wares...\n" - "Come buy... Reep..."); - -ALIGNED(4) static const u8 sUnknown_80D6128[] = _( - " Zzz... Eep? No, no...{WAIT_PRESS}\n" - "You cannot hold any more money..."); - -ALIGNED(4) static const u8 sUnknown_80D6168[] = _( - " Zzz... Hunh? Wha--? Whoa!{WAIT_PRESS}\n" - "I... I can't accept anything like that!"); - -ALIGNED(4) static const u8 sUnknown_80D61B0[] = _( - " Reep...? Eep!{WAIT_PRESS}\n" - "Not enough money!"); - -ALIGNED(4) static const u8 sUnknown_80D61D4[] = _( - " Zzz... Uh-oh...{WAIT_PRESS}\n" - "All gone!\n" - "I am sold out..."); - -ALIGNED(4) static const u8 sUnknown_80D6204[] = _( - " Zzz... Hunh? Oh...{WAIT_PRESS}\n" - "Reep... No room... Reep...\n" - "No room for my wares..."); - -ALIGNED(4) static const u8 sUnknown_80D6250[] = _( - " Zzzzzz... Oh?{WAIT_PRESS}\n" - "You've got nothing..."); - -ALIGNED(4) static const u8 sUnknown_80D627C[] = _( - " Zzz... Oh...?{WAIT_PRESS}\n" - "You have nothing to sell...\n" - "Hunh?"); - -ALIGNED(4) static const u8 sUnknown_80D62B0[] = _( - " Eep...? Zzz...\n" - "You have too much money!{EXTRA_MSG}" - " Zzz... Eh?\n" - "You can't hold any more money..."); - -ALIGNED(4) static const u8 sUnknown_80D630C[] = _( - " Reep eep! Oh?{WAIT_PRESS}\n" - "Eep...?\n" - "You have no money?"); - -ALIGNED(4) static const u8 sUnknown_80D6338[] = _( - " ...{WAIT_PRESS}Zzz...\n" - "I am all sold out... Sorry..."); - -ALIGNED(4) static const u8 sUnknown_80D6364[] = _( - " Fine... Reep reep...\n" - "Done deal!\n" - "Thank you..."); - -ALIGNED(4) static const u8 sUnknown_80D6394[] = _( - " Zzz... Reep, what...?\n" - "For all that I can buy, I will pay\n" - "{COLOR CYAN}{VALUE_0}{RESET} {POKE}... OK?"); - -ALIGNED(4) static const u8 sUnknown_80D63E8[] = _( - " Zzzzzz... Zzzzzz...?\n" - "{COLOR GREEN}{MOVE_ITEM_0}{RESET}?\n" - "Is {COLOR CYAN}{VALUE_0}{RESET} {POKE} OK?"); - -ALIGNED(4) static const u8 sUnknown_80D6420[] = _( - " Reep reep... Eep...\n" - "Anything else for sale?"); - -ALIGNED(4) static const u8 sUnknown_80D6450[] = _( - " Zzz... Eep...?\n" - "What will you sell...?"); - -ALIGNED(4) static const u8 sUnknown_80D6478[] = _( - " Zzz... Reep!\n" - "Thank you..."); - -ALIGNED(4) static const u8 sUnknown_80D6494[] = _( - " Zzzzzz...\n" - "{COLOR GREEN}{MOVE_ITEM_0}{RESET} is {COLOR CYAN}{VALUE_0}{RESET} {POKE}...\n" - "OK?"); - -ALIGNED(4) static const u8 sUnknown_80D64C0[] = _( - " Anything? Zzz...\n" - "Buying anything else?"); - -ALIGNED(4) static const u8 sUnknown_80D64E8[] = _( - " Ah... Zzz...\n" - "My merchandise..."); - -ALIGNED(4) static const u8 sUnknown_80D6508[] = _( - " Thank... Reep eep...\n" - "Come again..."); - -ALIGNED(4) static const u8 sUnknown_80D652C[] = _( - " Reep...\n" - "Anything else?"); - -ALIGNED(4) static const u8 sUnknown_80D6544[] = _( - " Zzzzzz...\n" - "This is...my shop..."); - -ALIGNED(4) static const u8 sUnknown_80D6564[] = _( - " Wonder Orbs are very,\n" - "very convenient〜♪{EXTRA_MSG}" - " However, they disappear\n" - "after one use...{WAIT_PRESS}\n" - "But they are useful in a pinch!{EXTRA_MSG}" - " Use them cleverly, and your\n" - "adventures will be made much easier〜♪{EXTRA_MSG}" - " And moves...{WAIT_PRESS}\n" - "They are the ultimate power!{EXTRA_MSG}" - " Smash rocks!{WAIT_PRESS} Fly!{WAIT_PRESS}\n" - "There are many kinds of moves, all of\n" - "them dynamic, yet elegant!{EXTRA_MSG}" - " There are even moves of\n" - "obscure rarity...{WAIT_PRESS}\n" - "Simply gorgeous, they are!{EXTRA_MSG}" - " Now, we have these moves!{WAIT_PRESS}\n" - "They can be learned using our Technical\n" - "Machines, or TMs for short!{EXTRA_MSG}" - " You see?\n" - "Isn't it exciting? Even dreamy?{EXTRA_MSG}" - " Why, it gets me so excited,\n" - "my color has turned a rosy tint!{EXTRA_MSG}" - " I do hope you will shop\n" - "with us--me and my brother next to\n" - "me!"); - -ALIGNED(4) static const u8 sUnknown_80D6818[] = _( - " Oh, no, no!{WAIT_PRESS}\n" - "My friend, you cannot add to your money!\n" - "I cannot do this."); - -ALIGNED(4) static const u8 sUnknown_80D6868[] = _( - " Whoa, whoa!{WAIT_PRESS}\n" - "I... I can't accept anything like that!"); - -ALIGNED(4) static const u8 sUnknown_80D68A4[] = _( - " Eep! Oh, dear!{WAIT_PRESS}\n" - "You're short on money, my friend!"); - -ALIGNED(4) static const u8 sUnknown_80D68E0[] = _( - " Oh? Uh-oh!{WAIT_PRESS}\n" - "My shelves are bare of wares!{EXTRA_MSG}" - " I am completely sold out,\n" - "my friend!"); - -ALIGNED(4) static const u8 sUnknown_80D6938[] = _( - " Oh, dear me!{WAIT_PRESS}\n" - "My friend, you've run out of space for\n" - "my wares!"); - -ALIGNED(4) static const u8 sUnknown_80D6980[] = _( - " Oh?{WAIT_PRESS}\n" - "My friend, you seem to have nothing?"); - -ALIGNED(4) static const u8 sUnknown_80D69B0[] = _( - " Oh, oh, oh?{WAIT_PRESS}\n" - "My friend, you seem to not have anything\n" - "that you can sell?"); - -ALIGNED(4) static const u8 sUnknown_80D6A04[] = _( - " Oh, my, my!\n" - "My friend, you have too much money!{EXTRA_MSG}" - " You can't carry any more\n" - "money than you have now."); - -ALIGNED(4) static const u8 sUnknown_80D6A74[] = _( - " Oh?{WAIT_PRESS}\n" - "My friend, you seem not to have\n" - "enough money?"); - -ALIGNED(4) static const u8 sUnknown_80D6AAC[] = _( - " ...{WAIT_PRESS}I am all out of wares...\n" - "I am so sorry, my friend...{EXTRA_MSG}" - " Tomorrow!\n" - "Tomorrow I shall have more wares!"); - -ALIGNED(4) static const u8 sUnknown_80D6B18[] = _( - " Fine, fine, we have a deal!\n" - "Thank you so much〜♪ "); - -ALIGNED(4) static const u8 sUnknown_80D6B50[] = _( - " For all that I can buy, I can\n" - "offer you {COLOR CYAN}{VALUE_0}{RESET} {POKE}.\n" - "Is that acceptable?"); - -ALIGNED(4) static const u8 sUnknown_80D6BA0[] = _( - " {COLOR GREEN}{MOVE_ITEM_0}{RESET}, you say?\n" - "For that, I can offer {COLOR CYAN}{VALUE_0}{RESET} {POKE}.\n" - "Is that acceptable?"); - -ALIGNED(4) static const u8 sUnknown_80D6BF4[] = _( - " Do you wish to sell me\n" - "anything else?"); - -ALIGNED(4) static const u8 sUnknown_80D6C1C[] = _( - " Thank you so much〜♪\n" - "A very good choice!"); - -ALIGNED(4) static const u8 sUnknown_80D6C48[] = _( - " {COLOR GREEN}{MOVE_ITEM_0}{RESET}, you say?\n" - "That will be {COLOR CYAN}{VALUE_0}{RESET} {POKE}.\n" - "Is that acceptable?"); - -ALIGNED(4) static const u8 sUnknown_80D6C90[] = _( - " Do you wish to purchase\n" - "anything else?"); - -ALIGNED(4) static const u8 sUnknown_80D6CB8[] = _( - " Ah, very well!\n" - "Do examine my merchandise.\n" - "I have chosen it with pride〜♪ "); - -ALIGNED(4) static const u8 sUnknown_80D6D08[] = _( - " Thank you so much!\n" - "Please do visit again〜♪ "); - -ALIGNED(4) static const u8 sUnknown_80D6D38[] = _( - " May I assist you in any\n" - "other way?"); - -ALIGNED(4) static const u8 sUnknown_80D6D5C[] = _( - " Welcome to Kecleon Wares!\n" - "The shop for Orbs and TMs〜♪ "); - -ALIGNED(4) static const u8 sUnknown_80D6D98[] = _( - " Zzzzzz...\n" - "I sell items...{EXTRA_MSG}" - " Items... Meep meep...\n" - "Are useful in dungeons...{EXTRA_MSG}" - " Use... Zzz... Huh...?\n" - "Your imagination...and be clever...\n" - "With them..."); - -ALIGNED(4) static const u8 sUnknown_80D6E30[] = _( - " Zzz... Hunh, what...?{WAIT_PRESS}\n" - "Zzz... You can't hold any more money..."); - -ALIGNED(4) static const u8 sUnknown_80D6E78[] = _( - " Zzz... Whoa...{WAIT_PRESS}\n" - "I... I can't take that!"); - -ALIGNED(4) static const u8 sUnknown_80D6EA4[] = _( - " Zzz... Huh, my...!{WAIT_PRESS}\n" - "Meep... Meep...\n" - "You don't have enough money!"); - -ALIGNED(4) static const u8 sUnknown_80D6EEC[] = _( - " Zzz... Uh-oh?!{WAIT_PRESS}\n" - "Eep!\n" - "Sold out! All gone!"); - -ALIGNED(4) static const u8 sUnknown_80D6F18[] = _( - " Zzz... Oh, my!{WAIT_PRESS}\n" - "Meep... You have no space..."); - -ALIGNED(4) static const u8 sUnknown_80D6F4C[] = _( - " Zzz... Eep...?{WAIT_PRESS}\n" - "Meep... You don't seem to have\n" - "anything...?"); - -ALIGNED(4) static const u8 sUnknown_80D6F8C[] = _( - " Zzz... Huh?{WAIT_PRESS}\n" - "Meep meep...\n" - "You don't seem to have anything to sell?"); - -ALIGNED(4) static const u8 sUnknown_80D6FD4[] = _( - " Zzz... Oh, my!\n" - "You have so much money...!{EXTRA_MSG}" - " Zzz... Meep...\n" - "You can't carry any more money..."); - -ALIGNED(4) static const u8 sUnknown_80D7038[] = _( - " Hunh?{WAIT_PRESS}\n" - "Eep...?\n" - "You don't have money?"); - -ALIGNED(4) static const u8 sUnknown_80D7064[] = _( - " ...{WAIT_PRESS} ZZZ!\n" - "I'm sold out... Forgive me..."); - -ALIGNED(4) static const u8 sUnknown_80D7090[] = _( - " Done... Meep! Deal!\n" - "Thank you..."); - -ALIGNED(4) static const u8 sUnknown_80D70B4[] = _( - " Zzzzzz... Zzzzzz...?\n" - "I can pay you {COLOR CYAN}{VALUE_0}{RESET} {POKE}\n" - "for everything I can buy... OK?"); - -ALIGNED(4) static const u8 sUnknown_80D7108[] = _( - " Zzzzzz... Zzzzzz...?\n" - "Selling that {COLOR GREEN}{MOVE_ITEM_0}{RESET}...?\n" - "How about {COLOR CYAN}{VALUE_0}{RESET} {POKE}?"); - -ALIGNED(4) static const u8 sUnknown_80D7154[] = _( - " Zzz... Meep...\n" - "Going to sell anything else?"); - -ALIGNED(4) static const u8 sUnknown_80D7184[] = _( - " Zzz... Zzz...?\n" - "You're selling what...?"); - -ALIGNED(4) static const u8 sUnknown_80D71B0[] = _( - " Eep! Wah...?\n" - "Thank you..."); - -ALIGNED(4) static const u8 sUnknown_80D71CC[] = _( - " Zzz... Meep meep...\n" - "{COLOR GREEN}{MOVE_ITEM_0}{RESET}...?\n" - "{COLOR CYAN}{VALUE_0}{RESET} {POKE}, OK?"); - -ALIGNED(4) static const u8 sUnknown_80D7204[] = _( - " Buy? Huh, eep?\n" - "Anything else?"); - -ALIGNED(4) static const u8 sUnknown_80D7228[] = _( - " Zzz... Meep... Eep...\n" - "Look around..."); - -ALIGNED(4) static const u8 sUnknown_80D7250[] = _( - " Thank... Zzz...\n" - "Thank you..."); - -ALIGNED(4) static const u8 sUnknown_80D7270[] = _( - " Zzz... Meep...\n" - "Help you with anything else?"); - -ALIGNED(4) static const u8 sUnknown_80D72A0[] = _( - " Zzzzzz...\n" - "Welcome..."); - -ALIGNED(4) static const u8 sUnknown_80D72B8[] = _( - " We, the {POKEMON_6}\n" - "Brothers, have a passion for selling\n" - "items.{EXTRA_MSG}" - " Items are useful for your\n" - "dungeon adventures.{EXTRA_MSG}" - " Use your imagination and\n" - "discover innovative uses, please.{EXTRA_MSG}" - " Ah, yes.\n" - "If my shop sells out...{EXTRA_MSG}" - " New merchandise will\n" - "arrive the following day.{EXTRA_MSG}" - " Until then, please go to\n" - "a dungeon and spend some time.\n" - "Please visit on your return〜♪{EXTRA_MSG}" - " Ah, yes. The {POKEMON_6}\n" - "Shop is a nationwide chain.{EXTRA_MSG}" - " There are shops even in\n" - "dungeons.\n" - "Please do visit〜♪ "); - -ALIGNED(4) static const u8 sUnknown_80D7480[] = _( - " Oh, my!{WAIT_PRESS}\n" - "You can't add any more to your money.\n" - "I can't complete this deal, sorry."); - -ALIGNED(4) static const u8 sUnknown_80D74DC[] = _( - " Oh, whoa, whoa!{WAIT_PRESS}\n" - "I... I couldn't possibly take that from you!"); - -ALIGNED(4) static const u8 sUnknown_80D7524[] = _( - " Oh, my!{WAIT_PRESS}\n" - "Sorry, but you don't have enough money!"); - -ALIGNED(4) static const u8 sUnknown_80D7560[] = _( - " Uh-oh?!{WAIT_PRESS}\n" - "That's it! No more merchandise!{EXTRA_MSG}" - " I'm completely sold out!"); - -ALIGNED(4) static const u8 sUnknown_80D75AC[] = _( - " Oh, my!{WAIT_PRESS}\n" - "You have no space for any more items!"); - -ALIGNED(4) static const u8 sUnknown_80D75E0[] = _( - " Oh? Oh?{WAIT_PRESS}\n" - "You don't seem to have anything?"); - -ALIGNED(4) static const u8 sUnknown_80D7610[] = _( - " Oh? Oh?{WAIT_PRESS}\n" - "You seem to have nothing to sell?"); - -ALIGNED(4) static const u8 sUnknown_80D7640[] = _( - " Oh, my goodness!\n" - "You're overflowing with money!{EXTRA_MSG}" - " You couldn't possibly carry\n" - "any more money! "); - -ALIGNED(4) static const u8 sUnknown_80D76A8[] = _( - " Huh?{WAIT_PRESS}\n" - "You don't seem to have the money?"); - -ALIGNED(4) static const u8 sUnknown_80D76D4[] = _( - " ...{WAIT_PRESS}I'm sold out...\n" - "Please, forgive me.{EXTRA_MSG}" - " I will have new merchandise\n" - "for you tomorrow, I swear!"); - -ALIGNED(4) static const u8 sUnknown_80D7740[] = _( - " Good! Done deal!\n" - "Thank you so much〜♪ "); - -ALIGNED(4) static const u8 sUnknown_80D776C[] = _( - " For everything I can buy,\n" - "I can offer {COLOR CYAN}{VALUE_0}{RESET} {POKE}.\n" - "Is that acceptable to you?"); - -ALIGNED(4) static const u8 sUnknown_80D77C0[] = _( - " {COLOR GREEN}{MOVE_ITEM_0}{RESET}?\n" - "I can offer you {COLOR CYAN}{VALUE_0}{RESET} {POKE}.\n" - "Will you sell it for that price?"); - -ALIGNED(4) static const u8 sUnknown_80D780C[] = _( - " Do you wish to sell\n" - "anything else?"); - -ALIGNED(4) static const u8 sUnknown_80D7830[] = _( - " Ah, very well!\n" - "What do you wish to sell?"); - -ALIGNED(4) static const u8 sUnknown_80D785C[] = _( - " Very well! Thank you〜♪\n" - "It is yours to take!"); - -ALIGNED(4) static const u8 sUnknown_80D788C[] = _( - " {COLOR GREEN}{MOVE_ITEM_0}{RESET}?\n" - "That will be {COLOR CYAN}{VALUE_0}{RESET} {POKE}.\n" - "Is that to your liking?"); - -ALIGNED(4) static const u8 sUnknown_80D78CC[] = _( - " Do you wish to buy\n" - "anything else today?"); - -ALIGNED(4) static const u8 sUnknown_80D78F8[] = _( - " Ah, very well!\n" - "Feel free to examine my merchandise〜♪"); - -ALIGNED(4) static const u8 sUnknown_80D7934[] = _( - " Thank you!\n" - "Please call again〜♪ "); - -ALIGNED(4) static const u8 sUnknown_80D7958[] = _( - " May I help you with\n" - "anything else?"); - -ALIGNED(4) static const u8 sUnknown_80D797C[] = _( - " Hello〜♪\n" - "Welcome to the {POKEMON_6} Shop〜♪ "); \ No newline at end of file diff --git a/src/data/common_strings_makuhita_dojo.h b/src/data/common_strings_makuhita_dojo.h deleted file mode 100644 index 087995a03..000000000 --- a/src/data/common_strings_makuhita_dojo.h +++ /dev/null @@ -1,202 +0,0 @@ -static const u8 sUnknown_80DA018[]; -static const u8 sUnknown_80DA0DC[]; -static const u8 sUnknown_80DA100[]; -static const u8 sUnknown_80DA204[]; -static const u8 sUnknown_80DA248[]; -static const u8 sUnknown_80DA290[]; -static const u8 sUnknown_80DA2B4[]; -static const u8 sUnknown_80DA2D4[]; -static const u8 sUnknown_80DA2F0[]; -static const u8 sUnknown_80DA30C[]; -static const u8 sUnknown_80DA338[]; -static const u8 sUnknown_80DA62C[]; -static const u8 sUnknown_80DA688[]; -static const u8 sUnknown_80DA844[]; -static const u8 sUnknown_80DA908[]; -static const u8 sUnknown_80DA998[]; -static const u8 sUnknown_80DA9D4[]; -static const u8 sUnknown_80DA9F4[]; -static const u8 sUnknown_80DAA2C[]; -static const u8 sUnknown_80DAA44[]; - -ALIGNED(4) const u8* const gCommonMakuhita[MAKUHITA_DOJO_MODE_COUNT][MAKUHITA_DLG_MAX] = -{ - [MAKUHITA_DOJO_MODE_AWAKE] = { - [MAKUHITA_DLG_0] = sUnknown_80DAA44, - [MAKUHITA_DLG_1] = sUnknown_80DAA2C, - [MAKUHITA_DLG_2] = sUnknown_80DA9F4, - [MAKUHITA_DLG_3] = sUnknown_80DA9D4, - [MAKUHITA_DLG_4] = sUnknown_80DA998, - [MAKUHITA_DLG_5] = sUnknown_80DA908, - [MAKUHITA_DLG_6] = sUnknown_80DA844, - [MAKUHITA_DLG_7] = sUnknown_80DA688, - [MAKUHITA_DLG_8] = sUnknown_80DA62C, - [MAKUHITA_DLG_9] = sUnknown_80DA338 - }, - [MAKUHITA_DOJO_MODE_ASLEEP] = { - [MAKUHITA_DLG_0] = sUnknown_80DA30C, - [MAKUHITA_DLG_1] = sUnknown_80DA2F0, - [MAKUHITA_DLG_2] = sUnknown_80DA2D4, - [MAKUHITA_DLG_3] = sUnknown_80DA2B4, - [MAKUHITA_DLG_4] = sUnknown_80DA290, - [MAKUHITA_DLG_5] = sUnknown_80DA248, - [MAKUHITA_DLG_6] = sUnknown_80DA204, - [MAKUHITA_DLG_7] = sUnknown_80DA100, - [MAKUHITA_DLG_8] = sUnknown_80DA0DC, - [MAKUHITA_DLG_9] = sUnknown_80DA018 - } -}; - -ALIGNED(4) static const u8 sUnknown_80DA018[] = _( - " Zzznarr... Zzz...\n" - "This dojo...\n" - "Help rescue teams...{EXTRA_MSG}" - " Zzznarr... Urr...\n" - "Train in different rooms to level up...{EXTRA_MSG}" - " Zzznarr... Urr!\n" - "Make stronger rescue team...{EXTRA_MSG}" - " Urr... Zzznarr!\n" - "Don't let up!"); - -ALIGNED(4) static const u8 sUnknown_80DA0DC[] = _( - " Zzznarr... Zzz...!\n" - "Keep working..."); - -ALIGNED(4) static const u8 sUnknown_80DA100[] = _( - " Ah... Zzznarr...\n" - "Cleared it...{EXTRA_MSG}" - " Zzzznarr... Urr...\n" - "Good going... Keep going...{WAIT_PRESS}\n" - "Hunh...{WAIT_PRESS} ...{EXTRA_MSG}" - " Gwoh?{WAIT_PRESS}\n" - "Gwogwogwoh?{EXTRA_MSG}" - " Mugawah?\n" - "Cleared everything?{EXTRA_MSG}" - " Zzznarr!\n" - "Congrazzz...{EXTRA_MSG}" - " Zzznarr... Zzznarr...\n" - "Your reward...\n" - "Promised...{EXTRA_MSG}" - " Zzz... Urr!\n" - "{COLOR GREEN_I}Bonsly Doll{RESET}..."); - -ALIGNED(4) static const u8 sUnknown_80DA204[] = _( - " Ah... Zzznarr...\n" - "Cleared it...{EXTRA_MSG}" - " Congrazzz...\n" - "Keep going... Zzz..."); - -ALIGNED(4) static const u8 sUnknown_80DA248[] = _( - " Aiyah... Zzznarr...\n" - "Didn't finish...{EXTRA_MSG}" - " Zzz... Urr?\n" - "No giving up..."); - -ALIGNED(4) static const u8 sUnknown_80DA290[] = _( - " Zzz... Narr...\n" - "{POKEMON_0}? 'K, go..."); - -ALIGNED(4) static const u8 sUnknown_80DA2B4[] = _( - " Zzznarr... Zzz...\n" - "Train where?"); - -ALIGNED(4) static const u8 sUnknown_80DA2D4[] = _( - " Urr... Narr...\n" - "See you..."); - -ALIGNED(4) static const u8 sUnknown_80DA2F0[] = _( - " Zzznarr... Urr?\n" - "What else?"); - -ALIGNED(4) static const u8 sUnknown_80DA30C[] = _( - " Zzznarr... Zzznarr...\n" - "Makuhita... Dojo..."); - -ALIGNED(4) static const u8 sUnknown_80DA338[] = _( - " This dojo was founded to\n" - "support the efforts of rescue teams.{EXTRA_MSG}" - " Train in different rooms to\n" - "level up...{WAIT_PRESS}\n" - "And toughen up your rescue team.{EXTRA_MSG}" - " Also...{WAIT_PRESS}\n" - "In the {COLOR YELLOW_D}Fire Maze{RESET} you will find only\n" - "Fire-type Pokémon.{EXTRA_MSG}" - " In the {COLOR YELLOW_D}Water Maze{RESET} there\n" - "will only be Water-type Pokémon.{EXTRA_MSG}" - " In such ways, only one type\n" - "of Pokémon will be in a given room.\n" - "Study how types match up in battle.{EXTRA_MSG}" - " The Pokémon in this dojo,\n" - "by the way, are all volunteers.{EXTRA_MSG}" - " They are participating\n" - "because they want to see rescue teams\n" - "succeed.{EXTRA_MSG}" - " The only thanks they expect\n" - "is to see you become stronger.\n" - "Don't let them down!{EXTRA_MSG}" - " There's more.{WAIT_PRESS}\n" - "For a rescue team that successfully\n" - "completes all training courses...{EXTRA_MSG}" - " I have a special reward!{EXTRA_MSG}" - " Let that compel you to train\n" - "harder!"); - -ALIGNED(4) static const u8 sUnknown_80DA62C[] = _( - " Don't let up on your training!\n" - "Keep bettering yourself!{EXTRA_MSG}" - " May you never lose your\n" - "drive!"); - -ALIGNED(4) static const u8 sUnknown_80DA688[] = _( - " Ah...\n" - "You have succeeded in your training!{EXTRA_MSG}" - " You've shown your worth!{WAIT_PRESS}\n" - "Without a doubt, you have grown more\n" - "powerful from your training!{WAIT_PRESS} Wait...{WAIT_PRESS} ...{EXTRA_MSG}" - " Wuh?{WAIT_PRESS}\n" - "What, what, what?!{EXTRA_MSG}" - " Did you maybe...{WAIT_PRESS}\n" - "Conquer all the training courses?{EXTRA_MSG}" - " That's...{WAIT_PRESS} Amazing! You!{WAIT_PRESS}\n" - "Congratulations!{EXTRA_MSG}" - " I promised!{WAIT_PRESS}\n" - "I promised you a reward for completing\n" - "the training courses!{EXTRA_MSG}" - " So... Here it is!{WAIT_PRESS}\n" - "My {COLOR GREEN_I}Bonsly Doll{RESET}!{EXTRA_MSG}" - " Isn't it smashing? Hey?!"); - -ALIGNED(4) static const u8 sUnknown_80DA844[] = _( - " Ah...\n" - "You have succeeded in your training!{EXTRA_MSG}" - " You've shown your worth!{WAIT_PRESS}\n" - "Without a doubt, you have grown more\n" - "powerful from your training!{EXTRA_MSG}" - " May this success drive\n" - "you to train even harder!"); - -ALIGNED(4) static const u8 sUnknown_80DA908[] = _( - " Aiyah...{WAIT_PRESS}\n" - "You failed to reach the end...{WAIT_PRESS}\n" - "More training is what you need.{EXTRA_MSG}" - " But effort is never wasted!{EXTRA_MSG}" - " Learn from this and move\n" - "forward!"); - -ALIGNED(4) static const u8 sUnknown_80DA998[] = _( - " The {POKEMON_0}?{WAIT_PRESS}\n" - "Your decision stands!{WAIT_PRESS}\n" - "Let the training begin!"); - -ALIGNED(4) static const u8 sUnknown_80DA9D4[] = _(" Where do you wish to train?"); - -ALIGNED(4) static const u8 sUnknown_80DA9F4[] = _( - " Fine, farewell.\n" - "Return if you seek more training."); - -ALIGNED(4) static const u8 sUnknown_80DAA2C[] = _(" What else do you seek?"); - -ALIGNED(4) static const u8 sUnknown_80DAA44[] = _( - " This is the Makuhita Dojo!{WAIT_PRESS}\n" - "Through rigorous training, one begets\n" - "true power."); \ No newline at end of file diff --git a/src/data/common_strings_wigglytuff_shop.h b/src/data/common_strings_wigglytuff_shop.h deleted file mode 100644 index a3a37e054..000000000 --- a/src/data/common_strings_wigglytuff_shop.h +++ /dev/null @@ -1,320 +0,0 @@ -static const u8 sUnknown_80D7A44[]; -static const u8 sUnknown_80D7C94[]; -static const u8 sUnknown_80D7CE8[]; -static const u8 sUnknown_80D7D64[]; -static const u8 sUnknown_80D7DA0[]; -static const u8 sUnknown_80D7DE0[]; -static const u8 sUnknown_80D7E04[]; -static const u8 sUnknown_80D7E2C[]; -static const u8 sUnknown_80D7E58[]; -static const u8 sUnknown_80D7E9C[]; -static const u8 sUnknown_80D7ED0[]; -static const u8 sUnknown_80D7F10[]; -static const u8 sUnknown_80D7F7C[]; -static const u8 sUnknown_80D8000[]; -static const u8 sUnknown_80D8030[]; -static const u8 sUnknown_80D8054[]; -static const u8 sUnknown_80D8080[]; -static const u8 sUnknown_80D80B0[]; -static const u8 sUnknown_80D80D4[]; -static const u8 sUnknown_80D8104[]; -static const u8 sUnknown_80D8420[]; -static const u8 sUnknown_80D8468[]; -static const u8 sUnknown_80D84F8[]; -static const u8 sUnknown_80D8528[]; -static const u8 sUnknown_80D8550[]; -static const u8 sUnknown_80D8584[]; -static const u8 sUnknown_80D85AC[]; -static const u8 sUnknown_80D85E4[]; -static const u8 sUnknown_80D8620[]; -static const u8 sUnknown_80D8644[]; -static const u8 sUnknown_80D8674[]; -static const u8 sUnknown_80D86E4[]; -static const u8 sUnknown_80D8738[]; -static const u8 sUnknown_80D876C[]; -static const u8 sUnknown_80D8798[]; -static const u8 sUnknown_80D87E0[]; -static const u8 sUnknown_80D8818[]; -static const u8 sUnknown_80D883C[]; - -ALIGNED(4) const u8* const gCommonWigglytuff[WIGGLYTUFF_SHOP_MODE_COUNT][WIGGLY_DLG_MAX] = -{ - [WIGGLYTUFF_SHOP_MODE_AWAKE] = { - [WIGGLY_DLG_00] = sUnknown_80D883C, - [WIGGLY_DLG_01] = sUnknown_80D8818, - [WIGGLY_DLG_02] = sUnknown_80D87E0, - [WIGGLY_DLG_03] = sUnknown_80D8798, - [WIGGLY_DLG_04] = sUnknown_80D876C, - [WIGGLY_DLG_05] = sUnknown_80D8738, - [WIGGLY_DLG_06] = sUnknown_80D86E4, - [WIGGLY_DLG_07] = sUnknown_80D8674, - [WIGGLY_DLG_08] = sUnknown_80D8644, - [WIGGLY_DLG_09] = sUnknown_80D8620, - [WIGGLY_DLG_10] = sUnknown_80D85E4, - [WIGGLY_DLG_11] = sUnknown_80D85AC, - [WIGGLY_DLG_12] = sUnknown_80D8584, - [WIGGLY_DLG_13] = sUnknown_80D8550, - [WIGGLY_DLG_14] = sUnknown_80D8528, - [WIGGLY_DLG_15] = sUnknown_80D84F8, - [WIGGLY_DLG_16] = sUnknown_80D8468, - [WIGGLY_DLG_17] = sUnknown_80D8420, - [WIGGLY_DLG_18] = sUnknown_80D8420, - [WIGGLY_DLG_19] = sUnknown_80D8104 - }, - [WIGGLYTUFF_SHOP_MODE_ASLEEP] = { - [WIGGLY_DLG_00] = sUnknown_80D80D4, - [WIGGLY_DLG_01] = sUnknown_80D80B0, - [WIGGLY_DLG_02] = sUnknown_80D8080, - [WIGGLY_DLG_03] = sUnknown_80D8054, - [WIGGLY_DLG_04] = sUnknown_80D8030, - [WIGGLY_DLG_05] = sUnknown_80D8000, - [WIGGLY_DLG_06] = sUnknown_80D7F7C, - [WIGGLY_DLG_07] = sUnknown_80D7F10, - [WIGGLY_DLG_08] = sUnknown_80D7ED0, - [WIGGLY_DLG_09] = sUnknown_80D7E9C, - [WIGGLY_DLG_10] = sUnknown_80D7E58, - [WIGGLY_DLG_11] = sUnknown_80D7E2C, - [WIGGLY_DLG_12] = sUnknown_80D7E04, - [WIGGLY_DLG_13] = sUnknown_80D7DE0, - [WIGGLY_DLG_14] = sUnknown_80D7DA0, - [WIGGLY_DLG_15] = sUnknown_80D7D64, - [WIGGLY_DLG_16] = sUnknown_80D7CE8, - [WIGGLY_DLG_17] = sUnknown_80D7C94, - [WIGGLY_DLG_18] = sUnknown_80D7C94, - [WIGGLY_DLG_19] = sUnknown_80D7A44 - } -}; - -ALIGNED(4) static const u8 sUnknown_80D7A44[] = _( - " Zzz...\n" - "Want more friends?{EXTRA_MSG}" - " Zzz... Kwoo...\n" - "You need Friend Areas for friends...{EXTRA_MSG}" - " Zzz... Zzz...\n" - "A Pokémon becomes your pal when it's in\n" - "the right Friend Area...{EXTRA_MSG}" - " Zzz... Dwee...\n" - "That's why you should get more Friend\n" - "Areas...{EXTRA_MSG}" - " Zzz... Pokémon can only\n" - "live in the right Friend Area for\n" - "their species...{EXTRA_MSG}" - " Kwoo... Sssnore...\n" - "See what Pokémon can live there by\n" - "checking {COLOR YELLOW}Info{RESET}...{EXTRA_MSG}" - " Zzz...\n" - "I don't sell some Friend Areas...{EXTRA_MSG}" - " Kwoo...\n" - "Some rescue missions reward you with\n" - "Friend Areas...{EXTRA_MSG}" - " Zzz... Dwee...\n" - "Check the Pelipper Post Office's Bulletin\n" - "Board or your Mailbox for missions..."); - -ALIGNED(4) static const u8 sUnknown_80D7C94[] = _( - " Sssnore...\n" - "{COLOR GREEN}{FRIEND_AREA}{RESET}...?\n" - "I can't get that Friend Area...{EXTRA_MSG}" - " Zzz... Zzz...\n" - "Sorry..."); - -ALIGNED(4) static const u8 sUnknown_80D7CE8[] = _( - " Zzz... Hunh...?\n" - "{COLOR GREEN}{FRIEND_AREA}{RESET}...?\n" - "I don't know... I'll check...{EXTRA_MSG}" - " Sssnore...\n" - "I'll have it for sale...\n" - "When I find out..."); - -ALIGNED(4) static const u8 sUnknown_80D7D64[] = _( - " Sssnore...\n" - "You can already go...\n" - "Friend Area {COLOR GREEN}{FRIEND_AREA}{RESET}..."); - -ALIGNED(4) static const u8 sUnknown_80D7DA0[] = _( - " Dwee... Kwoo...\n" - "{COLOR CYAN}{POKEMON_0}{RESET}'s Friend Area...\n" - "Zzz... {COLOR GREEN}{FRIEND_AREA}{RESET}..."); - -ALIGNED(4) static const u8 sUnknown_80D7DE0[] = _( - " Another Pokémon...\n" - "Zzz... Check?"); - -ALIGNED(4) static const u8 sUnknown_80D7E04[] = _( - " Zzz... Kwoo...\n" - "Check which Pokémon?"); - -ALIGNED(4) static const u8 sUnknown_80D7E2C[] = _( - " Zzz... Dwee...? Oops?{WAIT_PRESS}\n" - "Not enough money?"); - -ALIGNED(4) static const u8 sUnknown_80D7E58[] = _( - " Zzz... Hunh?{WAIT_PRESS}\n" - "Sssnore... Sorry...\n" - "Fresh out of Friend Areas..."); - -ALIGNED(4) static const u8 sUnknown_80D7E9C[] = _( - " Hunh...?{WAIT_PRESS}\n" - "You don't have any money...\n" - "Zzzzzz..."); - -ALIGNED(4) static const u8 sUnknown_80D7ED0[] = _( - " Zzz... Zzz?{WAIT_PRESS}\n" - "Hunh...?\n" - "You can't add to your Friend Areas..."); - -ALIGNED(4) static const u8 sUnknown_80D7F10[] = _( - " Grats... Zzz...{WAIT_PRESS}\n" - "You can go to {COLOR GREEN}{FRIEND_AREA}{RESET}...{EXTRA_MSG}" - " Dwee... Sssnore...\n" - "Make friends with Pokémon in...\n" - "{COLOR GREEN}{FRIEND_AREA}{RESET}..."); - -ALIGNED(4) static const u8 sUnknown_80D7F7C[] = _( - " Zzz... Dwee... Gotcha...{WAIT_PRESS}\n" - "Zzz... Let's do it...{EXTRA_MSG}" - " Sssnore♪ Sssnore♪\n" - "{POKEMON_6}〜♪ {POKEMON_6}〜♪\n" - "Let's be friends...{EXTRA_MSG}" - " Kwoo!\n" - "Taaaaaaah!"); - -ALIGNED(4) static const u8 sUnknown_80D8000[] = _( - " Kwoo? {COLOR GREEN}{FRIEND_AREA}{RESET}?\n" - "That's {COLOR CYAN}{VALUE_0}{RESET} {POKE}...\n" - "OK?"); - -ALIGNED(4) static const u8 sUnknown_80D8030[] = _( - " Zzz... Wha--?\n" - "More Friend Areas?"); - -ALIGNED(4) static const u8 sUnknown_80D8054[] = _( - " Dwee... Hunh?\n" - "Friend Areas...?\n" - "Which one?"); - -ALIGNED(4) static const u8 sUnknown_80D8080[] = _( - " Thank... Zzz... You...\n" - "Friends, friend..."); - -ALIGNED(4) static const u8 sUnknown_80D80B0[] = _( - " Anything? Kwoo...\n" - "Anything else?"); - -ALIGNED(4) static const u8 sUnknown_80D80D4[] = _( - " Friends... Zzz...\n" - "Welcome to the {POKEMON_6} Club..."); - -ALIGNED(4) static const u8 sUnknown_80D8104[] = _( - " Would you like to get more\n" - "friends...{WAIT_PRESS}\n" - "...More members for your team?{EXTRA_MSG}" - " To add new friends, what\n" - "you need are Friend Areas.{EXTRA_MSG}" - " A Pokémon can join your\n" - "rescue team only after it settles in\n" - "the right Friend Area.{EXTRA_MSG}" - " So, if you want to recruit\n" - "new members, you should add to your\n" - "Friend Areas.{EXTRA_MSG}" - " Oh, yes, Pokémon can\n" - "only live in the right Friend Area for\n" - "their species.{EXTRA_MSG}" - " If you're buying a Friend\n" - "Area, you should confirm what Pokémon\n" - "can live there by checking {COLOR YELLOW}Info{RESET}.{EXTRA_MSG}" - " Also, there are some Friend\n" - "Areas that I don't sell.{EXTRA_MSG}" - " I think there are some\n" - "rescue missions that give you access\n" - "to Friend Areas, too.{EXTRA_MSG}" - " You should check the\n" - "Pelipper Post Office's Bulletin Board or\n" - "your Mailbox for rescue requests.{EXTRA_MSG}" - " You know, it makes me\n" - "delighted when you make new friends!"); - -ALIGNED(4) static const u8 sUnknown_80D8420[] = _( - " {COLOR GREEN}{FRIEND_AREA}{RESET}?\n" - "I can't get that Friend Area for you.{WAIT_PRESS}\n" - "I'm really sorry."); - -ALIGNED(4) static const u8 sUnknown_80D8468[] = _( - " {COLOR GREEN}{FRIEND_AREA}{RESET}?\n" - "I don't know much about it at all.{WAIT_PRESS}\n" - "I'll check up on it.{EXTRA_MSG}" - " I'll add it to the Friend\n" - "Areas you can buy when I find out more."); - -ALIGNED(4) static const u8 sUnknown_80D84F8[] = _( - " You can already go to the\n" - "Friend Area {COLOR GREEN}{FRIEND_AREA}{RESET}."); - -ALIGNED(4) static const u8 sUnknown_80D8528[] = _( - " {COLOR CYAN}{POKEMON_0}{RESET}'s Friend Area\n" - "is {COLOR GREEN}{FRIEND_AREA}{RESET}."); - -ALIGNED(4) static const u8 sUnknown_80D8550[] = _( - " Is there another Pokémon\n" - "you'd like to check?"); - -ALIGNED(4) static const u8 sUnknown_80D8584[] = _( - " Which Pokémon would you\n" - "like to check?"); - -ALIGNED(4) static const u8 sUnknown_80D85AC[] = _( - " Oops?{WAIT_PRESS}\n" - "It doesn't look like you have enough\n" - "money!"); - -ALIGNED(4) static const u8 sUnknown_80D85E4[] = _( - " Oops?{WAIT_PRESS}\n" - "Oh, too bad.{WAIT_PRESS}\n" - "I'm fresh out of Friend Areas."); - -ALIGNED(4) static const u8 sUnknown_80D8620[] = _( - " Um?{WAIT_PRESS}\n" - "You don't have any money."); - -ALIGNED(4) static const u8 sUnknown_80D8644[] = _( - " Oops!{WAIT_PRESS}\n" - "You can't add to your Friend Areas."); - -ALIGNED(4) static const u8 sUnknown_80D8674[] = _( - " Congratulations!{WAIT_PRESS}\n" - "You can go to {COLOR GREEN}{FRIEND_AREA}{RESET} now!{EXTRA_MSG}" - " You can recruit\n" - "Pokémon that live in the Friend Area\n" - "{COLOR GREEN}{FRIEND_AREA}{RESET}."); - -ALIGNED(4) static const u8 sUnknown_80D86E4[] = _( - " Gotcha! Let's do it!{WAIT_PRESS}\n" - "{POKEMON_6}〜♪ {POKEMON_6}〜♪{WAIT_PRESS}\n" - "Let's be friends... Yoomtaaaaaaah!"); - -ALIGNED(4) static const u8 sUnknown_80D8738[] = _( - " {COLOR GREEN}{FRIEND_AREA}{RESET}?\n" - "That will be {COLOR CYAN}{VALUE_0}{RESET} {POKE}.\n" - "Is that OK?"); - -ALIGNED(4) static const u8 sUnknown_80D876C[] = _( - " Would you like to add\n" - "other Friend Areas?"); - -ALIGNED(4) static const u8 sUnknown_80D8798[] = _( - " You'd like to add to your\n" - "Friend Areas?\n" - "Which one would you like?"); - -ALIGNED(4) static const u8 sUnknown_80D87E0[] = _( - " Thank you! Come again!\n" - "We're all friends, friend!"); - -ALIGNED(4) static const u8 sUnknown_80D8818[] = _( - " Anything else I can do for\n" - "you?"); - -ALIGNED(4) static const u8 sUnknown_80D883C[] = _( - " Friends are my treasures!\n" - "Welcome to the {POKEMON_6} Club--\n" - "a circle of friends! "); \ No newline at end of file diff --git a/src/data/debug_menu1.h b/src/data/debug_menu1.h index 0a353c684..5dde96b47 100644 --- a/src/data/debug_menu1.h +++ b/src/data/debug_menu1.h @@ -1,7 +1,4 @@ -ALIGNED(4) static const u8 sFill[] = _("pksdir0"); - -static const UnkTextStruct2 sUnknown_80E7D40 = -{ +static const UnkTextStruct2 sUnknown_80E7D40 = { 0, 0, 0, 0, 3, 0, 0, @@ -9,8 +6,7 @@ static const UnkTextStruct2 sUnknown_80E7D40 = 0, 0, NULL }; -static const UnkTextStruct2 sUnknown_80E7D58 = -{ +static const UnkTextStruct2 sUnknown_80E7D58 = { 0, 0, 0, 0, 3, 2, 2, @@ -19,22 +15,13 @@ static const UnkTextStruct2 sUnknown_80E7D58 = NULL }; -static const MenuItem sDebugMenuItems[8] = -{ - {"Dungeons", MENU_DEBUG_MENU_DUNGEONS}, - {"Field", MENU_DEBUG_MENU_FIELD}, - {"Field Map", MENU_DEBUG_MENU_FIELD_MAP}, - {"Field Script", MENU_DEBUG_MENU_FIELD_SCRIPT}, - {"Debug Menu", MENU_DEBUG_MENU_DEBUG_MENU}, - {"Storage", MENU_DEBUG_MENU_STORAGE}, - {"h-open", MENU_DEBUG_MENU_H_OPEN}, +static const MenuItem sDebugMenuItems[] = { + {_("Dungeons"), MENU_DEBUG_MENU_DUNGEONS}, + {_("Field"), MENU_DEBUG_MENU_FIELD}, + {_("Field Map"), MENU_DEBUG_MENU_FIELD_MAP}, + {_("Field Script"), MENU_DEBUG_MENU_FIELD_SCRIPT}, + {_("Debug Menu"), MENU_DEBUG_MENU_DEBUG_MENU}, + {_("Storage"), MENU_DEBUG_MENU_STORAGE}, + {_("h-open"), MENU_DEBUG_MENU_H_OPEN}, {NULL, 10}, -}; - -// TODO: These belong to files after, which have no data. More stripped-out debug menus..? They'd be between debug_menu1.c and debug_menu2.c -ALIGNED(4) static const u8 sFill1[] = _("pksdir0"); -ALIGNED(4) static const u8 sFill2[] = _("pksdir0"); -ALIGNED(4) static const u8 sFill3[] = _("pksdir0"); -ALIGNED(4) static const u8 sFill4[] = _("pksdir0"); -ALIGNED(4) static const u8 sFill5[] = _("pksdir0"); -ALIGNED(4) static const u8 sFill6[] = _("pksdir0"); \ No newline at end of file +}; \ No newline at end of file diff --git a/src/data/friend_rescue_menus.h b/src/data/friend_rescue_menus.h index 4ec4366f1..250e0f916 100644 --- a/src/data/friend_rescue_menus.h +++ b/src/data/friend_rescue_menus.h @@ -1,150 +1,107 @@ -extern const u8 GoRescue_80E20AC[]; -extern const u8 GetHelp_80E20A0[]; -extern const u8 Info_80E2098[]; -extern const u8 Exit_80E2090[]; - -const MenuItem gUnknown_80E2068[5] = { - {GoRescue_80E20AC, 0x0}, - {GetHelp_80E20A0, 0x1}, - {Info_80E2098, 0x17}, - {Exit_80E2090, 0x8}, - {NULL, 0x8}, +const MenuItem gUnknown_80E2068[] = { + {_("Go Rescue"), 0}, + {_("Get Help"), 1}, + {_("Info"), 23}, + {_("Exit"), 8}, + {NULL, 8}, }; -const u8 Exit_80E2090[] = "Exit"; -const u8 Info_80E2098[] = "Info"; -const u8 GetHelp_80E20A0[] = "Get Help"; -const u8 GoRescue_80E20AC[] = "Go Rescue"; - -const MenuItem gUnknown_80E20B8[5] = { - {GoRescue_80E20AC, 0x0}, - {GetHelp_80E20A0, -1}, - {Info_80E2098, 0x17}, - {Exit_80E2090, 0x8}, - {NULL, 0x8}, +const MenuItem gUnknown_80E20B8[] = { + {_("Go Rescue"), 0}, + {_("Get Help"), -1}, + {_("Info"), 23}, + {_("Exit"), 8}, + {NULL, 8}, }; -const MenuItem gUnknown_80E20E0[5] = { - {GoRescue_80E20AC, -1}, - {GetHelp_80E20A0, 1}, - {Info_80E2098, 0x17}, - {Exit_80E2090, 0x8}, - {NULL, 0x8}, +const MenuItem gUnknown_80E20E0[] = { + {_("Go Rescue"), -1}, + {_("Get Help"), 1}, + {_("Info"), 23}, + {_("Exit"), 8}, + {NULL, 8}, }; -const MenuItem gUnknown_80E2108[5] = { - {GoRescue_80E20AC, -1}, - {GetHelp_80E20A0, -1}, - {Info_80E2098, 0x17}, - {Exit_80E2090, 0x8}, - {NULL, 0x8}, +const MenuItem gUnknown_80E2108[] = { + {_("Go Rescue"), -1}, + {_("Get Help"), -1}, + {_("Info"), 23}, + {_("Exit"), 8}, + {NULL, 8}, }; -extern const u8 ReceiveSOSMail_80E217C[]; -extern const u8 SendAOKMail_80E216C[]; -extern const u8 GetThankYouMail_80E2158[]; - -const MenuItem gUnknown_80E2130[5] = { - {ReceiveSOSMail_80E217C, 3}, - {SendAOKMail_80E216C, 4}, - {GetThankYouMail_80E2158, 0x14}, - {Exit_80E2090, 0x8}, - {NULL, 0x8}, +const MenuItem gUnknown_80E2130[] = { + {_("Receive SOS Mail"), 3}, + {_("Send A-OK Mail"), 4}, + {_("Get Thank-You Mail"), 20}, + {_("Exit"), 8}, + {NULL, 8}, }; -const u8 GetThankYouMail_80E2158[] = "Get Thank-You Mail"; -const u8 SendAOKMail_80E216C[] = "Send A-OK Mail"; -const u8 ReceiveSOSMail_80E217C[] = "Receive SOS Mail"; - -const MenuItem gUnknown_80E2190[5] = { - {ReceiveSOSMail_80E217C, 3}, - {SendAOKMail_80E216C, -1}, - {GetThankYouMail_80E2158, 0x14}, - {Exit_80E2090, 0x8}, - {NULL, 0x8}, +const MenuItem gUnknown_80E2190[] = { + {_("Receive SOS Mail"), 3}, + {_("Send A-OK Mail"), -1}, + {_("Get Thank-You Mail"), 20}, + {_("Exit"), 8}, + {NULL, 8}, }; -extern const u8 SendSOS_80E2208[]; -extern const u8 ReceiveAOK_80E21F4[]; -extern const u8 SendThankYou_80E21E0[]; - - -const MenuItem gUnknown_80E21B8[5] = { - {SendSOS_80E2208, 0x11}, - {ReceiveAOK_80E21F4, 0x12}, - {SendThankYou_80E21E0, 0x13}, - {Exit_80E2090, 0x8}, - {NULL, 0x8}, +const MenuItem gUnknown_80E21B8[] = { + {_("Send SOS Mail"), 17}, + {_("Receive A-OK Mail"), 18}, + {_("Send Thank-You Mail"), 19}, + {_("Exit"), 8}, + {NULL, 8}, }; -const u8 SendThankYou_80E21E0[] = "Send Thank-You Mail"; -const u8 ReceiveAOK_80E21F4[] = "Receive A-OK Mail"; -const u8 SendSOS_80E2208[] = "Send SOS Mail"; - -const MenuItem gUnknown_80E2218[5] = { - {SendSOS_80E2208, -1}, - {ReceiveAOK_80E21F4, -1}, - {SendThankYou_80E21E0, 0x13}, - {Exit_80E2090, 0x8}, - {NULL, 0x8}, +const MenuItem gUnknown_80E2218[] = { + {_("Send SOS Mail"), -1}, + {_("Receive A-OK Mail"), -1}, + {_("Send Thank-You Mail"), 19}, + {_("Exit"), 8}, + {NULL, 8}, }; -const MenuItem gUnknown_80E2240[5] = { - {SendSOS_80E2208, 0x11}, - {ReceiveAOK_80E21F4, 0x12}, - {SendThankYou_80E21E0, -1}, - {Exit_80E2090, 0x8}, - {NULL, 0x8}, +const MenuItem gUnknown_80E2240[] = { + {_("Send SOS Mail"), 17}, + {_("Receive A-OK Mail"), 18}, + {_("Send Thank-You Mail"), -1}, + {_("Exit"), 8}, + {NULL, 8}, }; -const MenuItem gUnknown_80E2268[5] = { - {SendSOS_80E2208, -1}, - {ReceiveAOK_80E21F4, -1}, - {SendThankYou_80E21E0, -1}, - {Exit_80E2090, 0x8}, - {NULL, 0x8}, +const MenuItem gUnknown_80E2268[] = { + {_("Send SOS Mail"), -1}, + {_("Receive A-OK Mail"), -1}, + {_("Send Thank-You Mail"), -1}, + {_("Exit"), 8}, + {NULL, 8}, }; -extern const u8 Yes_80E22B0[]; -extern const u8 Cancel_80E22A8[]; - - -const MenuItem gUnknown_80E2290[3] = { - {Yes_80E22B0, 6}, - {Cancel_80E22A8, 0x8}, - {NULL, 0x8}, +const MenuItem gUnknown_80E2290[] = { + {_("Yes"), 6}, + {_("Cancel"), 8}, + {NULL, 8}, }; -const u8 Cancel_80E22A8[] = "Cancel"; -const u8 Yes_80E22B0[] = "Yes"; - - -extern const u8 No_80E22CC[]; - -const MenuItem gUnknown_80E22B4[3] = { - {Yes_80E22B0, 6}, - {No_80E22CC, 7}, - {NULL, 0x8}, +const MenuItem gUnknown_80E22B4[] = { + {_("Yes"), 6}, + {_("No"), 7}, + {NULL, 8}, }; -const u8 No_80E22CC[] = "No"; - -const MenuItem gUnknown_80E22D0[4] = { - {Yes_80E22B0, 6}, - {No_80E22CC, 7}, - {Cancel_80E22A8, 8}, - {NULL, 0x8}, +const MenuItem gUnknown_80E22D0[] = { + {_("Yes"), 6}, + {_("No"), 7}, + {_("Cancel"), 8}, + {NULL, 8}, }; -extern const u8 SendPokemon_80E2308[]; - -const MenuItem gUnknown_80E22F0[3] = { - {SendPokemon_80E2308, 0x10}, - {Cancel_80E22A8, 8}, - {NULL, 0x8}, +const MenuItem gUnknown_80E22F0[] = { + {_("Send w/o Pokémon"), 16}, + {_("Cancel"), 8}, + {NULL, 8}, }; -const u8 SendPokemon_80E2308[] = _("Send w/o Pokémon"); - const UnkTextStruct2 gUnknown_80E231C = { 0x00, 0x00, 0x00, 0x00, @@ -165,42 +122,26 @@ const UnkTextStruct2 gUnknown_80E2334 = NULL }; -extern const u8 Confirm_80E2364[]; - -const MenuItem gUnknown_80E234C[3] = { - {Confirm_80E2364, 9}, - {Info_80E2098, 10}, - {NULL, 0x8}, +const MenuItem gUnknown_80E234C[] = { + {_("Confirm"), 9}, + {_("Info"), 10}, + {NULL, 8}, }; -const u8 Confirm_80E2364[] = "Confirm"; - -extern const u8 GameLinkCable_80E2398[]; -extern const u8 Password_80E238C[]; - -const MenuItem gUnknown_80E236C[4] = { - {GameLinkCable_80E2398, 0xB}, - {Password_80E238C, 0xD}, - {Cancel_80E22A8, 8}, - {NULL, 0x8}, +const MenuItem gUnknown_80E236C[] = { + {_("Game Link cable"), 11}, + {_("Password"), 13}, + {_("Cancel"), 8}, + {NULL, 8}, }; -const u8 Password_80E238C[] = "Password"; -const u8 GameLinkCable_80E2398[] = "Game Link cable"; - -extern const u8 SendPokemon_80E23E0[]; -extern const u8 DontSendPokemon_80E23C8[]; - -const MenuItem gUnknown_80E23A8[4] = { - {SendPokemon_80E23E0, 0xF}, - {DontSendPokemon_80E23C8, 0x10}, - {Cancel_80E22A8, 8}, - {NULL, 0x8}, +const MenuItem gUnknown_80E23A8[] = { + {_("Send Pokémon"), 15}, + {_("Don't Send Pokémon"), 16}, + {_("Cancel"), 8}, + {NULL, 8}, }; -ALIGNED(4) const u8 DontSendPokemon_80E23C8[] = _("Don't Send Pokémon"); -ALIGNED(4) const u8 SendPokemon_80E23E0[] = _("Send Pokémon"); - const UnkTextStruct2 gUnknown_80E23F0 = { 0x00, 0x00, 0x00, 0x00, @@ -211,14 +152,14 @@ const UnkTextStruct2 gUnknown_80E23F0 = NULL }; -const MenuItem gUnknown_80E2408[4] = { - {Confirm_80E2364, 0x9}, - {Info_80E2098, 0xA}, - {Cancel_80E22A8, 5}, - {NULL, 0x8}, +const MenuItem gUnknown_80E2408[] = { + {_("Confirm"), 9}, + {_("Info"), 10}, + {_("Cancel"), 5}, + {NULL, 8}, }; -UNUSED static const UnkTextStruct2 unused_text = +UNUSED static const UnkTextStruct2 sUnused = { 0x00, 0x00, 0x00, 0x00, 0x03, @@ -228,89 +169,61 @@ UNUSED static const UnkTextStruct2 unused_text = NULL }; -const MenuItem gUnknown_80E2440[3] = { - {Yes_80E22B0, 6}, - {Cancel_80E22A8, 0x8}, - {NULL, 0x8}, +const MenuItem gUnknown_80E2440[] = { + {_("Yes"), 6}, + {_("Cancel"), 8}, + {NULL, 8}, }; -const MenuItem gUnknown_80E2458[3] = { - {Yes_80E22B0, 6}, - {No_80E22CC, 0x7}, - {NULL, 0x8}, +const MenuItem gUnknown_80E2458[] = { + {_("Yes"), 6}, + {_("No"), 7}, + {NULL, 8}, }; -extern const u8 SendItem_80E24A4[]; -extern const u8 DontSendItem_80E2490[]; - -const MenuItem gUnknown_80E2470[4] = { - {SendItem_80E24A4, 0x15}, - {DontSendItem_80E2490, 0x16}, - {Cancel_80E22A8, 8}, - {NULL, 0x8}, +const MenuItem gUnknown_80E2470[] = { + {_("Send Item"), 21}, + {_("Don't Send Item"), 22}, + {_("Cancel"), 8}, + {NULL, 8}, }; -const u8 DontSendItem_80E2490[] = _("Don't Send Item"); -const u8 SendItem_80E24A4[] = "Send Item"; - -extern const u8 SendwoItem_80E24C8[]; - -const MenuItem gUnknown_80E24B0[3] = { - {SendwoItem_80E24C8, 0x16}, - {Cancel_80E22A8, 8}, - {NULL, 0x8}, +const MenuItem gUnknown_80E24B0[] = { + {_("Send w/o Item"), 22}, + {_("Cancel"), 8}, + {NULL, 8}, }; -const u8 SendwoItem_80E24C8[] = "Send w/o Item"; - -const MenuItem gUnknown_80E24D8[4] = { - {Yes_80E22B0, 6}, - {No_80E22CC, 0x7}, - {Cancel_80E22A8, 0x8}, - {NULL, 0x8}, +const MenuItem gUnknown_80E24D8[] = { + {_("Yes"), 6}, + {_("No"), 7}, + {_("Cancel"), 8}, + {NULL, 8}, }; -extern const u8 RescueInfo_80E2540[]; -extern const u8 GoRescue_80E530[]; -extern const u8 GetHelp_80E2520[]; - -const MenuItem gUnknown_80E24F8[5] = { - {RescueInfo_80E2540, 0x1A}, - {GoRescue_80E530, 0x1B}, - {GetHelp_80E2520, 0x1C}, - {Cancel_80E22A8, 0x19}, - {NULL, 0x19}, +const MenuItem gUnknown_80E24F8[] = { + {_("Friend Rescue Info"), 26}, + {_("{COLOR YELLOW}Go rescue{RESET} "), 27}, + {_("{COLOR YELLOW}Get help{RESET} "), 28}, + {_("Cancel"), 25}, + {NULL, 25}, }; -ALIGNED(4) const u8 GetHelp_80E2520[] = _("{COLOR YELLOW}Get help{RESET} "); -ALIGNED(4) const u8 GoRescue_80E530[] = _("{COLOR YELLOW}Go rescue{RESET} "); -const u8 RescueInfo_80E2540[] = "Friend Rescue Info"; - -extern const u8 RescueProcedures_80E25A0[]; -extern const u8 LeaveForRescue_80E258C[]; - -const MenuItem gUnknown_80E2554[7] = { - {RescueProcedures_80E25A0, 0x1E}, - {ReceiveSOSMail_80E217C, 0x1F}, - {LeaveForRescue_80E258C, 0x20}, - {SendAOKMail_80E216C, 0x21}, - {GetThankYouMail_80E2158, 0x22}, - {Exit_80E2090, 0x19}, - {NULL, 0x19}, +const MenuItem gUnknown_80E2554[] = { + {_("Rescue Procedures"), 30}, + {_("Receive SOS Mail"), 31}, + {_("Leave for Rescue"), 32}, + {_("Send A-OK Mail"), 33}, + {_("Get Thank-You Mail"), 34}, + {_("Exit"), 25}, + {NULL, 25}, }; -const u8 LeaveForRescue_80E258C[] = "Leave for Rescue"; -const u8 RescueProcedures_80E25A0[] = "Rescue Procedures"; - -extern const u8 GettingHelp_80E25E4[]; - -const MenuItem gUnknown_80E25B4[6] = { - {GettingHelp_80E25E4, 0x23}, - {SendSOS_80E2208, 0x24}, - {ReceiveAOK_80E21F4, 0x25}, - {SendThankYou_80E21E0, 0x26}, - {Exit_80E2090, 0x19}, - {NULL, 0x19}, -}; - -const u8 GettingHelp_80E25E4[] = "Getting Help"; +const MenuItem gUnknown_80E25B4[] = { + {_("Getting Help"), 35}, + {_("Send SOS Mail"), 36}, + {_("Receive A-OK Mail"), 37}, + {_("Send Thank-You Mail"), 38}, + {_("Exit"), 25}, + {NULL, 25}, +}; \ No newline at end of file diff --git a/src/data/ground_main.h b/src/data/ground_main.h index 65e4fe50c..13aea2fdc 100644 --- a/src/data/ground_main.h +++ b/src/data/ground_main.h @@ -3,5 +3,5 @@ ALIGNED(4) static const u8 sFmtRescueRequest[] = "GroundMain recue request %3d % ALIGNED(4) static const u8 sFmtUserRescueRequest[] = "GroundMain user rescue request %3d"; ALIGNED(4) static const u8 sFmtGameEndRequest[] = "GroundMain game end request %3d"; ALIGNED(4) static const u8 sFmtGameCancelRequest[] = "GroundMain game cancel request %3d"; -UNUSED static const u8 sFill1[] = "pksdir0"; -UNUSED static const u8 sFill2[] = "pksdir0"; \ No newline at end of file +UNUSED static const u8 sFill1[] = _("pksdir0"); +UNUSED static const u8 sFill2[] = _("pksdir0"); \ No newline at end of file diff --git a/src/data/locale/felicity_bank_usa.h b/src/data/locale/felicity_bank_usa.h new file mode 100644 index 000000000..f8fd19389 --- /dev/null +++ b/src/data/locale/felicity_bank_usa.h @@ -0,0 +1,157 @@ +#define FEL_AWAKE_WELCOME (_( \ + " Welcome.\n" \ + "This is Felicity Bank.")) + +#define FEL_AWAKE_HOW_MAY_I_SERVE__NO_MONEY (_(" How may I serve you?")) + +#define FEL_AWAKE_HOW_MAY_I_SERVE__HAS_MONEY (_( \ + " Your account contains\n" \ + "{COLOR CYAN}{VALUE_0}{RESET} {POKE}.\n" \ + "How may I serve you?")) + +#define FEL_AWAKE_VERY_WELL (_(" Very well.")) + +#define FEL_AWAKE_BYE__NO_MONEY (_(" I await your next visit.")) + +#define FEL_AWAKE_BYE__HAS_MONEY (_(" I await your next visit.")) + +#define FEL_AWAKE_DEPOSIT__HOW_MUCH (_( \ + " How much do you wish to\n" \ + "deposit?")) + +#define FEL_AWAKE_DEPOSIT__NO_MONEY (_( \ + " Oh?{WAIT_PRESS} I'm so sorry to say,\n" \ + "but you appear not to have any money.")) + +#define FEL_AWAKE_DEPOSIT__BANK_FULL (_( \ + " Meow! All this money!{WAIT_PRESS}\n" \ + "Our safe is about to burst!{EXTRA_MSG}" \ + " I am so sorry to say, but\n" \ + "I can't accept any more of your money!")) + +#define FEL_AWAKE_DEPOSIT__RECEIPT (_( \ + " {COLOR CYAN}{VALUE_0}{RESET} {POKE}. Very well.{WAIT_PRESS}\n" \ + "I will guard it jealously.")) + +#define FEL_AWAKE_WITHDRAW__HOW_MUCH (_( \ + " How much will you\n" \ + "withdraw?")) + +#define FEL_AWAKE_WITHDRAW__NO_MONEY (_( \ + " Oh?{WAIT_PRESS} I so hate to disappoint,\n" \ + "but you have no money saved with me.")) + +#define FEL_AWAKE_WITHDRAW__WALLET_FULL (_( \ + " Oh?{WAIT_PRESS} I do so apologize,\n" \ + "but you couldn't possibly carry any more\n" \ + "money with you.")) + +#define FEL_AWAKE_WITHDRAW__RECEIPT (_( \ + " Very well, {COLOR CYAN}{VALUE_0}{RESET} {POKE}.\n" \ + "Here you are.")) + +#define FEL_AWAKE_HOW_IT_WORKS (_( \ + " Ah, you wish to know how\n" \ + "the bank operates. Very well.{EXTRA_MSG}" \ + " If you are defeated\n" \ + "in a dungeon, you'll lose all your money.\n" \ + "Did you know that?{EXTRA_MSG}" \ + " But you can avoid that!{WAIT_PRESS}\n" \ + "You've nothing to fear if you leave your\n" \ + "money with Felicity Bank.{EXTRA_MSG}" \ + " Even if you return\n" \ + "defeated from a dungeon, your money will\n" \ + "be safe with me!{EXTRA_MSG}" \ + " I assure you, my bank\n" \ + "will keep your money safe.{EXTRA_MSG}" \ + " Simple, isn't it?")) + + + +#define FEL_ASLEEP_WELCOME (_( \ + " Ssssnore... Welcome...\n" \ + "This is Felicity Bank...")) + +#define FEL_ASLEEP_HOW_MAY_I_SERVE__NO_MONEY (_( \ + " Zzz...\n" \ + "How may I serve you?")) + +#define FEL_ASLEEP_HOW_MAY_I_SERVE__HAS_MONEY (_( \ + " Sssnore... Purr...\n" \ + "Your account contains {COLOR CYAN}{VALUE_0}{RESET} {POKE}...\n" \ + "How may I serve you?")) + +#define FEL_ASLEEP_VERY_WELL (_( \ + " Sssnore...\n" \ + "Very well...")) + +#define FEL_ASLEEP_BYE__NO_MONEY (_( \ + " Zzz... Purr...\n" \ + "I await your next visit...")) + +#define FEL_ASLEP_BYE__HAS_MONEY (_( \ + " Zzz... Meow...\n" \ + "I await your next visit...")) + +#define FEL_ASLEEP_DEPOSIT__HOW_MUCH (_( \ + " Purr...\n" \ + "How much do you wish to deposit?")) + +#define FEL_ASLEEP_DEPOSIT__NO_MONEY (_( \ + " Sssnore... Hmm?{EXTRA_MSG}" \ + " Zzz...\n" \ + "I'm so sorry to say, but you appear not\n" \ + "to have any money...")) + +#define FEL_ASLEEP_DEPOSIT__BANK_FULL (_( \ + " Fnarf? Purr...\n" \ + "Meow! All this money...{WAIT_PRESS}\n" \ + "Our safe is about to burst...{EXTRA_MSG}" \ + " Purr...\n" \ + "I am so sorry to say, but I can't accept\n" \ + "any more of your money...")) + +#define FEL_ASLEEP_DEPOSIT__RECEIPT (_( \ + " Zzz...\n" \ + "{COLOR CYAN}{VALUE_0}{RESET} {POKE}... Very well...{WAIT_PRESS}\n" \ + "I will guard it jealously...")) + +#define FEL_ASLEEP_WITHDRAW__HOW_MUCH (_( \ + " Zzz...\n" \ + "How much will you withdraw?")) + +#define FEL_ASLEEP_WITHDRAW__NO_MONEY (_( \ + " Fnarf? Meow...?{EXTRA_MSG}" \ + " Purr...\n" \ + "I so hate to disappoint, but you have no\n" \ + "money saved with me...")) + +#define FEL_ASLEEP_WITHDRAW__WALLET_FULL (_( \ + " Fnarf? Hunh...?{EXTRA_MSG}" \ + " Purr... I so do apologize,\n" \ + "but you couldn't possibly carry any more\n" \ + "money with you...")) + +#define FEL_ASLEEP_WITHDRAW__RECEIPT (_( \ + " {POKE}... Purr...\n" \ + "Very well, {COLOR CYAN}{VALUE_0}{RESET} {POKE}.\n" \ + "Here you are.")) + +#define FEL_ASLEEP_HOW_IT_WORKS (_( \ + " Sssnore...\n" \ + "Ah, you wish to know how the bank\n" \ + "operates... Very well...{EXTRA_MSG}" \ + " Zzz...\n" \ + "If you're defeated in a dungeon,\n" \ + "you'll lose all your money. Did you know?{EXTRA_MSG}" \ + " Purr...\n" \ + "But, you've nothing to fear if you leave\n" \ + "your money with Felicity Bank...{EXTRA_MSG}" \ + " Meow... Even if you\n" \ + "return defeated from a dungeon, your\n" \ + "money will be safe with me...{EXTRA_MSG}" \ + " Sssnore...\n" \ + "I assure you, my bank will keep your\n" \ + "money safe...{EXTRA_MSG}" \ + " Zzz...\n" \ + "Simple, isn't it...?")) diff --git a/src/data/locale/gulpin_shop_usa.h b/src/data/locale/gulpin_shop_usa.h new file mode 100644 index 000000000..1d93753ce --- /dev/null +++ b/src/data/locale/gulpin_shop_usa.h @@ -0,0 +1,352 @@ + + +#define GULP_AWAKE_DLG_00 (_( \ + " Hello!\n" \ + "Welcome to the Gulpin Link Shop!\n" \ + "Link moves all you like for just 150 {POKE}!")) + +#define GULP_AWAKE_DLG_01 (_( \ + " Welcome to the Gulpin\n" \ + "Link Shop!\n" \ + "Link moves all you like for just 150 {POKE}!")) + +#define GULP_AWAKE_DLG_02 (_( \ + " Uh... Hello?\n" \ + "You don't have enough money?")) + +#define GULP_AWAKE_DLG_03 (_( \ + " Too bad.\n" \ + "There are no moves that can be linked.")) + +#define GULP_AWAKE_DLG_04 (_( \ + " That move isn't linked,\n" \ + "so it can't be delinked.")) + +#define GULP_AWAKE_DLG_05 (_( \ + " If you forget that move,\n" \ + "you won't have any moves at all.")) + +#define GULP_AWAKE_DLG_06 (_(" Shall we go on?")) + +#define GULP_AWAKE_DLG_07 (_( \ + " Whenever you get the urge\n" \ + "to link moves, please come see me!")) + +#define GULP_AWAKE_DLG_08 (_( \ + " Good!\n" \ + "Now, who wants to link moves?")) + +#define GULP_AWAKE_DLG_09 (_( \ + " Which move would you like\n" \ + "to recall?")) + +#define GULP_AWAKE_DLG_10 (_( \ + " So, the move {COLOR CYAN}{POKEMON_0}{RESET}\n" \ + "is the one to be remembered?{WAIT_PRESS}\n" \ + "OK, here goes!{EXTRA_MSG}" \ + " Gggggggggggg...{WAIT_PRESS} Gulpin!{EXTRA_MSG}" \ + " There!\n" \ + "Success!{EXTRA_MSG}" \ + " {COLOR CYAN_M}{POKEMON_5}{RESET} has\n" \ + "remembered the move {COLOR CYAN}{POKEMON_0}{RESET}!")) + +#define GULP_AWAKE_DLG_11 (_( \ + " So, forget the move\n" \ + "{COLOR GREEN}{POKEMON_1}{RESET} and remember the move\n" \ + "{COLOR CYAN}{POKEMON_0}{RESET}?")) + +#define GULP_AWAKE_DLG_12 (_( \ + " So, forget {COLOR GREEN}{POKEMON_1}{RESET}\n" \ + "and any moves linked to it, and remember\n" \ + "the move {COLOR CYAN}{POKEMON_0}{RESET}?")) + +#define GULP_AWAKE_DLG_13 (_( \ + " OK, here goes!{EXTRA_MSG}" \ + " Gggggggg...{WAIT_PRESS} Pwah! Gulpin!{EXTRA_MSG}" \ + " There!\n" \ + "Success!{EXTRA_MSG}" \ + " {COLOR CYAN_M}{POKEMON_5}{RESET} has forgotten\n" \ + "the move {COLOR GREEN}{POKEMON_1}{RESET} and remembered\n" \ + "the move {COLOR CYAN}{POKEMON_0}{RESET}!")) + +#define GULP_AWAKE_DLG_14 (_( \ + " OK, here goes!{EXTRA_MSG}" \ + " Gggggggg...{WAIT_PRESS} Pwah! Gulpin!{EXTRA_MSG}" \ + " There!\n" \ + "Success!{EXTRA_MSG}" \ + " {COLOR CYAN_M}{POKEMON_5}{RESET} is done!{EXTRA_MSG}" \ + " It's forgotten the move\n" \ + "{COLOR GREEN}{POKEMON_1}{RESET} and any moves linked to it,\n" \ + "and {COLOR CYAN}{POKEMON_0}{RESET} has been remembered!")) + +#define GULP_AWAKE_DLG_15 (_( \ + " Uh... Hello?{WAIT_PRESS}\n" \ + "There don't appear to be any moves that\n" \ + "can be remembered.")) + +#define GULP_AWAKE_DLG_16 (_( \ + " Uh... Huh?{WAIT_PRESS}\n" \ + "You appear to be a special Pokémon.{EXTRA_MSG}" \ + " I can't help you remember\n" \ + "any moves, I don't think.\n" \ + "I'm sorry.")) + +#define GULP_AWAKE_DLG_17 (_( \ + " So, forget the move\n" \ + "{COLOR GREEN}{POKEMON_1}{RESET}?")) + +#define GULP_AWAKE_DLG_18 (_( \ + " So, forget the move\n" \ + "{COLOR GREEN}{POKEMON_1}{RESET} and any moves linked to it?")) + +#define GULP_AWAKE_DLG_19 (_( \ + " OK, here goes!{EXTRA_MSG}" \ + " Gggggggg...{WAIT_PRESS} Poof!{EXTRA_MSG}" \ + " There!\n" \ + "Success!{EXTRA_MSG}" \ + " {COLOR CYAN}{POKEMON_5}{RESET} has forgotten\n" \ + "the move {COLOR GREEN}{POKEMON_1}{RESET}!")) + +#define GULP_AWAKE_DLG_20 (_( \ + " OK, here goes!{EXTRA_MSG}" \ + " Gggggggg...{WAIT_PRESS} Poof!{EXTRA_MSG}" \ + " There!\n" \ + "Success!{EXTRA_MSG}" \ + " {COLOR CYAN}{POKEMON_5}{RESET} has forgotten\n" \ + "the move {COLOR GREEN}{POKEMON_1}{RESET} and any moves\n" \ + "linked to it!")) + +#define GULP_AWAKE_DLG_21 (_( \ + " Sure thing!\n" \ + "What do you need information on?")) + +#define GULP_AWAKE_DLG_22 (_( \ + " When you're in a dungeon\n" \ + "and you're about to use a move...{WAIT_PRESS}\n" \ + "Isn't it a pain to open a window each time?{EXTRA_MSG}" \ + " You can avoid that!{WAIT_PRESS}\n" \ + "You can just conveniently “Set”\n" \ + "a move for instant use!{EXTRA_MSG}" \ + " A set move can be instantly\n" \ + "used with {L_BUTTON} and {A_BUTTON}!{WAIT_PRESS}\n" \ + "See? Isn't it easy?{EXTRA_MSG}" \ + " Just set the move...{WAIT_PRESS}\n" \ + "Hold {L_BUTTON} and then press {A_BUTTON} to use it!{WAIT_PRESS}\n" \ + "It's very convenient!{EXTRA_MSG}" \ + " You can also switch the set\n" \ + "move in a dungeon.\n" \ + "Do try it out!\n")) + +#define GULP_AWAKE_DLG_23 (_( \ + " When moves are linked...{WAIT_PRESS}\n" \ + "Two or more moves can be used one after\n" \ + "another in one turn!{EXTRA_MSG}" \ + " For example, if the moves\n" \ + "{COLOR CYAN}Scratch{RESET} and {COLOR CYAN}Growl{RESET} are\n" \ + "linked...{EXTRA_MSG}" \ + " Both {COLOR CYAN}Scratch{RESET} and {COLOR CYAN}Growl{RESET} are\n" \ + "used in one turn!{WAIT_PRESS}\n" \ + "See? Amazing, huh?{EXTRA_MSG}" \ + " Using links, heheh...{WAIT_PRESS}\n" \ + "Well, depending on the moves you link,\n" \ + "you can get incredible results!{EXTRA_MSG}" \ + " Oh, yes.\n" \ + "When moves are linked, they are used in\n" \ + "sequence from the top one first.{EXTRA_MSG}" \ + " You can also separate linked\n" \ + "moves by selecting the Delink command.{EXTRA_MSG}" \ + " The sequence of moves can\n" \ + "be changed by pressing {R_BUTTON},\n" \ + "then pressing up or down on {DPAD}.{EXTRA_MSG}" \ + " Try to innovate with links.{WAIT_PRESS}\n" \ + "Try creating links of your very own!")) + +#define GULP_AWAKE_DLG_24 (_( \ + " What if you had to forget\n" \ + "a move, but you wanted it back?{WAIT_PRESS}\n" \ + "Ever face that situation?{EXTRA_MSG}" \ + " I can help!{WAIT_PRESS}\n" \ + "Come to me, and I can make you instantly\n" \ + "remember forgotten moves!{EXTRA_MSG}" \ + " I...{WAIT_PRESS}\n" \ + "Well, when Pokémon remember...{WAIT_PRESS}\n" \ + "I love seeing that instant!{EXTRA_MSG}" \ + " That look of enlightenment!{WAIT_PRESS}\n" \ + "That amazed look of pleasure!{EXTRA_MSG}" \ + " I run this business because\n" \ + "I live to see that moment!")) + + + +#define GULP_ASLEEP_DLG_00 (_( \ + " Zzz... Hello...\n" \ + "Gulpin Link Shop...\n" \ + "Link for 150 {POKE}...")) + +#define GULP_ASLEEP_DLG_01 (_( \ + " Zzz... Gulpin Link Shop...\n" \ + "Link for just 150 {POKE}...")) + +#define GULP_ASLEEP_DLG_02 (_( \ + " Zzz... Grunt?\n" \ + "Not enough money...")) + +#define GULP_ASLEEP_DLG_03 (_( \ + " Zzz... Grumph...\n" \ + "Nothing to link...")) + +#define GULP_ASLEEP_DLG_04 (_( \ + " Sssnork... Sssnork...\n" \ + "Nothing to be delinked...")) + +#define GULP_ASLEEP_DLG_05 (_( \ + " Zzznort... Zzznnort...\n" \ + "Can't forget that...")) + +#define GULP_ASLEEP_DLG_06 (_( \ + " Zzz... Zzz...\n" \ + "Keep going...?")) + +#define GULP_ASLEEP_DLG_07 (_( \ + " Zzz... Zzz...\n" \ + "Come again...")) + +#define GULP_ASLEEP_DLG_08 (_( \ + " Gwaah... Gwaah...\n" \ + "Who's gonna link moves?")) + +#define GULP_ASLEEP_DLG_09 (_( \ + " Zzz... Fgwah...?\n" \ + "Remember what? What move?")) + +#define GULP_ASLEEP_DLG_10 (_( \ + " Zzzznort... Move...?\n" \ + "Remember {COLOR CYAN}{POKEMON_0}{RESET}?{EXTRA_MSG}" \ + " Fwaah...\n" \ + "Gggggggggggg...{WAIT_PRESS} Gulpin!{EXTRA_MSG}" \ + " Fgwaah...\n" \ + "There...{EXTRA_MSG}" \ + " Zzz... Zzz...\n" \ + "{COLOR CYAN_M}{POKEMON_5}{RESET} remembered...\n" \ + "Hunh? That move, {COLOR CYAN}{POKEMON_0}{RESET}...")) + +#define GULP_ASLEEP_DLG_11 (_( \ + " Zzznort... Grumble...\n" \ + "Forget {COLOR GREEN}{POKEMON_1}{RESET}?\n" \ + "Remember {COLOR CYAN}{POKEMON_0}{RESET}?")) + +#define GULP_ASLEEP_DLG_12 (_( \ + " Zzz? Fnurf? \n" \ + "Forget {COLOR GREEN}{POKEMON_1}{RESET}...and moves linked\n" \ + "to it? Remember {COLOR CYAN}{POKEMON_0}{RESET}?")) + +#define GULP_ASLEEP_DLG_13 (_( \ + " Fgwaah...\n" \ + "Here goes...{EXTRA_MSG}" \ + " Zzznort...\n" \ + "Gggggggg...{WAIT_PRESS} Pwah! Gulpin!{EXTRA_MSG}" \ + " Fwaah hah!\n" \ + "There...{EXTRA_MSG}" \ + " Zzz... Zzz... {COLOR CYAN_M}{POKEMON_5}{RESET}\n" \ + "forgot {COLOR GREEN}{POKEMON_1}{RESET}...\n" \ + "Remembered {COLOR CYAN}{POKEMON_0}{RESET}...")) + +#define GULP_ASLEEP_DLG_14 (_( \ + " Fgwaaah...\n" \ + "Here goes...{EXTRA_MSG}" \ + " Zzznort...\n" \ + "Gggggggg...{WAIT_PRESS} Pwah! Gulpin!{EXTRA_MSG}" \ + " Fwaaah hah!\n" \ + "There...{EXTRA_MSG}" \ + " Zzz... Mumble...\n" \ + "{COLOR CYAN_M}{POKEMON_5}{RESET}'s OK...{EXTRA_MSG}" \ + " Sssnork... Forgotten...\n" \ + "{COLOR GREEN}{POKEMON_1}{RESET} and moves linked to it...\n" \ + "Remembered {COLOR CYAN}{POKEMON_0}{RESET}...")) + +#define GULP_ASLEEP_DLG_15 (_( \ + " Zzz... Fwaah?\n" \ + "No moves to remember...")) + +#define GULP_ASLEEP_DLG_16 (_( \ + " Zzznork...? Hunh?\n" \ + "You're a special Pokémon...{EXTRA_MSG}" \ + " Mumble...\n" \ + "I can't help you...")) + +#define GULP_ASLEEP_DLG_17 (_( \ + " Zzz... Forget...?\n" \ + "{COLOR GREEN}{POKEMON_1}{RESET}?")) + +#define GULP_ASLEEP_DLG_18 (_( \ + " Zzz... Fwaah? Forget...?\n" \ + "{COLOR GREEN}{POKEMON_1}{RESET} and any moves\n" \ + "linked to it?")) + +#define GULP_ASLEEP_DLG_19 (_( \ + " Fgwaaah...\n" \ + "Here goes...{EXTRA_MSG}" \ + " Zzznort...\n" \ + "Gggggggg...{WAIT_PRESS} Pwah!{EXTRA_MSG}" \ + " Fwaaah hah!\n" \ + "There...{EXTRA_MSG}" \ + " Zzz... Mumble...\n" \ + "{COLOR CYAN}{POKEMON_5}{RESET} forgot...\n" \ + "{COLOR GREEN}{POKEMON_1}{RESET}...")) + +#define GULP_ASLEEP_DLG_20 (_( \ + " Fgwaaah...\n" \ + "Here goes...{EXTRA_MSG}" \ + " Zzznort...\n" \ + "Gggggggg...{WAIT_PRESS} Pwah!{EXTRA_MSG}" \ + " Fwaaah hah!\n" \ + "There...{EXTRA_MSG}" \ + " Zzz... Mutter...\n" \ + "{COLOR CYAN}{POKEMON_5}{RESET} forgot...\n" \ + "{COLOR GREEN}{POKEMON_1}{RESET} and moves linked to it...")) + +#define GULP_ASLEEP_DLG_21 (_( \ + " Zzznork... Fnurfle?\n" \ + "What do you want to know?")) + +#define GULP_ASLEEP_DLG_22 (_( \ + " Zzz... Zzz...\n" \ + "A set move can be used...\n" \ + "Press {L_BUTTON} and {A_BUTTON}...{EXTRA_MSG}" \ + " Sssnort... Set the move...{WAIT_PRESS}\n" \ + "Press {L_BUTTON} and {A_BUTTON}...{WAIT_PRESS} Use move!{WAIT_PRESS}\n" \ + "Convenient...{EXTRA_MSG}" \ + " Sssnore...\n" \ + "Switch the set move in a dungeon, too...")) + +#define GULP_ASLEEP_DLG_23 (_( \ + " Zzznork...{WAIT_PRESS}\n" \ + "Link moves to use them all in\n" \ + "one turn...{EXTRA_MSG}" \ + " Zzz... Fnurf...?\n" \ + "Linked moves...\n" \ + "Top one goes first...{EXTRA_MSG}" \ + " Zzz... Hah...?\n" \ + "Delink moves to break links...{EXTRA_MSG}" \ + " Zzzzz... Fwaaah...\n" \ + "Change order of moves with {R_BUTTON}...\n" \ + "And up and down on {DPAD}...{EXTRA_MSG}" \ + " Gwaaah... Gweh...\n" \ + "Make your own links...")) + +#define GULP_ASLEEP_DLG_24 (_( \ + " Zzz... Snuffle...\n" \ + "I'd go broke if it weren't for those\n" \ + "forgetful Pokémon...{EXTRA_MSG}" \ + " Zzz... Gwaaah...\n" \ + "Especially that {COLOR CYAN}{POKEMON_4}{RESET}...\n" \ + "It seems to be forgetful...{EXTRA_MSG}" \ + " Sssnore...\n" \ + "I hope it forgets more moves...\n" \ + "So it needs to see me...{EXTRA_MSG}" \ + " Zzz... Mumble...\n" \ + "But we decided to get rid of that\n" \ + "{COLOR CYAN}{POKEMON_4}{RESET}...{EXTRA_MSG}" \ + " Gwaaaah... Gweh...\n" \ + "{COLOR CYAN}{POKEMON_4}{RESET} won't be coming around\n" \ + "anymore... ")) diff --git a/src/data/locale/hints_usa.h b/src/data/locale/hints_usa.h new file mode 100644 index 000000000..16ff0acc3 --- /dev/null +++ b/src/data/locale/hints_usa.h @@ -0,0 +1,60 @@ +#define HINTHEADING_TOWN_CONTROLS_1 (_("Controls in Town 1")) + +#define HINTBODY_TOWN_CONTROLS_1 (_( \ + "Talk: {A_BUTTON}\n" \ + "Move: {DPAD}\n" \ + "Window: {B_BUTTON} lightly\n" \ + "Message scroll: {A_BUTTON} or {B_BUTTON}\n" \ + "Cancel: {B_BUTTON}\n" \ + "Description: Choose item or move, {START_BUTTON}")) + + + +#define HINTHEADING_TOWN_CONTROLS_2 (_("Controls in Town 2")) + +#define HINTBODY_TOWN_CONTROLS_2 (_( \ + "Selecting multiple items in storage:\n" \ + " Select an item, then press {L_BUTTON} or {R_BUTTON}.\n" \ + "Moving to the Friend Area Map:\n" \ + " Move out from the town's west side\n" \ + " while pressing {L_BUTTON} or {R_BUTTON}.\n" \ + "Moving diagonally on the Friend Area Map:\n" \ + " {DPAD} while keeping {R_BUTTON} pressed.")) + + + +#define HINTHEADING_SAVING (_("Saving")) + +#define HINTBODY_SAVING (_( \ + "You can save your adventure by\n" \ + "hopping onto your bed in your base.\n" \ + "Get in the habit of saving regularly as\n" \ + "you progress in your adventure.")) + + + +#define HINTHEADING_ADVENTURES_WITH_FRIENDS (_("Adventures with Friends")) + +#define HINTBODY_ADVENTURES_WITH_FRIENDS (_( \ + "If new recruits join you, try to return to\n" \ + "your base without letting them faint.\n" \ + "If you get them out safely, they'll wait\n" \ + "for you in their Friend Areas.\n" \ + "Once you get them out, they'll always\n" \ + "return home if they faint in a dungeon.\n" \ + "If you faint in a dungeon, you lose all your\n" \ + "money and some items, too.")) + + + +#define HINTHEADING_BUILDING_A_TEAM (_("Building a Team")) + +#define HINTBODY_BUILDING_A_TEAM (_( \ + "Before leaving on an adventure, go visit\n" \ + "friends in their Friend Areas and pick\n" \ + "your mission members.\n" \ + "The team can include members up to\n" \ + "a total body size of 6{STAR_BULLET}. The body size\n" \ + "data is under the Info section.\n" \ + "Dungeons may also limit how many\n" \ + "members are allowed to go inside.")) diff --git a/src/data/locale/kangaskhan_storage_usa.h b/src/data/locale/kangaskhan_storage_usa.h new file mode 100644 index 000000000..d65cff87a --- /dev/null +++ b/src/data/locale/kangaskhan_storage_usa.h @@ -0,0 +1,189 @@ +#define KANG_AWAKE_WELCOME (_( \ + " Hello, there!\n" \ + "Welcome to {POKEMON_6} Storage.")) + +#define KANG_AWAKE_ANYTHING_ELSE (_(" Anything else, dear?")) + +#define KANG_AWAKE_BYE (_( \ + " Thank you, sweetie.\n" \ + "Come again!")) + +#define KANG_AWAKE_STORE_WHAT (_( \ + " What do you want to store?\n" \ + "You can choose more than one item using\n" \ + "{L_BUTTON} or {R_BUTTON}.")) + +#define KANG_AWAKE_STORE_MORE (_( \ + " Do you want to store\n" \ + "anything else?")) + +#define KANG_AWAKE_DEPOSIT_ONE_PROMPT (_( \ + " I'll put your\n" \ + "{COLOR GREEN}{MOVE_ITEM_0}{RESET} in storage. OK?")) + +#define KANG_AWAKE_DEPOSIT_MANY_PROMPT (_( \ + " I'll put the items you chose\n" \ + "in storage. OK?")) + +#define KANG_AWAKE_DEPOSIT_CONFIRMATION (_( \ + " OK, stored away!\n" \ + "You can count on me, honey.")) + +#define KANG_AWAKE_TAKE_WHAT (_( \ + " What will you take out?\n" \ + "You can choose more than one item using\n" \ + "{L_BUTTON} or {R_BUTTON}.")) + +#define KANG_AWAKE_TAKE_MORE (_( \ + " Would you like to take\n" \ + "anything else?")) + +#define KANG_AWAKE_WITHDRAW_ONE_PROMPT (_( \ + " Fine, I'll take your\n" \ + "{COLOR GREEN}{MOVE_ITEM_0}{RESET} out of storage. OK?")) + +#define KANG_AWAKE_WITHDRAW_MANY_PROMPT (_( \ + " I'll take the items you\n" \ + "chose out of storage. OK?")) + +#define KANG_AWAKE_WITHDRAW_CONFIRMATION (_( \ + " There you go!\n" \ + "Just like you asked, sweetie!")) + +#define KANG_AWAKE_YOU_HAVE_NOTHING (_( \ + " Oh?\n" \ + "You don't seem to have anything?")) + +#define KANG_AWAKE_YOU_ARE_FULL (_( \ + " Oh? You don't have the room\n" \ + "to carry any more items, dear.")) + +#define KANG_AWAKE_STORAGE_HAS_NOTHING (_( \ + " Oh?\n" \ + "You don't have anything stored, dear.")) + +#define KANG_AWAKE_DEPOSIT_INVALID_ITEM (_( \ + " Oh, dear, sorry.{WAIT_PRESS}\n" \ + "That {COLOR GREEN}{MOVE_ITEM_0}{RESET} is an item you\n" \ + "can't put in storage.")) + +#define KANG_AWAKE_DEPOSIT_TOO_MANY_OF_ITEM (_( \ + " Sorry, dear.\n" \ + "I can't take any more of that item.")) + +#define KANG_AWAKE_STORAGE_FULL (_( \ + " Sorry, dear.\n" \ + "I've run out of storage space.")) + +#define KANG_AWAKE_HOW_IT_WORKS (_( \ + " I can store items that you\n" \ + "found in dungeons, or that you\n" \ + "bought from shops.{EXTRA_MSG}" \ + " If you faint in\n" \ + "a dungeon, your items will be lost...{WAIT_PRESS}\n" \ + "But what's in storage will be safe.{EXTRA_MSG}" \ + " I keep guard over the\n" \ + "storage space, so anything you leave\n" \ + "with me won't ever disappear!{EXTRA_MSG}" \ + " If you have any items that\n" \ + "you can't bear to lose, be sure to leave\n" \ + "them with me!")) + + + +#define KANG_ASLEEP_WELCOME (_( \ + " Zzz... Zzz...\n" \ + "Hello, there...\n" \ + "{POKEMON_6} Storage...")) + +#define KANG_ASLEEP_ANYTHING_ELSE (_( \ + " Zzz... Snork...\n" \ + "Anything else?")) + +#define KANG_ASLEEP_BYE (_( \ + " Snuffle... Mutter...\n" \ + "Thank you...\n" \ + "Come again...")) + +#define KANG_ASLEEP_STORE_WHAT (_( \ + " Hunh, wha--? Store what...?\n" \ + "You can choose more than one using\n" \ + "{L_BUTTON} or {R_BUTTON}...")) + +#define KANG_ASLEEP_STORE_MORE (_( \ + " Do you... Snork...\n" \ + "Store anything else?")) + +#define KANG_ASLEEP_DEPOSIT_ONE_PROMPT (_( \ + " Zzz... Store something?\n" \ + "Gonna put {COLOR GREEN}{MOVE_ITEM_0}{RESET} in storage...\n" \ + "OK?")) + +#define KANG_ASLEEP_DEPOSIT_MANY_PROMPT (_( \ + " Hunh, wha--? Storage...?\n" \ + "I'll put away the things you chose...\n" \ + "That OK?")) + +#define KANG_ASLEEP_DEPOSIT_CONFIRMATION (_( \ + " Zzz... Zzz...\n" \ + "Yup, I did... Stored away...")) + +#define KANG_ASLEEP_TAKE_WHAT (_( \ + " What...? Take out...?\n" \ + "Uh-huh... Choose more than one using\n" \ + "{L_BUTTON} or {R_BUTTON}... Zzz...")) + +#define KANG_ASLEEP_TAKE_MORE (_( \ + " Snork! Zzz...\n" \ + "Taking anything else?")) + +#define KANG_ASLEEP_WITHDRAW_ONE_PROMPT (_( \ + " Hunh...? Taking...?\n" \ + "Oh... You want your {COLOR GREEN}{MOVE_ITEM_0}{RESET}...\n" \ + "OK?")) + +#define KANG_ASLEEP_WITHDRAW_MANY_PROMPT (_( \ + " Zzz... Zzz... Hunh...?\n" \ + "You want those things from storage...\n" \ + "OK?")) + +#define KANG_ASLEEP_WITHDRAW_CONFIRMATION (_( \ + " Zzz... Snork!\n" \ + "There you go...")) + +#define KANG_ASLEEP_YOU_HAVE_NOTHING (_( \ + " Snarfle? Hunh...?{WAIT_PRESS}\n" \ + "Zzz...\n" \ + "You don't have anything...?")) + +#define KANG_ASLEEP_YOU_ARE_FULL (_( \ + " Snarfle? Hunh...?{WAIT_PRESS}\n" \ + "Zzz...\n" \ + "You don't have enough space...")) + +#define KANG_ASLEEP_STORAGE_EMPTY (_( \ + " Snarfle? Hunh...?{WAIT_PRESS}\n" \ + "Zzz... Your storage space... Empty...")) + +#define KANG_ASLEEP_DEPOSIT_INVALID_ITEM (_( \ + " Zzz... Zzz...\n" \ + "That {COLOR GREEN}{MOVE_ITEM_0}{RESET}...\n" \ + "Can't store it...")) + +#define KANG_ASLEEP_DEPOSIT_TOO_MANY_OF_ITEM (_( \ + " Zzz... No...\n" \ + "Can't store any more of that...")) + +#define KANG_ASLEEP_STORAGE_FULL (_( \ + " Zzz... Zzz... No...\n" \ + "The storage space is full...")) + +#define KANG_ASLEEP_HOW_IT_WORKS (_( \ + " Zzz... Snork!\n" \ + "I can store items that you\n" \ + "found in dungeons...{EXTRA_MSG}" \ + " Snarfle...\n" \ + "Things in storage don't get lost...{EXTRA_MSG}" \ + " Zzz... Zzz...\n" \ + "That's why...\n" \ + "Keep important items in storage...")) diff --git a/src/data/locale/kecleon_bros_usa.h b/src/data/locale/kecleon_bros_usa.h new file mode 100644 index 000000000..eb518e3f0 --- /dev/null +++ b/src/data/locale/kecleon_bros_usa.h @@ -0,0 +1,470 @@ +#define KEC_ITEMS_AWAKE_DLG_00 (_( \ + " Hello〜♪\n" \ + "Welcome to the {POKEMON_6} Shop〜♪ ")) + +#define KEC_ITEMS_AWAKE_DLG_01 (_( \ + " May I help you with\n" \ + "anything else?")) + +#define KEC_ITEMS_AWAKE_DLG_02 (_( \ + " Thank you!\n" \ + "Please call again〜♪ ")) + +#define KEC_ITEMS_AWAKE_DLG_03 (_( \ + " Ah, very well!\n" \ + "Feel free to examine my merchandise〜♪")) + +#define KEC_ITEMS_AWAKE_DLG_04 (_( \ + " Do you wish to buy\n" \ + "anything else today?")) + +#define KEC_ITEMS_AWAKE_DLG_05 (_( \ + " {COLOR GREEN}{MOVE_ITEM_0}{RESET}?\n" \ + "That will be {COLOR CYAN}{VALUE_0}{RESET} {POKE}.\n" \ + "Is that to your liking?")) + +#define KEC_ITEMS_AWAKE_DLG_06 (_( \ + " Very well! Thank you〜♪\n" \ + "It is yours to take!")) + +#define KEC_ITEMS_AWAKE_DLG_07 (_( \ + " Ah, very well!\n" \ + "What do you wish to sell?")) + +#define KEC_ITEMS_AWAKE_DLG_08 (_( \ + " Do you wish to sell\n" \ + "anything else?")) + +#define KEC_ITEMS_AWAKE_DLG_09 (_( \ + " {COLOR GREEN}{MOVE_ITEM_0}{RESET}?\n" \ + "I can offer you {COLOR CYAN}{VALUE_0}{RESET} {POKE}.\n" \ + "Will you sell it for that price?")) + +#define KEC_ITEMS_AWAKE_DLG_10 (_( \ + " For everything I can buy,\n" \ + "I can offer {COLOR CYAN}{VALUE_0}{RESET} {POKE}.\n" \ + "Is that acceptable to you?")) + +#define KEC_ITEMS_AWAKE_DLG_11 (_( \ + " Good! Done deal!\n" \ + "Thank you so much〜♪ ")) + +#define KEC_ITEMS_AWAKE_DLG_12 (_( \ + " ...{WAIT_PRESS}I'm sold out...\n" \ + "Please, forgive me.{EXTRA_MSG}" \ + " I will have new merchandise\n" \ + "for you tomorrow, I swear!")) + +#define KEC_ITEMS_AWAKE_DLG_13 (_( \ + " Huh?{WAIT_PRESS}\n" \ + "You don't seem to have the money?")) + +#define KEC_ITEMS_AWAKE_DLG_14 (_( \ + " Oh, my goodness!\n" \ + "You're overflowing with money!{EXTRA_MSG}" \ + " You couldn't possibly carry\n" \ + "any more money! ")) + +#define KEC_ITEMS_AWAKE_DLG_15 (_( \ + " Oh? Oh?{WAIT_PRESS}\n" \ + "You seem to have nothing to sell?")) + +#define KEC_ITEMS_AWAKE_DLG_16 (_( \ + " Oh? Oh?{WAIT_PRESS}\n" \ + "You don't seem to have anything?")) + +#define KEC_ITEMS_AWAKE_DLG_17 (_( \ + " Oh, my!{WAIT_PRESS}\n" \ + "You have no space for any more items!")) + +#define KEC_ITEMS_AWAKE_DLG_18 (_( \ + " Uh-oh?!{WAIT_PRESS}\n" \ + "That's it! No more merchandise!{EXTRA_MSG}" \ + " I'm completely sold out!")) + +#define KEC_ITEMS_AWAKE_DLG_19 (_( \ + " Oh, my!{WAIT_PRESS}\n" \ + "Sorry, but you don't have enough money!")) + +#define KEC_ITEMS_AWAKE_DLG_20 (_( \ + " Oh, whoa, whoa!{WAIT_PRESS}\n" \ + "I... I couldn't possibly take that from you!")) + +#define KEC_ITEMS_AWAKE_DLG_21 (_( \ + " Oh, my!{WAIT_PRESS}\n" \ + "You can't add any more to your money.\n" \ + "I can't complete this deal, sorry.")) + +#define KEC_ITEMS_AWAKE_DLG_22 (_( \ + " We, the {POKEMON_6}\n" \ + "Brothers, have a passion for selling\n" \ + "items.{EXTRA_MSG}" \ + " Items are useful for your\n" \ + "dungeon adventures.{EXTRA_MSG}" \ + " Use your imagination and\n" \ + "discover innovative uses, please.{EXTRA_MSG}" \ + " Ah, yes.\n" \ + "If my shop sells out...{EXTRA_MSG}" \ + " New merchandise will\n" \ + "arrive the following day.{EXTRA_MSG}" \ + " Until then, please go to\n" \ + "a dungeon and spend some time.\n" \ + "Please visit on your return〜♪{EXTRA_MSG}" \ + " Ah, yes. The {POKEMON_6}\n" \ + "Shop is a nationwide chain.{EXTRA_MSG}" \ + " There are shops even in\n" \ + "dungeons.\n" \ + "Please do visit〜♪ ")) + + + +#define KEC_ITEMS_ASLEEP_DLG_00 (_( \ + " Zzzzzz...\n" \ + "Welcome...")) + +#define KEC_ITEMS_ASLEEP_DLG_01 (_( \ + " Zzz... Meep...\n" \ + "Help you with anything else?")) + +#define KEC_ITEMS_ASLEEP_DLG_02 (_( \ + " Thank... Zzz...\n" \ + "Thank you...")) + +#define KEC_ITEMS_ASLEEP_DLG_03 (_( \ + " Zzz... Meep... Eep...\n" \ + "Look around...")) + +#define KEC_ITEMS_ASLEEP_DLG_04 (_( \ + " Buy? Huh, eep?\n" \ + "Anything else?")) + +#define KEC_ITEMS_ASLEEP_DLG_05 (_( \ + " Zzz... Meep meep...\n" \ + "{COLOR GREEN}{MOVE_ITEM_0}{RESET}...?\n" \ + "{COLOR CYAN}{VALUE_0}{RESET} {POKE}, OK?")) + +#define KEC_ITEMS_ASLEEP_DLG_06 (_( \ + " Eep! Wah...?\n" \ + "Thank you...")) + +#define KEC_ITEMS_ASLEEP_DLG_07 (_( \ + " Zzz... Zzz...?\n" \ + "You're selling what...?")) + +#define KEC_ITEMS_ASLEEP_DLG_08 (_( \ + " Zzz... Meep...\n" \ + "Going to sell anything else?")) + +#define KEC_ITEMS_ASLEEP_DLG_09 (_( \ + " Zzzzzz... Zzzzzz...?\n" \ + "Selling that {COLOR GREEN}{MOVE_ITEM_0}{RESET}...?\n" \ + "How about {COLOR CYAN}{VALUE_0}{RESET} {POKE}?")) + +#define KEC_ITEMS_ASLEEP_DLG_10 (_( \ + " Zzzzzz... Zzzzzz...?\n" \ + "I can pay you {COLOR CYAN}{VALUE_0}{RESET} {POKE}\n" \ + "for everything I can buy... OK?")) + +#define KEC_ITEMS_ASLEEP_DLG_11 (_( \ + " Done... Meep! Deal!\n" \ + "Thank you...")) + +#define KEC_ITEMS_ASLEEP_DLG_12 (_( \ + " ...{WAIT_PRESS} ZZZ!\n" \ + "I'm sold out... Forgive me...")) + +#define KEC_ITEMS_ASLEEP_DLG_13 (_( \ + " Hunh?{WAIT_PRESS}\n" \ + "Eep...?\n" \ + "You don't have money?")) + +#define KEC_ITEMS_ASLEEP_DLG_14 (_( \ + " Zzz... Oh, my!\n" \ + "You have so much money...!{EXTRA_MSG}" \ + " Zzz... Meep...\n" \ + "You can't carry any more money...")) + +#define KEC_ITEMS_ASLEEP_DLG_15 (_( \ + " Zzz... Huh?{WAIT_PRESS}\n" \ + "Meep meep...\n" \ + "You don't seem to have anything to sell?")) + +#define KEC_ITEMS_ASLEEP_DLG_16 (_( \ + " Zzz... Eep...?{WAIT_PRESS}\n" \ + "Meep... You don't seem to have\n" \ + "anything...?")) + +#define KEC_ITEMS_ASLEEP_DLG_17 (_( \ + " Zzz... Oh, my!{WAIT_PRESS}\n" \ + "Meep... You have no space...")) + +#define KEC_ITEMS_ASLEEP_DLG_18 (_( \ + " Zzz... Uh-oh?!{WAIT_PRESS}\n" \ + "Eep!\n" \ + "Sold out! All gone!")) + +#define KEC_ITEMS_ASLEEP_DLG_19 (_( \ + " Zzz... Huh, my...!{WAIT_PRESS}\n" \ + "Meep... Meep...\n" \ + "You don't have enough money!")) + +#define KEC_ITEMS_ASLEEP_DLG_20 (_( \ + " Zzz... Whoa...{WAIT_PRESS}\n" \ + "I... I can't take that!")) + +#define KEC_ITEMS_ASLEEP_DLG_21 (_( \ + " Zzz... Hunh, what...?{WAIT_PRESS}\n" \ + "Zzz... You can't hold any more money...")) + +#define KEC_ITEMS_ASLEEP_DLG_22 (_( \ + " Zzzzzz...\n" \ + "I sell items...{EXTRA_MSG}" \ + " Items... Meep meep...\n" \ + "Are useful in dungeons...{EXTRA_MSG}" \ + " Use... Zzz... Huh...?\n" \ + "Your imagination...and be clever...\n" \ + "With them...")) + + + +#define KEC_WARES_AWAKE_DLG_00 (_( \ + " Welcome to Kecleon Wares!\n" \ + "The shop for Orbs and TMs〜♪ ")) + +#define KEC_WARES_AWAKE_DLG_01 (_( \ + " May I assist you in any\n" \ + "other way?")) + +#define KEC_WARES_AWAKE_DLG_02 (_( \ + " Thank you so much!\n" \ + "Please do visit again〜♪ ")) + +#define KEC_WARES_AWAKE_DLG_03 (_( \ + " Ah, very well!\n" \ + "Do examine my merchandise.\n" \ + "I have chosen it with pride〜♪ ")) + +#define KEC_WARES_AWAKE_DLG_04 (_( \ + " Do you wish to purchase\n" \ + "anything else?")) + +#define KEC_WARES_AWAKE_DLG_05 (_( \ + " {COLOR GREEN}{MOVE_ITEM_0}{RESET}, you say?\n" \ + "That will be {COLOR CYAN}{VALUE_0}{RESET} {POKE}.\n" \ + "Is that acceptable?")) + +#define KEC_WARES_AWAKE_DLG_06 (_( \ + " Thank you so much〜♪\n" \ + "A very good choice!")) + +#define KEC_WARES_AWAKE_DLG_07 (_( \ + " Ah, very well!\n" \ + "What do you wish to sell?")) + +#define KEC_WARES_AWAKE_DLG_08 (_( \ + " Do you wish to sell me\n" \ + "anything else?")) + +#define KEC_WARES_AWAKE_DLG_09 (_( \ + " {COLOR GREEN}{MOVE_ITEM_0}{RESET}, you say?\n" \ + "For that, I can offer {COLOR CYAN}{VALUE_0}{RESET} {POKE}.\n" \ + "Is that acceptable?")) + +#define KEC_WARES_AWAKE_DLG_10 (_( \ + " For all that I can buy, I can\n" \ + "offer you {COLOR CYAN}{VALUE_0}{RESET} {POKE}.\n" \ + "Is that acceptable?")) + +#define KEC_WARES_AWAKE_DLG_11 (_( \ + " Fine, fine, we have a deal!\n" \ + "Thank you so much〜♪ ")) + +#define KEC_WARES_AWAKE_DLG_12 (_( \ + " ...{WAIT_PRESS}I am all out of wares...\n" \ + "I am so sorry, my friend...{EXTRA_MSG}" \ + " Tomorrow!\n" \ + "Tomorrow I shall have more wares!")) + +#define KEC_WARES_AWAKE_DLG_13 (_( \ + " Oh?{WAIT_PRESS}\n" \ + "My friend, you seem not to have\n" \ + "enough money?")) + +#define KEC_WARES_AWAKE_DLG_14 (_( \ + " Oh, my, my!\n" \ + "My friend, you have too much money!{EXTRA_MSG}" \ + " You can't carry any more\n" \ + "money than you have now.")) + +#define KEC_WARES_AWAKE_DLG_15 (_( \ + " Oh, oh, oh?{WAIT_PRESS}\n" \ + "My friend, you seem to not have anything\n" \ + "that you can sell?")) + +#define KEC_WARES_AWAKE_DLG_16 (_( \ + " Oh?{WAIT_PRESS}\n" \ + "My friend, you seem to have nothing?")) + +#define KEC_WARES_AWAKE_DLG_17 (_( \ + " Oh, dear me!{WAIT_PRESS}\n" \ + "My friend, you've run out of space for\n" \ + "my wares!")) + +#define KEC_WARES_AWAKE_DLG_18 (_( \ + " Oh? Uh-oh!{WAIT_PRESS}\n" \ + "My shelves are bare of wares!{EXTRA_MSG}" \ + " I am completely sold out,\n" \ + "my friend!")) + +#define KEC_WARES_AWAKE_DLG_19 (_( \ + " Eep! Oh, dear!{WAIT_PRESS}\n" \ + "You're short on money, my friend!")) + +#define KEC_WARES_AWAKE_DLG_20 (_( \ + " Whoa, whoa!{WAIT_PRESS}\n" \ + "I... I can't accept anything like that!")) + +#define KEC_WARES_AWAKE_DLG_21 (_( \ + " Oh, no, no!{WAIT_PRESS}\n" \ + "My friend, you cannot add to your money!\n" \ + "I cannot do this.")) + +#define KEC_WARES_AWAKE_DLG_22 (_( \ + " Wonder Orbs are very,\n" \ + "very convenient〜♪{EXTRA_MSG}" \ + " However, they disappear\n" \ + "after one use...{WAIT_PRESS}\n" \ + "But they are useful in a pinch!{EXTRA_MSG}" \ + " Use them cleverly, and your\n" \ + "adventures will be made much easier〜♪{EXTRA_MSG}" \ + " And moves...{WAIT_PRESS}\n" \ + "They are the ultimate power!{EXTRA_MSG}" \ + " Smash rocks!{WAIT_PRESS} Fly!{WAIT_PRESS}\n" \ + "There are many kinds of moves, all of\n" \ + "them dynamic, yet elegant!{EXTRA_MSG}" \ + " There are even moves of\n" \ + "obscure rarity...{WAIT_PRESS}\n" \ + "Simply gorgeous, they are!{EXTRA_MSG}" \ + " Now, we have these moves!{WAIT_PRESS}\n" \ + "They can be learned using our Technical\n" \ + "Machines, or TMs for short!{EXTRA_MSG}" \ + " You see?\n" \ + "Isn't it exciting? Even dreamy?{EXTRA_MSG}" \ + " Why, it gets me so excited,\n" \ + "my color has turned a rosy tint!{EXTRA_MSG}" \ + " I do hope you will shop\n" \ + "with us--me and my brother next to\n" \ + "me!")) + + + +#define KEC_WARES_ASLEEP_DLG_00 (_( \ + " Zzzzzz...\n" \ + "This is...my shop...")) + +#define KEC_WARES_ASLEEP_DLG_01 (_( \ + " Reep...\n" \ + "Anything else?")) + +#define KEC_WARES_ASLEEP_DLG_02 (_( \ + " Thank... Reep eep...\n" \ + "Come again...")) + +#define KEC_WARES_ASLEEP_DLG_03 (_( \ + " Ah... Zzz...\n" \ + "My merchandise...")) + +#define KEC_WARES_ASLEEP_DLG_04 (_( \ + " Anything? Zzz...\n" \ + "Buying anything else?")) + +#define KEC_WARES_ASLEEP_DLG_05 (_( \ + " Zzzzzz...\n" \ + "{COLOR GREEN}{MOVE_ITEM_0}{RESET} is {COLOR CYAN}{VALUE_0}{RESET} {POKE}...\n" \ + "OK?")) + +#define KEC_WARES_ASLEEP_DLG_06 (_( \ + " Zzz... Reep!\n" \ + "Thank you...")) + +#define KEC_WARES_ASLEEP_DLG_07 (_( \ + " Zzz... Eep...?\n" \ + "What will you sell...?")) + +#define KEC_WARES_ASLEEP_DLG_08 (_( \ + " Reep reep... Eep...\n" \ + "Anything else for sale?")) + +#define KEC_WARES_ASLEEP_DLG_09 (_( \ + " Zzzzzz... Zzzzzz...?\n" \ + "{COLOR GREEN}{MOVE_ITEM_0}{RESET}?\n" \ + "Is {COLOR CYAN}{VALUE_0}{RESET} {POKE} OK?")) + +#define KEC_WARES_ASLEEP_DLG_10 (_( \ + " Zzz... Reep, what...?\n" \ + "For all that I can buy, I will pay\n" \ + "{COLOR CYAN}{VALUE_0}{RESET} {POKE}... OK?")) + +#define KEC_WARES_ASLEEP_DLG_11 (_( \ + " Fine... Reep reep...\n" \ + "Done deal!\n" \ + "Thank you...")) + +#define KEC_WARES_ASLEEP_DLG_12 (_( \ + " ...{WAIT_PRESS}Zzz...\n" \ + "I am all sold out... Sorry...")) + +#define KEC_WARES_ASLEEP_DLG_13 (_( \ + " Reep eep! Oh?{WAIT_PRESS}\n" \ + "Eep...?\n" \ + "You have no money?")) + +#define KEC_WARES_ASLEEP_DLG_14 (_( \ + " Eep...? Zzz...\n" \ + "You have too much money!{EXTRA_MSG}" \ + " Zzz... Eh?\n" \ + "You can't hold any more money...")) + +#define KEC_WARES_ASLEEP_DLG_15 (_( \ + " Zzz... Oh...?{WAIT_PRESS}\n" \ + "You have nothing to sell...\n" \ + "Hunh?")) + +#define KEC_WARES_ASLEEP_DLG_16 (_( \ + " Zzzzzz... Oh?{WAIT_PRESS}\n" \ + "You've got nothing...")) + +#define KEC_WARES_ASLEEP_DLG_17 (_( \ + " Zzz... Hunh? Oh...{WAIT_PRESS}\n" \ + "Reep... No room... Reep...\n" \ + "No room for my wares...")) + +#define KEC_WARES_ASLEEP_DLG_18 (_( \ + " Zzz... Uh-oh...{WAIT_PRESS}\n" \ + "All gone!\n" \ + "I am sold out...")) + +#define KEC_WARES_ASLEEP_DLG_19 (_( \ + " Reep...? Eep!{WAIT_PRESS}\n" \ + "Not enough money!")) + +#define KEC_WARES_ASLEEP_DLG_20 (_( \ + " Zzz... Hunh? Wha--? Whoa!{WAIT_PRESS}\n" \ + "I... I can't accept anything like that!")) + +#define KEC_WARES_ASLEEP_DLG_21 (_( \ + " Zzz... Eep? No, no...{WAIT_PRESS}\n" \ + "You cannot hold any more money...")) + +#define KEC_WARES_ASLEEP_DLG_22 (_( \ + " Zzz... Reep reep...\n" \ + "Wonder Orbs are convenient...{EXTRA_MSG}" \ + " Zzzzzz...\n" \ + "They disappear after one use...{EXTRA_MSG}" \ + " Zzz... And moves...\n" \ + "They are ultimate...{EXTRA_MSG}" \ + " Zzz... Eep...\n" \ + "Learn moves with Technical Machines...{EXTRA_MSG}" \ + " Zzz...\n" \ + "My good wares...\n" \ + "Come buy... Reep...")) diff --git a/src/data/locale/makuhita_dojo_usa.h b/src/data/locale/makuhita_dojo_usa.h new file mode 100644 index 000000000..1b456a3f2 --- /dev/null +++ b/src/data/locale/makuhita_dojo_usa.h @@ -0,0 +1,155 @@ +#define MAKU_AWAKE_DLG_0 (_( \ + " This is the Makuhita Dojo!{WAIT_PRESS}\n" \ + "Through rigorous training, one begets\n" \ + "true power.")) + +#define MAKU_AWAKE_DLG_1 (_(" What else do you seek?")) + +#define MAKU_AWAKE_DLG_2 (_( \ + " Fine, farewell.\n" \ + "Return if you seek more training.")) + +#define MAKU_AWAKE_DLG_3 (_(" Where do you wish to train?")) + +#define MAKU_AWAKE_DLG_4 (_( \ + " The {POKEMON_0}?{WAIT_PRESS}\n" \ + "Your decision stands!{WAIT_PRESS}\n" \ + "Let the training begin!")) + +#define MAKU_AWAKE_DLG_5 (_( \ + " Aiyah...{WAIT_PRESS}\n" \ + "You failed to reach the end...{WAIT_PRESS}\n" \ + "More training is what you need.{EXTRA_MSG}" \ + " But effort is never wasted!{EXTRA_MSG}" \ + " Learn from this and move\n" \ + "forward!")) + +#define MAKU_AWAKE_DLG_6 (_( \ + " Ah...\n" \ + "You have succeeded in your training!{EXTRA_MSG}" \ + " You've shown your worth!{WAIT_PRESS}\n" \ + "Without a doubt, you have grown more\n" \ + "powerful from your training!{EXTRA_MSG}" \ + " May this success drive\n" \ + "you to train even harder!")) + +#define MAKU_AWAKE_DLG_7 (_( \ + " Ah...\n" \ + "You have succeeded in your training!{EXTRA_MSG}" \ + " You've shown your worth!{WAIT_PRESS}\n" \ + "Without a doubt, you have grown more\n" \ + "powerful from your training!{WAIT_PRESS} Wait...{WAIT_PRESS} ...{EXTRA_MSG}" \ + " Wuh?{WAIT_PRESS}\n" \ + "What, what, what?!{EXTRA_MSG}" \ + " Did you maybe...{WAIT_PRESS}\n" \ + "Conquer all the training courses?{EXTRA_MSG}" \ + " That's...{WAIT_PRESS} Amazing! You!{WAIT_PRESS}\n" \ + "Congratulations!{EXTRA_MSG}" \ + " I promised!{WAIT_PRESS}\n" \ + "I promised you a reward for completing\n" \ + "the training courses!{EXTRA_MSG}" \ + " So... Here it is!{WAIT_PRESS}\n" \ + "My {COLOR GREEN_I}Bonsly Doll{RESET}!{EXTRA_MSG}" \ + " Isn't it smashing? Hey?!")) + +#define MAKU_AWAKE_DLG_8 (_( \ + " Don't let up on your training!\n" \ + "Keep bettering yourself!{EXTRA_MSG}" \ + " May you never lose your\n" \ + "drive!")) + +#define MAKU_AWAKE_DLG_9 (_( \ + " This dojo was founded to\n" \ + "support the efforts of rescue teams.{EXTRA_MSG}" \ + " Train in different rooms to\n" \ + "level up...{WAIT_PRESS}\n" \ + "And toughen up your rescue team.{EXTRA_MSG}" \ + " Also...{WAIT_PRESS}\n" \ + "In the {COLOR YELLOW_D}Fire Maze{RESET} you will find only\n" \ + "Fire-type Pokémon.{EXTRA_MSG}" \ + " In the {COLOR YELLOW_D}Water Maze{RESET} there\n" \ + "will only be Water-type Pokémon.{EXTRA_MSG}" \ + " In such ways, only one type\n" \ + "of Pokémon will be in a given room.\n" \ + "Study how types match up in battle.{EXTRA_MSG}" \ + " The Pokémon in this dojo,\n" \ + "by the way, are all volunteers.{EXTRA_MSG}" \ + " They are participating\n" \ + "because they want to see rescue teams\n" \ + "succeed.{EXTRA_MSG}" \ + " The only thanks they expect\n" \ + "is to see you become stronger.\n" \ + "Don't let them down!{EXTRA_MSG}" \ + " There's more.{WAIT_PRESS}\n" \ + "For a rescue team that successfully\n" \ + "completes all training courses...{EXTRA_MSG}" \ + " I have a special reward!{EXTRA_MSG}" \ + " Let that compel you to train\n" \ + "harder!")) + + + +#define MAKU_ASLEEP_DLG_0 (_( \ + " Zzznarr... Zzznarr...\n" \ + "Makuhita... Dojo...")) + +#define MAKU_ASLEEP_DLG_1 (_( \ + " Zzznarr... Urr?\n" \ + "What else?")) + +#define MAKU_ASLEEP_DLG_2 (_( \ + " Urr... Narr...\n" \ + "See you...")) + +#define MAKU_ASLEEP_DLG_3 (_( \ + " Zzznarr... Zzz...\n" \ + "Train where?")) + +#define MAKU_ASLEEP_DLG_4 (_( \ + " Zzz... Narr...\n" \ + "{POKEMON_0}? 'K, go...")) + +#define MAKU_ASLEEP_DLG_5 (_( \ + " Aiyah... Zzznarr...\n" \ + "Didn't finish...{EXTRA_MSG}" \ + " Zzz... Urr?\n" \ + "No giving up...")) + +#define MAKU_ASLEEP_DLG_6 (_( \ + " Ah... Zzznarr...\n" \ + "Cleared it...{EXTRA_MSG}" \ + " Congrazzz...\n" \ + "Keep going... Zzz...")) + +#define MAKU_ASLEEP_DLG_7 (_( \ + " Ah... Zzznarr...\n" \ + "Cleared it...{EXTRA_MSG}" \ + " Zzzznarr... Urr...\n" \ + "Good going... Keep going...{WAIT_PRESS}\n" \ + "Hunh...{WAIT_PRESS} ...{EXTRA_MSG}" \ + " Gwoh?{WAIT_PRESS}\n" \ + "Gwogwogwoh?{EXTRA_MSG}" \ + " Mugawah?\n" \ + "Cleared everything?{EXTRA_MSG}" \ + " Zzznarr!\n" \ + "Congrazzz...{EXTRA_MSG}" \ + " Zzznarr... Zzznarr...\n" \ + "Your reward...\n" \ + "Promised...{EXTRA_MSG}" \ + " Zzz... Urr!\n" \ + "{COLOR GREEN_I}Bonsly Doll{RESET}...")) + +#define MAKU_ASLEEP_DLG_8 (_( \ + " Zzznarr... Zzz...!\n" \ + "Keep working...")) + +#define MAKU_ASLEEP_DLG_9 (_( \ + " Zzznarr... Zzz...\n" \ + "This dojo...\n" \ + "Help rescue teams...{EXTRA_MSG}" \ + " Zzznarr... Urr...\n" \ + "Train in different rooms to level up...{EXTRA_MSG}" \ + " Zzznarr... Urr!\n" \ + "Make stronger rescue team...{EXTRA_MSG}" \ + " Urr... Zzznarr!\n" \ + "Don't let up!")) diff --git a/src/data/locale/personality_test1_usa.h b/src/data/locale/personality_test1_usa.h new file mode 100644 index 000000000..d548b2897 --- /dev/null +++ b/src/data/locale/personality_test1_usa.h @@ -0,0 +1,769 @@ +#define HARDY_Q1 (_( \ + "A test is coming up.\n" \ + "How do you study for it?")) + +#define HARDY_Q1_A0 (_("Study hard.")) +#define HARDY_Q1_A1 (_("At the last second.")) +#define HARDY_Q1_A2 (_("Ignore it and play.")) + + + +#define HARDY_Q2 (_("Can you focus on something you like?")) + +#define HARDY_Q2_A0 (_("Yes.")) +#define HARDY_Q2_A1 (_("No. ")) + + + +#define HARDY_Q3 (_( \ + "When the going gets tough, do you get\n" \ + "going?")) + +#define HARDY_Q3_A0 (_("Yes.")) +#define HARDY_Q3_A1 (_("No.")) + + + +#define HARDY_Q4 (_( \ + "There is a bucket. If you put\n" \ + "water in it, how high will you fill it?")) + +#define HARDY_Q4_A0 (_("Full.")) +#define HARDY_Q4_A1 (_("Half.")) +#define HARDY_Q4_A2 (_("A little.")) + + + +#define DOCILE_Q1 (_( \ + "You are offered a choice of two gifts.\n" \ + "Which one will you take?")) + +#define DOCILE_Q1_A0 (_("Big box.")) +#define DOCILE_Q1_A1 (_("Small box.")) + + + +#define DOCILE_Q2 (_( \ + "You broke a rotten egg in your room!\n" \ + "What will you do?")) + +#define DOCILE_Q2_A0 (_("Open a window right away.")) +#define DOCILE_Q2_A1 (_("Take a sniff first.")) + + + +#define DOCILE_Q3 (_( \ + "A friend brought over something you'd\n" \ + "forgotten.{WAIT_PRESS}\n" \ + "How do you thank your friend?")) + +#define DOCILE_Q3_A0 (_("Say thank you regularly.")) +#define DOCILE_Q3_A1 (_("Say thanks with a joke.")) +#define DOCILE_Q3_A2 (_("Say thanks, but be cool.")) + + + +#define DOCILE_Q4 (_("There is a wallet at the side of a road.")) + +#define DOCILE_Q4_A0 (_("Turn it in to the police!")) +#define DOCILE_Q4_A1 (_("Yay! Yay!")) +#define DOCILE_Q4_A2 (_("Is anyone watching...?")) + + + +#define BRAVE_Q1 (_( \ + "You're going bungee jumping for the first\n" \ + "time.{EXTRA_MSG}Since it's scary, you decide to test the\n" \ + "jump with a doll...{WAIT_PRESS}\n" \ + "And the bungee cord snaps!{EXTRA_MSG}" \ + "Will you still try to make a jump anyway?")) + +#define BRAVE_Q1_A0 (_("Yes.")) +#define BRAVE_Q1_A1 (_("No.")) + + + +#define BRAVE_Q2A (_( \ + "There is an alien invasion!\n" \ + "What will you do?")) + +#define BRAVE_Q2A_A0 (_("Fight.")) +#define BRAVE_Q2A_A1 (_("Run.")) +#define BRAVE_Q2A_A2 (_("Ignore it.")) + + + +#define BRAVE_Q2B (_( \ + "You valiantly fight the aliens...{WAIT_PRESS}\n" \ + "But, you are defeated...{EXTRA_MSG}An alien says to you...{EXTRA_MSG}“YOU HAVE IMPRESSED US.\n" \ + "IT WAS A PLEASURE TO SEE.{EXTRA_MSG}JOIN US, AND TOGETHER WE SHALL\n" \ + "RULE THE WORLD.”{WAIT_PRESS}\n" \ + "What will you do?")) + +#define BRAVE_Q2B_A0 (_("Rule with the aliens.")) +#define BRAVE_Q2B_A1 (_("Refuse.")) + + + +#define BRAVE_Q3 (_( \ + "There is a scream from behind a door!{WAIT_PRESS}\n" \ + "How will you react?")) + +#define BRAVE_Q3_A0 (_("Yank open the door.")) +#define BRAVE_Q3_A1 (_("Scream in unison.")) + + + +#define BRAVE_Q4 (_( \ + "A delinquent is hassling a girl on\n" \ + "a busy city street!{WAIT_PRESS}\n" \ + "What will you do?")) + +#define BRAVE_Q4_A0 (_("Help without hesitation.")) +#define BRAVE_Q4_A1 (_("Help, even if scared.")) +#define BRAVE_Q4_A2 (_("Call the police.")) +#define BRAVE_Q4_A3 (_("Do nothing out of fear.")) + + + +#define JOLLY_Q1 (_("Are you a cheerful personality?")) + +#define JOLLY_Q1_A0 (_("Yes.")) +#define JOLLY_Q1_A1 (_("No.")) + + + +#define JOLLY_Q2 (_( \ + "Do you like to noisily enjoy yourself\n" \ + "with others?")) + +#define JOLLY_Q2_A0 (_("Yes.")) +#define JOLLY_Q2_A1 (_("No.")) + + + +#define JOLLY_Q3 (_( \ + "It's the summer holidays!\n" \ + "Where would you like to go?")) + +#define JOLLY_Q3_A0 (_("The beach!")) +#define JOLLY_Q3_A1 (_("Spas.")) +#define JOLLY_Q3_A2 (_("Anywhere.")) + + + +#define JOLLY_Q4 (_( \ + "A foreign person has started up a\n" \ + "conversation with you.{EXTRA_MSG}" \ + "To be honest, you don't have a clue what\n" \ + "this fellow is saying.{WAIT_PRESS}\n" \ + "How do you reply?")) + +#define JOLLY_Q4_A0 (_("Haha! Yes. Very funny!")) +#define JOLLY_Q4_A1 (_("Um... Could you say that again?")) +#define JOLLY_Q4_A2 (_("Right... Well, I gotta go.")) + + + +#define IMPISH_Q1 (_("Have you ever made a pitfall trap?")) + +#define IMPISH_Q1_A0 (_("Yes.")) +#define IMPISH_Q1_A1 (_("No.")) + + + +#define IMPISH_Q2 (_("Do you like pranks?")) + +#define IMPISH_Q2_A0 (_("Yes.")) +#define IMPISH_Q2_A1 (_("No.")) + + + +#define IMPISH_Q3 (_("Are there many things that you would like\nto do?")) + +#define IMPISH_Q3_A0 (_("Yes.")) +#define IMPISH_Q3_A1 (_("No.")) + + + +#define IMPISH_Q4 (_( \ + "Your friend is being bullied!\n" \ + "What do you do?")) + +#define IMPISH_Q4_A0 (_("Face up to the bully.")) +#define IMPISH_Q4_A1 (_("Caution the bully from afar.")) +#define IMPISH_Q4_A2 (_("Heckle the bully from behind.")) + + + +#define NAIVE_Q1 (_("Do you like groan-inducing puns?")) + +#define NAIVE_Q1_A0 (_("Love them!")) +#define NAIVE_Q1_A1 (_("A little.")) +#define NAIVE_Q1_A2 (_("Spare me.")) + + + +#define NAIVE_Q2 (_("Do you tend to laugh a lot?")) + +#define NAIVE_Q2_A0 (_("Yes.")) +#define NAIVE_Q2_A1 (_("No.")) + + + +#define NAIVE_Q3 (_("Do others often call you childish?")) + +#define NAIVE_Q3_A0 (_("Yes.")) +#define NAIVE_Q3_A1 (_("No.")) + + + +#define NAIVE_Q4 (_( \ + "Do you like to imagine things for your\n" \ + "amusement?")) + +#define NAIVE_Q4_A0 (_("Yes.")) +#define NAIVE_Q4_A1 (_("No.")) + + + +#define TIMID_Q1 (_( \ + "A human hand extends out of a toilet!\n" \ + "What would you do?")) + +#define TIMID_Q1_A0 (_("Scream and run.")) +#define TIMID_Q1_A1 (_("Close the lid without a word.")) +#define TIMID_Q1_A2 (_("Shake hands with it.")) + + + +#define TIMID_Q2 (_( \ + "Grab any digit on your left hand with your\n" \ + "right hand.{WAIT_PRESS}\n" \ + "Which digit did you grab?")) + +#define TIMID_Q2_A0 (_("Thumb.")) +#define TIMID_Q2_A1 (_("Index finger.")) +#define TIMID_Q2_A2 (_("Middle finger.")) +#define TIMID_Q2_A3 (_("Ring finger.")) +#define TIMID_Q2_A4 (_("Little finger.")) + + + +#define TIMID_Q3 (_( \ + "You are suddenly locked inside a\n" \ + "pitch-black room!{WAIT_PRESS}\n" \ + "What do you do?")) + +#define TIMID_Q3_A0 (_("Kick the door.")) +#define TIMID_Q3_A1 (_("Cry.")) +#define TIMID_Q3_A2 (_("Clean it.")) + + + +#define TIMID_Q4 (_("Can you go into a haunted house?")) + +#define TIMID_Q4_A0 (_("No problem!")) +#define TIMID_Q4_A1 (_("Uh... N-no...")) +#define TIMID_Q4_A2 (_("With someone I like.")) + + + +#define HASTY_Q1 (_( \ + "You receive a gift!{WAIT_PRESS}\n" \ + "But you don't know what's in it.{WAIT_PRESS}\n" \ + "You're curious, so what do you do?")) + +#define HASTY_Q1_A0 (_("Open it now.")) +#define HASTY_Q1_A1 (_("Open it later.")) +#define HASTY_Q1_A2 (_("Get someone to open it.")) + + + +#define HASTY_Q2 (_( \ + "You win a lottery!{WAIT_PRESS}\n" \ + "What do you do with the money?")) + +#define HASTY_Q2_A0 (_("Spend it now.")) +#define HASTY_Q2_A1 (_("Save it.")) +#define HASTY_Q2_A2 (_("Give it away.")) + + + +#define HASTY_Q3 (_( \ + "You come across a treasure chest!\n" \ + "What do you do?")) + +#define HASTY_Q3_A0 (_("Open it right away!")) +#define HASTY_Q3_A1 (_("No... Could be a trap...")) +#define HASTY_Q3_A2 (_("It's going to be empty...")) + + + +#define HASTY_Q4 (_( \ + "Your friend fails to show up for a meeting\n" \ + "at the promised time.\n" \ + "What do you do?")) + +#define HASTY_Q4_A0 (_("Become irritated.")) +#define HASTY_Q4_A1 (_("Wait patiently.")) +#define HASTY_Q4_A2 (_("Get angry and bail.")) + + + +#define SASSY_Q1 (_( \ + "Your country's leader is in front of you.\n" \ + "How do you speak to him or her?")) + +#define SASSY_Q1_A0 (_("Speak calmly.")) +#define SASSY_Q1_A1 (_("Speak nervously.")) +#define SASSY_Q1_A2 (_("WHATEVER!!")) + + + +#define SASSY_Q2 (_("Do others tell you to watch what you say?")) + +#define SASSY_Q2_A0 (_("Yes.")) +#define SASSY_Q2_A1 (_("No.")) + + + +#define SASSY_Q3 (_( \ + "Do you think you are cool?\n" \ + "Be honest.")) + +#define SASSY_Q3_A0 (_("Yes.")) +#define SASSY_Q3_A1 (_("No.")) + + + +#define SASSY_Q4 (_( \ + "Can you sincerely thank someone when you\n" \ + "feel grateful?")) + +#define SASSY_Q4_A0 (_("Yes.")) +#define SASSY_Q4_A1 (_("No.")) + + + +#define CALM_Q1 (_( \ + "Do you occasionally consider yourself\n" \ + "dull and overly cautious?")) + +#define CALM_Q1_A0 (_("Yes.")) +#define CALM_Q1_A1 (_("No.")) + + + +#define CALM_Q2 (_( \ + "Do you dream of lounging around idly\n" \ + "without much excitement?")) + +#define CALM_Q2_A0 (_("Yes.")) +#define CALM_Q2_A1 (_("No.")) + + + +#define CALM_Q3 (_("Do you like to fight?")) + +#define CALM_Q3_A0 (_("Yes.")) +#define CALM_Q3_A1 (_("No.")) + + + +#define CALM_Q4 (_("Do you often yawn?")) + +#define CALM_Q4_A0 (_("Yes.")) +#define CALM_Q4_A1 (_("No.")) + + + +#define RELAXED_Q1 (_("Are you often late for school or meetings?")) + +#define RELAXED_Q1_A0 (_("Yes.")) +#define RELAXED_Q1_A1 (_("No.")) + + + +#define RELAXED_Q2 (_( \ + "Do you get the feeling that you've slowed\n" \ + "down lately?")) + +#define RELAXED_Q2_A0 (_("Yes.")) +#define RELAXED_Q2_A1 (_("No.")) + + + +#define RELAXED_Q3 (_( \ + "It is a pleasant day at the beach.\n" \ + "How do you feel?")) + +#define RELAXED_Q3_A0 (_("This feels great!")) +#define RELAXED_Q3_A1 (_("Snore...")) +#define RELAXED_Q3_A2 (_("I want to go home soon!")) + + + +#define RELAXED_Q4 (_("Do you fall asleep without noticing?")) + +#define RELAXED_Q4_A0 (_("Yes.")) +#define RELAXED_Q4_A1 (_("No.")) + + + +#define LONELY_Q1 (_("Do you feel lonesome when you are alone?")) + +#define LONELY_Q1_A0 (_("Yes.")) +#define LONELY_Q1_A1 (_("No.")) + + + +#define LONELY_Q2 (_( \ + "Do you hate to be the last person to leave\n" \ + "class at the end of a school day?")) + +#define LONELY_Q2_A0 (_("Yes.")) +#define LONELY_Q2_A1 (_("No.")) + + + +#define LONELY_Q3 (_( \ + "What do you do with your room's light\n" \ + "when you're going to bed at night?")) + +#define LONELY_Q3_A0 (_("Leave it on.")) +#define LONELY_Q3_A1 (_("Turn it off.")) + + + +#define LONELY_Q4 (_( \ + "It's a weekend, but no one will play\n" \ + "with you...\n" \ + "What do you do?")) + +#define LONELY_Q4_A0 (_("Go on a trip.")) +#define LONELY_Q4_A1 (_("Hang around vacantly.")) +#define LONELY_Q4_A2 (_("Huddle in a corner.")) + + + +#define QUIRKY_Q1 (_( \ + "Do you sometimes run out of things to do\n" \ + "all of a sudden?")) + +#define QUIRKY_Q1_A0 (_("Yes.")) +#define QUIRKY_Q1_A1 (_("No.")) + + + +#define QUIRKY_Q2 (_("How quickly do you respond to an e-mail?")) + +#define QUIRKY_Q2_A0 (_("Reply right away.")) +#define QUIRKY_Q2_A1 (_("May reply, may not.")) +#define QUIRKY_Q2_A2 (_("Too much trouble.")) + + + +#define QUIRKY_Q3 (_( \ + "There is a person you like...{WAIT_PRESS}\n" \ + "But there's no opportunity to get close.\n" \ + "What do you do?")) + +#define QUIRKY_Q3_A0 (_("Bravely declare my love.")) +#define QUIRKY_Q3_A1 (_("Might say hello...")) +#define QUIRKY_Q3_A2 (_("Pull a prank to get attention.")) +#define QUIRKY_Q3_A3 (_("Look from afar.")) + + + +#define QUIRKY_Q4 (_( \ + "The road forks to the right and left.\n" \ + "You are told there is a treasure on the\n" \ + "right side. What do you do?")) + +#define QUIRKY_Q4_A0 (_("Instantly go right.")) +#define QUIRKY_Q4_A1 (_("It's a trap! Go left.")) +#define QUIRKY_Q4_A2 (_("Choose either side.")) + + + +#define MISC_Q1 (_("On vacation outings, you want to...")) + +#define MISC_Q1_A0 (_("Go alone.")) +#define MISC_Q1_A1 (_("Go with others.")) + + + +#define MISC_Q2 (_( \ + "It's the summer festival!\n" \ + "Do you like carnivals?")) + +#define MISC_Q2_A0 (_("Love them!")) +#define MISC_Q2_A1 (_("Don't care.")) + + + +#define MISC_Q3 (_( \ + "Somebody calls you “weird but funny.”\n" \ + "How does that make you feel?")) + +#define MISC_Q3_A0 (_("Happy!")) +#define MISC_Q3_A1 (_("Not happy.")) + + + +#define DESC_HARDY (_( \ + "{CENTER_ALIGN}You appear to be...{WAIT_PRESS}\n" \ + "{CENTER_ALIGN}The hardy type.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You do your homework diligently,\n" \ + "{CENTER_ALIGN}and you know to eat properly.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You have strong willpower that lets\n" \ + "{CENTER_ALIGN}you complete tasks, however tough.{EXTRA_MSG}" \ + "{CENTER_ALIGN}But, you can also be stubborn to the\n" \ + "{CENTER_ALIGN}point of even feuding with friends...{EXTRA_MSG}" \ + "{CENTER_ALIGN}Nothing will go right for you when you're\n" \ + "{CENTER_ALIGN}irritated, so learn to laugh it off.{EXTRA_MSG}" \ + "{CENTER_ALIGN}A hardy person like you should be...")) + +#define DESC_DOCILE (_( \ + "{CENTER_ALIGN}You appear to be...{WAIT_PRESS}\n" \ + "{CENTER_ALIGN}The docile type.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You're very kindhearted.{WAIT_PRESS}\n" \ + "{CENTER_ALIGN}Very helpful.{WAIT_PRESS}\n" \ + "{CENTER_ALIGN}You can make friends with anyone.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You're a wonderful person.{EXTRA_MSG}" \ + "{CENTER_ALIGN}......{WAIT_PRESS}Is that going overboard?{WAIT_PRESS}\n" \ + "{CENTER_ALIGN}I don't think so.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You yourself should be\n" \ + "{CENTER_ALIGN}the best judge of that.{EXTRA_MSG}" \ + "{CENTER_ALIGN}A docile person like you should be...")) + +#define DESC_BRAVE (_( \ + "{CENTER_ALIGN}You appear to be...{WAIT_PRESS}\n" \ + "{CENTER_ALIGN}The brave type.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You have a strong sense of justice.{WAIT_PRESS}\n" \ + "{CENTER_ALIGN}You hate evil.{WAIT_PRESS}\n" \ + "{CENTER_ALIGN}You will take on any opponent.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You are truly a hero!{EXTRA_MSG}" \ + "{CENTER_ALIGN}Go forth!{EXTRA_MSG}" \ + "{CENTER_ALIGN}For justice...{WAIT_PRESS}\n" \ + "{CENTER_ALIGN}For peace on earth...{WAIT_PRESS}\n" \ + "{CENTER_ALIGN}Fight the forces of evil!{EXTRA_MSG}" \ + "{CENTER_ALIGN}......{WAIT_PRESS}If I'm wrong...{WAIT_PRESS}\n" \ + "{CENTER_ALIGN}Work at becoming a true hero!{EXTRA_MSG}" \ + "{CENTER_ALIGN}A brave person like you should be...")) + +#define DESC_JOLLY (_( \ + "{CENTER_ALIGN}You appear to be...{WAIT_PRESS}\n" \ + "{CENTER_ALIGN}The jolly type.{EXTRA_MSG}" \ + "{CENTER_ALIGN}Always laughing and smiling,\n" \ + "{CENTER_ALIGN}you uplift everyone around you.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You love jokes!{EXTRA_MSG}" \ + "{CENTER_ALIGN}You have lots of friends, and\n" \ + "{CENTER_ALIGN}you're popular wherever you go.{EXTRA_MSG}" \ + "{CENTER_ALIGN}But sometimes you get carried away\n" \ + "{CENTER_ALIGN}and say things that get you in trouble.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You should learn to think before\n" \ + "{CENTER_ALIGN}saying or doing anything.{EXTRA_MSG}" \ + "{CENTER_ALIGN}A jolly person like you should be...")) + +#define DESC_IMPISH (_( \ + "{CENTER_ALIGN}You appear to be...{WAIT_PRESS}\n" \ + "{CENTER_ALIGN}The impish type.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You're playful, cheerful,\n" \ + "{CENTER_ALIGN}and you love pranks.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You're also kindhearted.{EXTRA_MSG}" \ + "{CENTER_ALIGN}That's why the people around\n" \ + "{CENTER_ALIGN}you find you so irresistible.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You must be the most\n" \ + "{CENTER_ALIGN}popular person around!{EXTRA_MSG}" \ + "{CENTER_ALIGN}Oh?{WAIT_PRESS} You're not that popular?{WAIT_PRESS}\n" \ + "{CENTER_ALIGN}You're either being modest...\n" \ + "{CENTER_ALIGN}or you just don't notice it.{EXTRA_MSG}" \ + "{CENTER_ALIGN}I bet people are just too shy\n" \ + "{CENTER_ALIGN}to let their feelings be known.{EXTRA_MSG}" \ + "{CENTER_ALIGN}There's someone out there who's\n" \ + "{CENTER_ALIGN}afraid to declare their love for you!{EXTRA_MSG}" \ + "{CENTER_ALIGN}An impish person like you should be...")) + +#define DESC_NAIVE (_( \ + "{CENTER_ALIGN}You appear to be...{WAIT_PRESS}\n" \ + "{CENTER_ALIGN}The naive type.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You are highly curious,\n" \ + "{CENTER_ALIGN}and you love rare things.{EXTRA_MSG}" \ + "{CENTER_ALIGN}Your cheerful and carefree\n" \ + "{CENTER_ALIGN}attitude should make things fun\n" \ + "{CENTER_ALIGN}for the people around you.{EXTRA_MSG}" \ + "{CENTER_ALIGN}But you do have one flaw.\n" \ + "{CENTER_ALIGN}You can be childish.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You can never sit still.\n" \ + "{CENTER_ALIGN}You're always on the move.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You can also be selfish,\n" \ + "{CENTER_ALIGN}so you should watch yourself.{EXTRA_MSG}" \ + "{CENTER_ALIGN}A naive person like you should be...")) + +#define DESC_TIMID (_( \ + "{CENTER_ALIGN}You appear to be...{WAIT_PRESS}\n" \ + "{CENTER_ALIGN}The timid type.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You may find it hard to go\n" \ + "{CENTER_ALIGN}to the washroom at night.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You may also find it too frightening\n" \ + "{CENTER_ALIGN}to go back to school to get something\n" \ + "{CENTER_ALIGN}you left behind in class.{EXTRA_MSG}" \ + "{CENTER_ALIGN}If you're ever walking on a dark\n" \ + "{CENTER_ALIGN}street at night, you probably turn\n" \ + "{CENTER_ALIGN}around often to check behind you.{EXTRA_MSG}" \ + "{CENTER_ALIGN}But your timid nature is\n" \ + "{CENTER_ALIGN}also your good point!{EXTRA_MSG}" \ + "{CENTER_ALIGN}Because those who know fear are\n" \ + "{CENTER_ALIGN}those who know true courage.{EXTRA_MSG}" \ + "{CENTER_ALIGN}A timid person like you should be...")) + +#define DESC_HASTY (_( \ + "{CENTER_ALIGN}You appear to be...{WAIT_PRESS}\n" \ + "{CENTER_ALIGN}The hasty type.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You like to take charge\n" \ + "{CENTER_ALIGN}and get things done.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You're a real go-getter.{EXTRA_MSG}" \ + "{CENTER_ALIGN}But are you also stressed out?{EXTRA_MSG}" \ + "{CENTER_ALIGN}You get irritated when your\n" \ + "{CENTER_ALIGN}friends don't show up on time.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You get frustrated when things\n" \ + "{CENTER_ALIGN}don't turn out the way you expect.{EXTRA_MSG}" \ + "{CENTER_ALIGN}Maybe you jab the elevator button\n" \ + "{CENTER_ALIGN}if the elevator is slow to arrive.{EXTRA_MSG}" \ + "{CENTER_ALIGN}...Maybe you're already jabbing\n" \ + "{CENTER_ALIGN}the A Button repeatedly now.{EXTRA_MSG}" \ + "{CENTER_ALIGN}Beware--getting too easily irritated\n" \ + "{CENTER_ALIGN}just isn't good for your well-being.{EXTRA_MSG}" \ + "{CENTER_ALIGN}A hasty person like you should be...")) + +#define DESC_SASSY (_( \ + "{CENTER_ALIGN}You appear to be...{WAIT_PRESS}\n" \ + "{CENTER_ALIGN}The sassy type.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You tend to be somewhat cynical.{EXTRA_MSG}" \ + "{CENTER_ALIGN}Despite that, there is something\n" \ + "{CENTER_ALIGN}appealing and lovable about you.{EXTRA_MSG}" \ + "{CENTER_ALIGN}But do you occasionally say something\n" \ + "{CENTER_ALIGN}arrogant that angers others?{EXTRA_MSG}" \ + "{CENTER_ALIGN}Do you make that mistake?{EXTRA_MSG}" \ + "{CENTER_ALIGN}Or have people called you\n" \ + "{CENTER_ALIGN}conceited, vain, or selfish?{EXTRA_MSG}" \ + "{CENTER_ALIGN}Have people said that about you?{EXTRA_MSG}" \ + "{CENTER_ALIGN}Huh?{WAIT_PRESS} You're telling me to get lost?{EXTRA_MSG}" \ + "{CENTER_ALIGN}Why, you... Come here and say that!{WAIT_PRESS}\n" \ + "{CENTER_ALIGN}......Gasp!{EXTRA_MSG}" \ + "{CENTER_ALIGN}...I'm sorry.\n" \ + "{CENTER_ALIGN}I let my feelings run away.\n" \ + "{CENTER_ALIGN}I truly regret this, really.{EXTRA_MSG}" \ + "{CENTER_ALIGN}Anyway, your cool and aloof\n" \ + "{CENTER_ALIGN}attitude is what defines you.{EXTRA_MSG}" \ + "{CENTER_ALIGN}It makes you exasperating and\n" \ + "{CENTER_ALIGN}appealing at the same time.{EXTRA_MSG}" \ + "{CENTER_ALIGN}A sassy person like you should be...")) + +#define DESC_CALM (_( \ + "{CENTER_ALIGN}You appear to be...{WAIT_PRESS}\n" \ + "{CENTER_ALIGN}The calm type.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You're capable of giving advice\n" \ + "{CENTER_ALIGN}to friends with worries.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You don't like to fight.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You're a warm, kindhearted\n" \ + "{CENTER_ALIGN}person who cares.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You must have many friends\n" \ + "{CENTER_ALIGN}who look up to you.{EXTRA_MSG}" \ + "{CENTER_ALIGN}However...{WAIT_PRESS}\n" \ + "{CENTER_ALIGN}You may also be somewhat gullible...{EXTRA_MSG}" \ + "{CENTER_ALIGN}As well as a little careless...{EXTRA_MSG}" \ + "{CENTER_ALIGN}And even a little sloppy.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You might want to keep\n" \ + "{CENTER_ALIGN}those points in mind.{EXTRA_MSG}" \ + "{CENTER_ALIGN}A calm person like you should be...")) + +#define DESC_RELAXED (_( \ + "{CENTER_ALIGN}You appear to be...{WAIT_PRESS}\n" \ + "{CENTER_ALIGN}The relaxed type.{EXTRA_MSG}" \ + "{CENTER_ALIGN}Do you occasionally\n" \ + "{CENTER_ALIGN}zone out and miss a bus?{EXTRA_MSG}" \ + "{CENTER_ALIGN}Or do you find yourself dozing off?{EXTRA_MSG}" \ + "{CENTER_ALIGN}Or is your reaction time\n" \ + "{CENTER_ALIGN}a little slower than others?{EXTRA_MSG}" \ + "{CENTER_ALIGN}But that's not necessarily\n" \ + "{CENTER_ALIGN}a bad thing.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You can do things at your own\n" \ + "{CENTER_ALIGN}tempo without feeling pressured.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You can live in a relaxed and\n" \ + "{CENTER_ALIGN}unhurried manner without worries.{EXTRA_MSG}" \ + "{CENTER_ALIGN}I think that's a happy\n" \ + "{CENTER_ALIGN}lifestyle to be envied, even.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You're also surprisingly popular.{EXTRA_MSG}" \ + "{CENTER_ALIGN}The way you vacantly stare\n" \ + "{CENTER_ALIGN}off into the distance...{EXTRA_MSG}" \ + "{CENTER_ALIGN}It should make that someone\n" \ + "{CENTER_ALIGN}special's pulse race.{EXTRA_MSG}" \ + "{CENTER_ALIGN}A relaxed person like you should be...")) + +#define DESC_LONELY (_( \ + "{CENTER_ALIGN}You appear to be...{WAIT_PRESS}\n" \ + "{CENTER_ALIGN}The lonely type.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You always act cheerful and\n" \ + "{CENTER_ALIGN}jocular around other people.{EXTRA_MSG}" \ + "{CENTER_ALIGN}But that's only because\n" \ + "{CENTER_ALIGN}you are with other people.{EXTRA_MSG}" \ + "{CENTER_ALIGN}However, when you get alone...{EXTRA_MSG}" \ + "{CENTER_ALIGN}Do you find yourself\n" \ + "{CENTER_ALIGN}feeling oddly depressed?{EXTRA_MSG}" \ + "{CENTER_ALIGN}That's why you always\n" \ + "{CENTER_ALIGN}want to be with others.{EXTRA_MSG}" \ + "{CENTER_ALIGN}But if you go around feeling\n" \ + "{CENTER_ALIGN}depressed too much...{EXTRA_MSG}" \ + "{CENTER_ALIGN}Your nutritional balance goes out\n" \ + "{CENTER_ALIGN}of wack. Eat more vegetables!{EXTRA_MSG}" \ + "{CENTER_ALIGN}However...{WAIT_PRESS}\n" \ + "{CENTER_ALIGN}It's not a bad thing\n" \ + "{CENTER_ALIGN}to feel lonely.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You know what it's like when you aren't\n" \ + "{CENTER_ALIGN}alone, so that's why you feel lonesome.{EXTRA_MSG}" \ + "{CENTER_ALIGN}And that's why you aren't really alone.{EXTRA_MSG}" \ + "{CENTER_ALIGN}A lonely person like you should be...")) + +#define DESC_QUIRKY (_( \ + "{CENTER_ALIGN}You appear to be...{WAIT_PRESS}\n" \ + "{CENTER_ALIGN}The quirky type.{EXTRA_MSG}" \ + "{CENTER_ALIGN}People consider you an eccentric\n" \ + "{CENTER_ALIGN}who does things at your own pace.{EXTRA_MSG}" \ + "{CENTER_ALIGN}You never break tempo.{EXTRA_MSG}" \ + "{CENTER_ALIGN}Your carefree nature makes you\n" \ + "{CENTER_ALIGN}attractive. But you also happen\n" \ + "{CENTER_ALIGN}to be somewhat childish...{EXTRA_MSG}" \ + "{CENTER_ALIGN}You are fickle and cause problems for the\n" \ + "{CENTER_ALIGN}people who have to go along with you.{EXTRA_MSG}" \ + "{CENTER_ALIGN}Maybe people are even upset\n" \ + "{CENTER_ALIGN}with you for being so fickle?{EXTRA_MSG}" \ + "{CENTER_ALIGN}If you realize how selfishly\n" \ + "{CENTER_ALIGN}you're behaving, try to think\n" \ + "{CENTER_ALIGN}before you do anything rash.{EXTRA_MSG}" \ + "{CENTER_ALIGN}A quirky person like you should be...")) + +#define GENDER_Q (_("Are you a boy or a girl?")) + +#define GENDER_A0 (_("Boy.")) +#define GENDER_A1 (_("Girl.")) + +#define STARTER_REVEAL (_( \ + "\n" \ + "{CENTER_ALIGN}The Pokémon {POKEMON_0}!")) + +#define PARTNER_PROMPT (_( \ + "{CENTER_ALIGN}This is the final step.{WAIT_PRESS}\n" \ + "{CENTER_ALIGN}Who would you like to have as a partner?{EXTRA_MSG}" \ + "{CENTER_ALIGN}Choose the Pokémon you want\n" \ + "{CENTER_ALIGN}as your partner from this group.")) + +#define PARTNER_NICK_PROMPT (_("{CENTER_ALIGN}What is your partner's nickname?")) + +#define END_TEXT (_( \ + "{CENTER_ALIGN}OK! We're all set!{EXTRA_MSG}" \ + "{CENTER_ALIGN}Let's get you into the\n" \ + "{CENTER_ALIGN}world of Pokémon!{EXTRA_MSG}" \ + "{CENTER_ALIGN}Go for it!")) diff --git a/src/data/locale/wigglytuff_shop_usa.h b/src/data/locale/wigglytuff_shop_usa.h new file mode 100644 index 000000000..f30ad0c46 --- /dev/null +++ b/src/data/locale/wigglytuff_shop_usa.h @@ -0,0 +1,246 @@ +#define WIGGLY_AWAKE_DLG_00 (_( \ + " Friends are my treasures!\n" \ + "Welcome to the {POKEMON_6} Club--\n" \ + "a circle of friends! ")) + +#define WIGGLY_AWAKE_DLG_01 (_( \ + " Anything else I can do for\n" \ + "you?")) + +#define WIGGLY_AWAKE_DLG_02 (_( \ + " Thank you! Come again!\n" \ + "We're all friends, friend!")) + +#define WIGGLY_AWAKE_DLG_03 (_( \ + " You'd like to add to your\n" \ + "Friend Areas?\n" \ + "Which one would you like?")) + +#define WIGGLY_AWAKE_DLG_04 (_( \ + " Would you like to add\n" \ + "other Friend Areas?")) + +#define WIGGLY_AWAKE_DLG_05 (_( \ + " {COLOR GREEN}{FRIEND_AREA}{RESET}?\n" \ + "That will be {COLOR CYAN}{VALUE_0}{RESET} {POKE}.\n" \ + "Is that OK?")) + +#define WIGGLY_AWAKE_DLG_06 (_( \ + " Gotcha! Let's do it!{WAIT_PRESS}\n" \ + "{POKEMON_6}〜♪ {POKEMON_6}〜♪{WAIT_PRESS}\n" \ + "Let's be friends... Yoomtaaaaaaah!")) + +#define WIGGLY_AWAKE_DLG_07 (_( \ + " Congratulations!{WAIT_PRESS}\n" \ + "You can go to {COLOR GREEN}{FRIEND_AREA}{RESET} now!{EXTRA_MSG}" \ + " You can recruit\n" \ + "Pokémon that live in the Friend Area\n" \ + "{COLOR GREEN}{FRIEND_AREA}{RESET}.")) + +#define WIGGLY_AWAKE_DLG_08 (_( \ + " Oops!{WAIT_PRESS}\n" \ + "You can't add to your Friend Areas.")) + +#define WIGGLY_AWAKE_DLG_09 (_( \ + " Um?{WAIT_PRESS}\n" \ + "You don't have any money.")) + +#define WIGGLY_AWAKE_DLG_10 (_( \ + " Oops?{WAIT_PRESS}\n" \ + "Oh, too bad.{WAIT_PRESS}\n" \ + "I'm fresh out of Friend Areas.")) + +#define WIGGLY_AWAKE_DLG_11 (_( \ + " Oops?{WAIT_PRESS}\n" \ + "It doesn't look like you have enough\n" \ + "money!")) + +#define WIGGLY_AWAKE_DLG_12 (_( \ + " Which Pokémon would you\n" \ + "like to check?")) + +#define WIGGLY_AWAKE_DLG_13 (_( \ + " Is there another Pokémon\n" \ + "you'd like to check?")) + +#define WIGGLY_AWAKE_DLG_14 (_( \ + " {COLOR CYAN}{POKEMON_0}{RESET}'s Friend Area\n" \ + "is {COLOR GREEN}{FRIEND_AREA}{RESET}.")) + +#define WIGGLY_AWAKE_DLG_15 (_( \ + " You can already go to the\n" \ + "Friend Area {COLOR GREEN}{FRIEND_AREA}{RESET}.")) + +#define WIGGLY_AWAKE_DLG_16 (_( \ + " {COLOR GREEN}{FRIEND_AREA}{RESET}?\n" \ + "I don't know much about it at all.{WAIT_PRESS}\n" \ + "I'll check up on it.{EXTRA_MSG}" \ + " I'll add it to the Friend\n" \ + "Areas you can buy when I find out more.")) + +#define WIGGLY_AWAKE_DLG_17 (_( \ + " {COLOR GREEN}{FRIEND_AREA}{RESET}?\n" \ + "I can't get that Friend Area for you.{WAIT_PRESS}\n" \ + "I'm really sorry.")) + +#define WIGGLY_AWAKE_DLG_18 (_( \ + " {COLOR GREEN}{FRIEND_AREA}{RESET}?\n" \ + "I can't get that Friend Area for you.{WAIT_PRESS}\n" \ + "I'm really sorry.")) + +#define WIGGLY_AWAKE_DLG_19 (_( \ + " Would you like to get more\n" \ + "friends...{WAIT_PRESS}\n" \ + "...More members for your team?{EXTRA_MSG}" \ + " To add new friends, what\n" \ + "you need are Friend Areas.{EXTRA_MSG}" \ + " A Pokémon can join your\n" \ + "rescue team only after it settles in\n" \ + "the right Friend Area.{EXTRA_MSG}" \ + " So, if you want to recruit\n" \ + "new members, you should add to your\n" \ + "Friend Areas.{EXTRA_MSG}" \ + " Oh, yes, Pokémon can\n" \ + "only live in the right Friend Area for\n" \ + "their species.{EXTRA_MSG}" \ + " If you're buying a Friend\n" \ + "Area, you should confirm what Pokémon\n" \ + "can live there by checking {COLOR YELLOW}Info{RESET}.{EXTRA_MSG}" \ + " Also, there are some Friend\n" \ + "Areas that I don't sell.{EXTRA_MSG}" \ + " I think there are some\n" \ + "rescue missions that give you access\n" \ + "to Friend Areas, too.{EXTRA_MSG}" \ + " You should check the\n" \ + "Pelipper Post Office's Bulletin Board or\n" \ + "your Mailbox for rescue requests.{EXTRA_MSG}" \ + " You know, it makes me\n" \ + "delighted when you make new friends!")) + + +#define WIGGLY_ASLEEP_DLG_00 (_( \ + " Friends... Zzz...\n" \ + "Welcome to the {POKEMON_6} Club...")) + +#define WIGGLY_ASLEEP_DLG_01 (_( \ + " Anything? Kwoo...\n" \ + "Anything else?")) + +#define WIGGLY_ASLEEP_DLG_02 (_( \ + " Thank... Zzz... You...\n" \ + "Friends, friend...")) + +#define WIGGLY_ASLEEP_DLG_03 (_( \ + " Dwee... Hunh?\n" \ + "Friend Areas...?\n" \ + "Which one?")) + +#define WIGGLY_ASLEEP_DLG_04 (_( \ + " Zzz... Wha--?\n" \ + "More Friend Areas?")) + +#define WIGGLY_ASLEEP_DLG_05 (_( \ + " Kwoo? {COLOR GREEN}{FRIEND_AREA}{RESET}?\n" \ + "That's {COLOR CYAN}{VALUE_0}{RESET} {POKE}...\n" \ + "OK?")) + +#define WIGGLY_ASLEEP_DLG_06 (_( \ + " Zzz... Dwee... Gotcha...{WAIT_PRESS}\n" \ + "Zzz... Let's do it...{EXTRA_MSG}" \ + " Sssnore♪ Sssnore♪\n" \ + "{POKEMON_6}〜♪ {POKEMON_6}〜♪\n" \ + "Let's be friends...{EXTRA_MSG}" \ + " Kwoo!\n" \ + "Taaaaaaah!")) + +#define WIGGLY_ASLEEP_DLG_07 (_( \ + " Grats... Zzz...{WAIT_PRESS}\n" \ + "You can go to {COLOR GREEN}{FRIEND_AREA}{RESET}...{EXTRA_MSG}" \ + " Dwee... Sssnore...\n" \ + "Make friends with Pokémon in...\n" \ + "{COLOR GREEN}{FRIEND_AREA}{RESET}...")) + +#define WIGGLY_ASLEEP_DLG_08 (_( \ + " Zzz... Zzz?{WAIT_PRESS}\n" \ + "Hunh...?\n" \ + "You can't add to your Friend Areas...")) + +#define WIGGLY_ASLEEP_DLG_09 (_( \ + " Hunh...?{WAIT_PRESS}\n" \ + "You don't have any money...\n" \ + "Zzzzzz...")) + +#define WIGGLY_ASLEEP_DLG_10 (_( \ + " Zzz... Hunh?{WAIT_PRESS}\n" \ + "Sssnore... Sorry...\n" \ + "Fresh out of Friend Areas...")) + +#define WIGGLY_ASLEEP_DLG_11 (_( \ + " Zzz... Dwee...? Oops?{WAIT_PRESS}\n" \ + "Not enough money?")) + +#define WIGGLY_ASLEEP_DLG_12 (_( \ + " Zzz... Kwoo...\n" \ + "Check which Pokémon?")) + +#define WIGGLY_ASLEEP_DLG_13 (_( \ + " Another Pokémon...\n" \ + "Zzz... Check?")) + +#define WIGGLY_ASLEEP_DLG_14 (_( \ + " Dwee... Kwoo...\n" \ + "{COLOR CYAN}{POKEMON_0}{RESET}'s Friend Area...\n" \ + "Zzz... {COLOR GREEN}{FRIEND_AREA}{RESET}...")) + +#define WIGGLY_ASLEEP_DLG_15 (_( \ + " Sssnore...\n" \ + "You can already go...\n" \ + "Friend Area {COLOR GREEN}{FRIEND_AREA}{RESET}...")) + +#define WIGGLY_ASLEEP_DLG_16 (_( \ + " Zzz... Hunh...?\n" \ + "{COLOR GREEN}{FRIEND_AREA}{RESET}...?\n" \ + "I don't know... I'll check...{EXTRA_MSG}" \ + " Sssnore...\n" \ + "I'll have it for sale...\n" \ + "When I find out...")) + +#define WIGGLY_ASLEEP_DLG_17 (_( \ + " Sssnore...\n" \ + "{COLOR GREEN}{FRIEND_AREA}{RESET}...?\n" \ + "I can't get that Friend Area...{EXTRA_MSG}" \ + " Zzz... Zzz...\n" \ + "Sorry...")) + +#define WIGGLY_ASLEEP_DLG_18 (_( \ + " Sssnore...\n" \ + "{COLOR GREEN}{FRIEND_AREA}{RESET}...?\n" \ + "I can't get that Friend Area...{EXTRA_MSG}" \ + " Zzz... Zzz...\n" \ + "Sorry...")) + +#define WIGGLY_ASLEEP_DLG_19 (_( \ + " Zzz...\n" \ + "Want more friends?{EXTRA_MSG}" \ + " Zzz... Kwoo...\n" \ + "You need Friend Areas for friends...{EXTRA_MSG}" \ + " Zzz... Zzz...\n" \ + "A Pokémon becomes your pal when it's in\n" \ + "the right Friend Area...{EXTRA_MSG}" \ + " Zzz... Dwee...\n" \ + "That's why you should get more Friend\n" \ + "Areas...{EXTRA_MSG}" \ + " Zzz... Pokémon can only\n" \ + "live in the right Friend Area for\n" \ + "their species...{EXTRA_MSG}" \ + " Kwoo... Sssnore...\n" \ + "See what Pokémon can live there by\n" \ + "checking {COLOR YELLOW}Info{RESET}...{EXTRA_MSG}" \ + " Zzz...\n" \ + "I don't sell some Friend Areas...{EXTRA_MSG}" \ + " Kwoo...\n" \ + "Some rescue missions reward you with\n" \ + "Friend Areas...{EXTRA_MSG}" \ + " Zzz... Dwee...\n" \ + "Check the Pelipper Post Office's Bulletin\n" \ + "Board or your Mailbox for missions...")) diff --git a/src/data/main_menu2.h b/src/data/main_menu2.h index a7cb731fa..97e9b4265 100644 --- a/src/data/main_menu2.h +++ b/src/data/main_menu2.h @@ -16,11 +16,10 @@ static const UnkTextStruct2 sUnknown_80E59E0 = { NULL }; -static const MenuItem sUnknown_80E59F8[] = -{ - {"New Game", MENU_NEW_GAME}, - {"Adventure Log", MENU_ADVENTURE_LOG}, - {NULL, 0xffdd}, +static const MenuItem sUnknown_80E59F8[] = { + {_("New Game"), MENU_NEW_GAME}, + {_("Adventure Log"), MENU_ADVENTURE_LOG}, + {NULL, 0xFFDD}, }; UNUSED static const UnkTextStruct2 sUnknown_80E5A29 = { @@ -32,10 +31,9 @@ UNUSED static const UnkTextStruct2 sUnknown_80E5A29 = { NULL }; -UNUSED static const MenuItem sUnknown_80E5A44[] = -{ - {"Wonder Mail", MENU_WONDER_MAIL}, - {NULL, 0xffdd}, +UNUSED static const MenuItem sUnknown_80E5A44[] = { + {_("Wonder Mail"), MENU_WONDER_MAIL}, + {NULL, 0xFFDD}, }; static const UnkTextStruct2 sUnknown_80E5A60 = { @@ -56,25 +54,23 @@ static const UnkTextStruct2 sUnknown_80E5A78 = { NULL }; -static const MenuItem sUnknown_80E5A90[] = -{ - {"Continue", MENU_CONTINUE}, - {"Delete Save Data", MENU_DELETE_SAVE_PROMPT}, - {"Adventure Log", MENU_ADVENTURE_LOG}, - {"Friend Rescue", MENU_FRIEND_RESCUE}, - {"Trade Items", MENU_TRADE_ITEMS}, - {NULL, 0xffdd}, +static const MenuItem sUnknown_80E5A90[] = { + {_("Continue"), MENU_CONTINUE}, + {_("Delete Save Data"), MENU_DELETE_SAVE_PROMPT}, + {_("Adventure Log"), MENU_ADVENTURE_LOG}, + {_("Friend Rescue"), MENU_FRIEND_RESCUE}, + {_("Trade Items"), MENU_TRADE_ITEMS}, + {NULL, 0xFFDD}, }; -static const MenuItem sUnknown_80E5AFC[] = -{ - {"Continue", MENU_CONTINUE}, - {"Delete Save Data", MENU_DELETE_SAVE_PROMPT}, - {"Adventure Log", MENU_ADVENTURE_LOG}, - {"Friend Rescue", MENU_FRIEND_RESCUE}, - {"Trade Items", MENU_TRADE_ITEMS}, - {"Wonder Mail", MENU_WONDER_MAIL}, - {NULL, 0xffdd}, +static const MenuItem sUnknown_80E5AFC[] = { + {_("Continue"), MENU_CONTINUE}, + {_("Delete Save Data"), MENU_DELETE_SAVE_PROMPT}, + {_("Adventure Log"), MENU_ADVENTURE_LOG}, + {_("Friend Rescue"), MENU_FRIEND_RESCUE}, + {_("Trade Items"), MENU_TRADE_ITEMS}, + {_("Wonder Mail"), MENU_WONDER_MAIL}, + {NULL, 0xFFDD}, }; static const UnkTextStruct2 sUnknown_80E5B34 = { @@ -86,25 +82,23 @@ static const UnkTextStruct2 sUnknown_80E5B34 = { NULL }; -static const MenuItem sUnknown_80E5B4C[] = -{ - {"Awaiting Rescue", MENU_AWAITING_RESCUE}, - {"Delete Save Data", MENU_DELETE_SAVE_PROMPT}, - {"Adventure Log", MENU_ADVENTURE_LOG}, - {"Friend Rescue", MENU_FRIEND_RESCUE}, - {"Trade Items", MENU_TRADE_ITEMS}, - {NULL, 0xffdd}, +static const MenuItem sUnknown_80E5B4C[] = { + {_("Awaiting Rescue"), MENU_AWAITING_RESCUE}, + {_("Delete Save Data"), MENU_DELETE_SAVE_PROMPT}, + {_("Adventure Log"), MENU_ADVENTURE_LOG}, + {_("Friend Rescue"), MENU_FRIEND_RESCUE}, + {_("Trade Items"), MENU_TRADE_ITEMS}, + {NULL, 0xFFDD}, }; -static const MenuItem sUnknown_80E5B8C[] = -{ - {"Awaiting Rescue", MENU_AWAITING_RESCUE}, - {"Delete Save Data", MENU_DELETE_SAVE_PROMPT}, - {"Adventure Log", MENU_ADVENTURE_LOG}, - {"Friend Rescue", MENU_FRIEND_RESCUE}, - {"Trade Items", MENU_TRADE_ITEMS}, - {"Wonder Mail", MENU_WONDER_MAIL}, - {NULL, 0xffdd}, +static const MenuItem sUnknown_80E5B8C[] = { + {_("Awaiting Rescue"), MENU_AWAITING_RESCUE}, + {_("Delete Save Data"), MENU_DELETE_SAVE_PROMPT}, + {_("Adventure Log"), MENU_ADVENTURE_LOG}, + {_("Friend Rescue"), MENU_FRIEND_RESCUE}, + {_("Trade Items"), MENU_TRADE_ITEMS}, + {_("Wonder Mail"), MENU_WONDER_MAIL}, + {NULL, 0xFFDD}, }; static const UnkTextStruct2 sUnknown_80E5BC4 = { @@ -116,25 +110,23 @@ static const UnkTextStruct2 sUnknown_80E5BC4 = { NULL }; -static const MenuItem sUnknown_80E5BDC[] = -{ - {"Revive Team", MENU_CONTINUE}, - {"Delete Save Data", MENU_DELETE_SAVE_PROMPT}, - {"Adventure Log", MENU_ADVENTURE_LOG}, - {"Friend Rescue", MENU_FRIEND_RESCUE}, - {"Trade Items", MENU_TRADE_ITEMS}, - {NULL, 0xffdd}, +static const MenuItem sUnknown_80E5BDC[] = { + {_("Revive Team"), MENU_CONTINUE}, + {_("Delete Save Data"), MENU_DELETE_SAVE_PROMPT}, + {_("Adventure Log"), MENU_ADVENTURE_LOG}, + {_("Friend Rescue"), MENU_FRIEND_RESCUE}, + {_("Trade Items"), MENU_TRADE_ITEMS}, + {NULL, 0xFFDD}, }; -static const MenuItem sUnknown_80E5C18[] = -{ - {"Revive Team", MENU_CONTINUE}, - {"Delete Save Data", MENU_DELETE_SAVE_PROMPT}, - {"Adventure Log", MENU_ADVENTURE_LOG}, - {"Friend Rescue", MENU_FRIEND_RESCUE}, - {"Trade Items", MENU_TRADE_ITEMS}, - {"Wonder Mail", MENU_WONDER_MAIL}, - {NULL, 0xffdd}, +static const MenuItem sUnknown_80E5C18[] = { + {_("Revive Team"), MENU_CONTINUE}, + {_("Delete Save Data"), MENU_DELETE_SAVE_PROMPT}, + {_("Adventure Log"), MENU_ADVENTURE_LOG}, + {_("Friend Rescue"), MENU_FRIEND_RESCUE}, + {_("Trade Items"), MENU_TRADE_ITEMS}, + {_("Wonder Mail"), MENU_WONDER_MAIL}, + {NULL, 0xFFDD}, }; UNUSED static const UnkTextStruct2 sUnknown_80E5C50 = { @@ -146,18 +138,16 @@ UNUSED static const UnkTextStruct2 sUnknown_80E5C50 = { NULL }; -UNUSED static const MenuItem sUnknown_80E5C68[] = -{ - {"Send Items", MENU_SEND_ITEMS}, - {"Receive Items", MENU_RECEIVE_ITEMS}, - {NULL, 0xffdd}, +UNUSED static const MenuItem sUnknown_80E5C68[] = { + {_("Send Items"), MENU_SEND_ITEMS}, + {_("Receive Items"), MENU_RECEIVE_ITEMS}, + {NULL, 0xFFDD}, }; -UNUSED static const MenuItem sUnknown_80E5C9C[] = -{ - {"Send Items", -1}, - {"Receive Items", MENU_RECEIVE_ITEMS}, - {NULL, 0xffdd}, +UNUSED static const MenuItem sUnknown_80E5C9C[] = { + {_("Send Items"), -1}, + {_("Receive Items"), MENU_RECEIVE_ITEMS}, + {NULL, 0xFFDD}, }; static const UnkTextStruct2 sUnknown_80E5CB4 = { @@ -169,121 +159,69 @@ static const UnkTextStruct2 sUnknown_80E5CB4 = { NULL }; -static const u8 sUnknown_80E5CE4[]; -static const u8 sUnknown_80E5CE8[]; -static const MenuItem sUnknown_80E5CCC[] = -{ - {sUnknown_80E5CE8, 0xffde}, - {sUnknown_80E5CE4, 0xffde}, - {NULL, 0xffdd}, +static const MenuItem sUnknown_80E5CCC[] = { + {_("Start an entirely new adventure."), 0xFFDE}, + {_(" "), 0xFFDE}, + {NULL, 0xFFDD}, }; -ALIGNED(4) static const u8 sUnknown_80E5CE4[] = _(" "); -ALIGNED(4) static const u8 sUnknown_80E5CE8[] = _("Start an entirely new adventure."); -static const u8 sUnknown_80E5D24[]; -static const MenuItem sUnknown_80E5D0C[] = -{ - {sUnknown_80E5D24, 0xffde}, - {sUnknown_80E5CE4, 0xffde}, - {NULL, 0xffdd}, +static const MenuItem sUnknown_80E5D0C[] = { + {_("Check your career as an adventurer."), 0xFFDE}, + {_(" "), 0xFFDE}, + {NULL, 0xFFDD}, }; -ALIGNED(4) static const u8 sUnknown_80E5D24[] = _("Check your career as an adventurer."); -static const u8 sUnknown_80E5D60[]; -static const u8 sUnknown_80E5D88[]; -static const MenuItem sUnknown_80E5D48[] = -{ - {sUnknown_80E5D88, 0xffde}, - {sUnknown_80E5D60, 0xffde}, - {NULL, 0xffdd}, +static const MenuItem sUnknown_80E5D48[] = { + {_("This is the Debug Mode."), 0xFFDE}, + {_("It won't be in the release version."), 0xFFDE}, + {NULL, 0xFFDD}, }; -ALIGNED(4) static const u8 sUnknown_80E5D60[] = _("It won't be in the release version."); -ALIGNED(4) static const u8 sUnknown_80E5D88[] = _("This is the Debug Mode."); -static const u8 sUnknown_80E5DB8[]; -static const u8 sUnknown_80E5DCC[]; -static const MenuItem sUnknown_80E5DA0[] = -{ - {sUnknown_80E5DCC, 0xffde}, - {sUnknown_80E5DB8, 0xffde}, - {NULL, 0xffdd}, +static const MenuItem sUnknown_80E5DA0[] = { + {_("Resume your adventure from where"), 0xFFDE}, + {_("you last saved. "), 0xFFDE}, + {NULL, 0xFFDD}, }; -ALIGNED(4) static const u8 sUnknown_80E5DB8[] = _("you last saved. "); -ALIGNED(4) static const u8 sUnknown_80E5DCC[] = _("Resume your adventure from where"); -static const u8 sUnknown_80E5E08[]; -static const u8 sUnknown_80E5E34[]; -static const MenuItem sUnknown_80E5DF0[] = -{ - {sUnknown_80E5E34, 0xFFDE}, - {sUnknown_80E5E08, 0xFFDE}, - {0, 0xFFDD} +static const MenuItem sUnknown_80E5DF0[] = { + {_("This will delete your saved game data."), 0xFFDE}, + {_("{COLOR RED}Beware{RESET}! This will delete it forever!"), 0xFFDE}, + {NULL, 0xFFDD} }; -ALIGNED(4) static const u8 sUnknown_80E5E08[] = _("{COLOR RED}Beware{RESET}! This will delete it forever!"); -ALIGNED(4) static const u8 sUnknown_80E5E34[] = _("This will delete your saved game data."); -static const u8 sUnknown_80E5E74[]; -static const u8 sUnknown_80E5EA0[]; -static const MenuItem sUnknown_80E5E5C[] = -{ - {sUnknown_80E5EA0, 0xFFDE}, - {sUnknown_80E5E74, 0xFFDE}, - {0, 0xFFDD} +static const MenuItem sUnknown_80E5E5C[] = { + {_("Using a Game Link cable or"), 0xFFDE}, + {_("passwords, friends may rescue each other."), 0xFFDE}, + {NULL, 0xFFDD} }; -ALIGNED(4) static const u8 sUnknown_80E5E74[] = _("passwords, friends may rescue each other."); -ALIGNED(4) static const u8 sUnknown_80E5EA0[] = _("Using a Game Link cable or"); -static const u8 sUnknown_80E5ED4[]; -static const u8 sUnknown_80E5EF8[]; -static const MenuItem sUnknown_80E5EBC[] = -{ - {sUnknown_80E5EF8, 0xFFDE}, - {sUnknown_80E5ED4, 0xFFDE}, - {0, 0xFFDD} +static const MenuItem sUnknown_80E5EBC[] = { + {_("Using a Game Link cable, you can"), 0xFFDE}, + {_("trade stored items with a friend."), 0xFFDE}, + {NULL, 0xFFDD} }; -ALIGNED(4) static const u8 sUnknown_80E5ED4[] = _("trade stored items with a friend."); -ALIGNED(4) static const u8 sUnknown_80E5EF8[] = _("Using a Game Link cable, you can"); -static const u8 sUnknown_80E5F34[]; -static const u8 sUnknown_80E5F58[]; -static const MenuItem sUnknown_80E5F1C[] = -{ - {sUnknown_80E5F58, 0xFFDE}, - {sUnknown_80E5F34, 0xFFDE}, - {0, 0xFFDD} +static const MenuItem sUnknown_80E5F1C[] = { + {_("You are awaiting rescue by a friend."), 0xFFDE}, + {_("You can give up waiting for rescue."), 0xFFDE}, + {NULL, 0xFFDD} }; -ALIGNED(4) static const u8 sUnknown_80E5F34[] = _("You can give up waiting for rescue."); -ALIGNED(4) static const u8 sUnknown_80E5F58[] = _("You are awaiting rescue by a friend."); -static const u8 sUnknown_80E5F98[]; -static const u8 sUnknown_80E5FB0[]; static const MenuItem sUnknown_80E5F80[] = { - {sUnknown_80E5FB0, 0xFFDE}, - {sUnknown_80E5F98, 0xFFDE}, - {0, 0xFFDD} -}; -ALIGNED(4) static const u8 sUnknown_80E5F98[] = _("receive Wonder Mail."); -ALIGNED(4) static const u8 sUnknown_80E5FB0[] = _("Using passwords, you can"); - -static const u8 sUnknown_80E5FE4[]; -static const u8 sUnknown_80E6008[]; -static const MenuItem sUnknown_80E5FCC[] = -{ - {sUnknown_80E6008, 0xFFDE}, - {sUnknown_80E5FE4, 0xFFDE}, + {_("Using passwords, you can"), 0xFFDE}, + {_("receive Wonder Mail."), 0xFFDE}, {NULL, 0xFFDD} }; -ALIGNED(4) static const u8 sUnknown_80E5FE4[] = _("receive teams from your friends."); -ALIGNED(4) static const u8 sUnknown_80E6008[] = _("Using the Dual Slot function, you can"); -static const u8 sUnknown_80E6048[]; -static const u8 sUnknown_80E6070[]; -static const MenuItem sUnknown_80E6030[] = -{ - {sUnknown_80E6070, 0xFFDE}, - {sUnknown_80E6048, 0xFFDE}, +static const MenuItem sUnknown_80E5FCC[] = { + {_("Using the Dual Slot function, you can"), 0xFFDE}, + {_("receive teams from your friends."), 0xFFDE}, {NULL, 0xFFDD} }; -ALIGNED(4) static const u8 sUnknown_80E6048[] = _("go on an adventure to unknown worlds."); -ALIGNED(4) static const u8 sUnknown_80E6070[] = _("Using wireless communication, you can"); \ No newline at end of file + +static const MenuItem sUnknown_80E6030[] = { + {_("Using wireless communication, you can"), 0xFFDE}, + {_("go on an adventure to unknown worlds."), 0xFFDE}, + {NULL, 0xFFDD} +}; \ No newline at end of file diff --git a/src/data/other_menus1.h b/src/data/other_menus1.h index 094c266e8..9bfdee4bc 100644 --- a/src/data/other_menus1.h +++ b/src/data/other_menus1.h @@ -15,52 +15,40 @@ const UnkTextStruct2 sUnknown_80E6554 = { // TODO: MAKE STATIC WHEN other_menus1 NULL }; -static const u8 sUnknown_80E65C4[]; -static const u8 sUnknown_80E65AC[]; -static const u8 sUnknown_80E658C[]; -const MenuItem sUnknown_80E656C[4] = { // TODO: MAKE STATIC WHEN other_menus1.s IS DED - {sUnknown_80E65C4, 5}, - {sUnknown_80E65AC, 5}, - {sUnknown_80E658C, 5}, - {NULL, 3}, -}; -ALIGNED(4) static const u8 sUnknown_80E658C[] = _("{CENTER_ALIGN}Don't turn the power off!"); -ALIGNED(4) static const u8 sUnknown_80E65AC[] = _("{CENTER_ALIGN}Item transmitting!"); -ALIGNED(4) static const u8 sUnknown_80E65C4[] = _("{CENTER_ALIGN}{COLOR RED}Caution!{RESET} "); - -static const u8 sUnknown_80E65F8[]; -const MenuItem sUnknown_80E65D8[4] = { // TODO: MAKE STATIC WHEN other_menus1.s IS DED - {sUnknown_80E65C4, 5}, - {sUnknown_80E65F8, 5}, - {sUnknown_80E658C, 5}, - {NULL, 3}, -}; -ALIGNED(4) static const u8 sUnknown_80E65F8[] = _("{CENTER_ALIGN}Thank-You Mail in transmission!"); - -static const u8 sUnknown_80E663C[]; -const MenuItem sUnknown_80E661C[4] = { // TODO: MAKE STATIC WHEN other_menus1.s IS DED - {sUnknown_80E65C4, 5}, - {sUnknown_80E663C, 5}, - {sUnknown_80E658C, 5}, - {NULL, 3}, -}; -ALIGNED(4) static const u8 sUnknown_80E663C[] = _("{CENTER_ALIGN}A-OK Mail in transmission!"); - -const MenuItem sUnknown_80E665C[4] = { // TODO: MAKE STATIC WHEN other_menus1.s IS DED - {sUnknown_80E65C4, 5}, - {sUnknown_80E65F8, 5}, - {sUnknown_80E658C, 5}, +const MenuItem sUnknown_80E656C[] = { // TODO: MAKE STATIC WHEN other_menus1.s IS DED + {_("{CENTER_ALIGN}{COLOR RED}Caution!{RESET} "), 5}, + {_("{CENTER_ALIGN}Item transmitting!"), 5}, + {_("{CENTER_ALIGN}Don't turn the power off!"), 5}, {NULL, 3}, }; -static const u8 sUnknown_80E669C[]; -const MenuItem sUnknown_80E667C[4] = { // TODO: MAKE STATIC WHEN other_menus1.s IS DED - {sUnknown_80E65C4, 5}, - {sUnknown_80E669C, 5}, - {sUnknown_80E658C, 5}, +const MenuItem sUnknown_80E65D8[] = { // TODO: MAKE STATIC WHEN other_menus1.s IS DED + {_("{CENTER_ALIGN}{COLOR RED}Caution!{RESET} "), 5}, + {_("{CENTER_ALIGN}Thank-You Mail in transmission!"), 5}, + {_("{CENTER_ALIGN}Don't turn the power off!"), 5}, + {NULL, 3}, +}; + +const MenuItem sUnknown_80E661C[] = { // TODO: MAKE STATIC WHEN other_menus1.s IS DED + {_("{CENTER_ALIGN}{COLOR RED}Caution!{RESET} "), 5}, + {_("{CENTER_ALIGN}A-OK Mail in transmission!"), 5}, + {_("{CENTER_ALIGN}Don't turn the power off!"), 5}, + {NULL, 3}, +}; + +const MenuItem sUnknown_80E665C[] = { // TODO: MAKE STATIC WHEN other_menus1.s IS DED + {_("{CENTER_ALIGN}{COLOR RED}Caution!{RESET} "), 5}, + {_("{CENTER_ALIGN}Thank-You Mail in transmission!"), 5}, + {_("{CENTER_ALIGN}Don't turn the power off!"), 5}, + {NULL, 3}, +}; + +const MenuItem sUnknown_80E667C[] = { // TODO: MAKE STATIC WHEN other_menus1.s IS DED + {_("{CENTER_ALIGN}{COLOR RED}Caution!{RESET} "), 5}, + {_("{CENTER_ALIGN}Wonder Mail in transmission!"), 5}, + {_("{CENTER_ALIGN}Don't turn the power off!"), 5}, {NULL, 3}, }; -ALIGNED(4) static const u8 sUnknown_80E669C[] = _("{CENTER_ALIGN}Wonder Mail in transmission!"); static const UnkTextStruct2 sUnknown_80E66BC = { 0, 0, 0, 0, @@ -71,18 +59,12 @@ static const UnkTextStruct2 sUnknown_80E66BC = { NULL }; -static const u8 sUnknown_80E6734[]; -static const u8 sUnknown_80E6710[]; -static const u8 sUnknown_80E66F4[]; -static const MenuItem sUnknown_80E66D4[4] = { - {sUnknown_80E6734, 5}, - {sUnknown_80E6710, 5}, - {sUnknown_80E66F4, 5}, +static const MenuItem sUnknown_80E66D4[] = { + {_("{CENTER_ALIGN}{COLOR CYAN_G}Success!{RESET} "), 5}, + {_("{CENTER_ALIGN}Your adventure will be continued."), 5}, + {_("{CENTER_ALIGN}Please press any button."), 5}, {NULL, 3}, }; -ALIGNED(4) static const u8 sUnknown_80E66F4[] = _("{CENTER_ALIGN}Please press any button."); -ALIGNED(4) static const u8 sUnknown_80E6710[] = _("{CENTER_ALIGN}Your adventure will be continued."); -ALIGNED(4) static const u8 sUnknown_80E6734[] = _("{CENTER_ALIGN}{COLOR CYAN_G}Success!{RESET} "); static const UnkTextStruct2 sUnknown_80E6748 = { 0, 0, 0, 0, @@ -93,18 +75,12 @@ static const UnkTextStruct2 sUnknown_80E6748 = { NULL }; -static const u8 sUnknown_80E6780[]; -static const u8 sUnknown_80E6794[]; -static const u8 sUnknown_80E67B4[]; -static const MenuItem sUnknown_80E6760[4] = { - {sUnknown_80E67B4, 5}, - {sUnknown_80E6794, 5}, - {sUnknown_80E6780, 5}, +static const MenuItem sUnknown_80E6760[] = { + {_("{CENTER_ALIGN}{COLOR RED}Communication error!{RESET} "), 5}, + {_("{CENTER_ALIGN}Check the Game Link cable and"), 5}, + {_("{CENTER_ALIGN}please try again."), 5}, {NULL, 3}, }; -ALIGNED(4) static const u8 sUnknown_80E6780[] = _("{CENTER_ALIGN}please try again."); -ALIGNED(4) static const u8 sUnknown_80E6794[] = _("{CENTER_ALIGN}Check the Game Link cable and"); -ALIGNED(4) static const u8 sUnknown_80E67B4[] = _("{CENTER_ALIGN}{COLOR RED}Communication error!{RESET} "); static const UnkTextStruct2 sUnknown_80E67D4 = { 0, 0, 0, 0, @@ -115,14 +91,12 @@ static const UnkTextStruct2 sUnknown_80E67D4 = { NULL }; -static const u8 sUnknown_80E680C[]; -static const MenuItem sUnknown_80E67EC[4] = { - {sUnknown_80E67B4, 5}, - {sUnknown_80E680C, 5}, - {sUnknown_80E6780, 5}, +static const MenuItem sUnknown_80E67EC[] = { + {_("{CENTER_ALIGN}{COLOR RED}Communication error!{RESET} "), 5}, + {_("{CENTER_ALIGN}Check your communication mode and"), 5}, + {_("{CENTER_ALIGN}please try again."), 5}, {NULL, 3}, }; -ALIGNED(4) static const u8 sUnknown_80E680C[] = _("{CENTER_ALIGN}Check your communication mode and"); static const UnkTextStruct2 sUnknown_80E6830 = { 0, 0, 0, 0, @@ -133,16 +107,12 @@ static const UnkTextStruct2 sUnknown_80E6830 = { NULL }; -static const u8 sUnknown_80E6888[]; -static const u8 sUnknown_80E6868[]; -static const MenuItem sUnknown_80E6848[4] = { - {sUnknown_80E67B4, 5}, - {sUnknown_80E6888, 5}, - {sUnknown_80E6868, 5}, +static const MenuItem sUnknown_80E6848[] = { + {_("{CENTER_ALIGN}{COLOR RED}Communication error!{RESET} "), 5}, + {_("{CENTER_ALIGN}Check sum error."), 5}, + {_("{CENTER_ALIGN}Please inform the programmer."), 5}, {NULL, 3}, }; -ALIGNED(4) static const u8 sUnknown_80E6868[] = _("{CENTER_ALIGN}Please inform the programmer."); -ALIGNED(4) static const u8 sUnknown_80E6888[] = _("{CENTER_ALIGN}Check sum error."); static const UnkTextStruct2 sUnknown_80E689C = { 0, 0, 0, 0, @@ -153,18 +123,12 @@ static const UnkTextStruct2 sUnknown_80E689C = { NULL }; -static const u8 sUnknown_80E6928[]; -static const u8 sUnknown_80E68FC[]; -static const u8 sUnknown_80E68D4[]; -static const MenuItem sUnknown_80E68B4[4] = { - {sUnknown_80E6928, 5}, - {sUnknown_80E68FC, 5}, - {sUnknown_80E68D4, 5}, +static const MenuItem sUnknown_80E68B4[] = { + {_("{CENTER_ALIGN}{COLOR RED}Error!{RESET} "), 5}, + {_("{CENTER_ALIGN}An item could not be transferred because"), 5}, + {_("{CENTER_ALIGN}someone's storage space was full."), 5}, {NULL, 3}, }; -ALIGNED(4) static const u8 sUnknown_80E68D4[] = _("{CENTER_ALIGN}someone's storage space was full."); -ALIGNED(4) static const u8 sUnknown_80E68FC[] = _("{CENTER_ALIGN}An item could not be transferred because"); -ALIGNED(4) static const u8 sUnknown_80E6928[] = _("{CENTER_ALIGN}{COLOR RED}Error!{RESET} "); static const UnkTextStruct2 sUnknown_80E6938 = { 0, 0, 0, 0, @@ -175,16 +139,12 @@ static const UnkTextStruct2 sUnknown_80E6938 = { NULL }; -static const u8 sUnknown_80E6988[]; -static const u8 sUnknown_80E6970[]; -static const MenuItem sUnknown_80E6950[4] = { - {sUnknown_80E6928, 5}, - {sUnknown_80E6988, 5}, - {sUnknown_80E6970, 5}, +static const MenuItem sUnknown_80E6950[] = { + {_("{CENTER_ALIGN}{COLOR RED}Error!{RESET} "), 5}, + {_("{CENTER_ALIGN}This {COLOR CYAN_G}SOS Mail{RESET} can't be used."), 5}, + {_("{CENTER_ALIGN}Please check again."), 5}, {NULL, 3}, }; -ALIGNED(4) static const u8 sUnknown_80E6970[] = _("{CENTER_ALIGN}Please check again."); -ALIGNED(4) static const u8 sUnknown_80E6988[] = _("{CENTER_ALIGN}This {COLOR CYAN_G}SOS Mail{RESET} can't be used."); static const UnkTextStruct2 sUnknown_80E69B0 = { 0, 0, 0, 0, @@ -195,14 +155,12 @@ static const UnkTextStruct2 sUnknown_80E69B0 = { NULL }; -static const u8 sUnknown_80E69E8[]; -static const MenuItem sUnknown_80E69C8[4] = { - {sUnknown_80E6928, 5}, - {sUnknown_80E69E8, 5}, - {sUnknown_80E6970, 5}, +static const MenuItem sUnknown_80E69C8[] = { + {_("{CENTER_ALIGN}{COLOR RED}Error!{RESET} "), 5}, + {_("{CENTER_ALIGN}This {COLOR CYAN_G}A-OK Mail{RESET} can't be used."), 5}, + {_("{CENTER_ALIGN}Please check again."), 5}, {NULL, 3}, }; -ALIGNED(4) static const u8 sUnknown_80E69E8[] = _("{CENTER_ALIGN}This {COLOR CYAN_G}A-OK Mail{RESET} can't be used."); static const UnkTextStruct2 sUnknown_80E6A10 = { 0, 0, 0, 0, @@ -213,14 +171,12 @@ static const UnkTextStruct2 sUnknown_80E6A10 = { NULL }; -static const u8 sUnknown_80E6A48[]; -static const MenuItem sUnknown_80E6A28[4] = { - {sUnknown_80E6928, 5}, - {sUnknown_80E6A48, 5}, - {sUnknown_80E6970, 5}, +static const MenuItem sUnknown_80E6A28[] = { + {_("{CENTER_ALIGN}{COLOR RED}Error!{RESET} "), 5}, + {_("{CENTER_ALIGN}This {COLOR CYAN_G}Thank-You Mail{RESET} can't be used."), 5}, + {_("{CENTER_ALIGN}Please check again."), 5}, {NULL, 3}, }; -ALIGNED(4) static const u8 sUnknown_80E6A48[] = _("{CENTER_ALIGN}This {COLOR CYAN_G}Thank-You Mail{RESET} can't be used."); static const UnkTextStruct2 sUnknown_80E6A74 = { 0, 0, 0, 0, @@ -231,16 +187,12 @@ static const UnkTextStruct2 sUnknown_80E6A74 = { NULL }; -static const u8 sUnknown_80E6AC8[]; -static const u8 sUnknown_80E6AAC[]; -static const MenuItem sUnknown_80E6A8C[4] = { - {sUnknown_80E6928, 5}, - {sUnknown_80E6AC8, 5}, - {sUnknown_80E6AAC, 5}, +static const MenuItem sUnknown_80E6A8C[] = { + {_("{CENTER_ALIGN}{COLOR RED}Error!{RESET} "), 5}, + {_("{CENTER_ALIGN}There is no space for new mail."), 5}, + {_("{CENTER_ALIGN}It can't be received."), 5}, {NULL, 3}, }; -ALIGNED(4) static const u8 sUnknown_80E6AAC[] = _("{CENTER_ALIGN}It can't be received."); -ALIGNED(4) static const u8 sUnknown_80E6AC8[] = _("{CENTER_ALIGN}There is no space for new mail."); UNUSED static const UnkTextStruct2 sUnknown_80E6AEC = { 0, 0, 0, 0, @@ -251,16 +203,12 @@ UNUSED static const UnkTextStruct2 sUnknown_80E6AEC = { NULL }; -static const u8 sUnknown_80E6B4C[]; -static const u8 sUnknown_80E6B24[]; -UNUSED static const MenuItem sUnknown_80E6B04[4] = { - {sUnknown_80E6928, 5}, - {sUnknown_80E6B4C, 5}, - {sUnknown_80E6B24, 5}, +UNUSED static const MenuItem sUnknown_80E6B04[] = { + {_("{CENTER_ALIGN}{COLOR RED}Error!{RESET} "), 5}, + {_("{CENTER_ALIGN}You may not go to that {COLOR CYAN_G}dungeon{RESET} yet."), 5}, + {_("{CENTER_ALIGN}You need to go further in the story."), 5}, {NULL, 3}, }; -ALIGNED(4) static const u8 sUnknown_80E6B24[] = _("{CENTER_ALIGN}You need to go further in the story."); -ALIGNED(4) static const u8 sUnknown_80E6B4C[] = _("{CENTER_ALIGN}You may not go to that {COLOR CYAN_G}dungeon{RESET} yet."); static const UnkTextStruct2 sUnknown_80E6B78 = { 0, 0, 0, 0, @@ -271,16 +219,12 @@ static const UnkTextStruct2 sUnknown_80E6B78 = { NULL }; -static const u8 sUnknown_80E6BC4[]; -static const u8 sUnknown_80E6BB0[]; -static const MenuItem sUnknown_80E6B90[4] = { - {sUnknown_80E6928, 5}, - {sUnknown_80E6BC4, 5}, - {sUnknown_80E6BB0, 5}, +static const MenuItem sUnknown_80E6B90[] = { + {_("{CENTER_ALIGN}{COLOR RED}Error!{RESET} "), 5}, + {_("{CENTER_ALIGN}There was a problem on your friend's end."), 5}, + {_("{CENTER_ALIGN}Please try again."), 5}, {NULL, 3}, }; -ALIGNED(4) static const u8 sUnknown_80E6BB0[] = _("{CENTER_ALIGN}Please try again."); -ALIGNED(4) static const u8 sUnknown_80E6BC4[] = _("{CENTER_ALIGN}There was a problem on your friend's end."); static const UnkTextStruct2 sUnknown_80E6BF4 = { 0, 0, 0, 0, @@ -291,14 +235,12 @@ static const UnkTextStruct2 sUnknown_80E6BF4 = { NULL }; -static const u8 sUnknown_80E6C2C[]; -static const MenuItem sUnknown_80E6C0C[4] = { - {sUnknown_80E6928, 5}, - {sUnknown_80E6C2C, 5}, - {sUnknown_80E6BB0, 5}, +static const MenuItem sUnknown_80E6C0C[] = { + {_("{CENTER_ALIGN}{COLOR RED}Error!{RESET} "), 5}, + {_("{CENTER_ALIGN}Your friend is not responding."), 5}, + {_("{CENTER_ALIGN}Please try again."), 5}, {NULL, 3}, }; -ALIGNED(4) static const u8 sUnknown_80E6C2C[] = _("{CENTER_ALIGN}Your friend is not responding."); static const UnkTextStruct2 sUnknown_80E6C50 = { 0, 0, 0, 0, @@ -309,16 +251,12 @@ static const UnkTextStruct2 sUnknown_80E6C50 = { NULL }; -static const u8 sUnknown_80E6CA8[]; -static const u8 sUnknown_80E6C88[]; -static const MenuItem sUnknown_80E6C68[4] = { - {sUnknown_80E6734, 5}, - {sUnknown_80E6CA8, 5}, - {sUnknown_80E6C88, 5}, +static const MenuItem sUnknown_80E6C68[] = { + {_("{CENTER_ALIGN}{COLOR CYAN_G}Success!{RESET} "), 5}, + {_("{CENTER_ALIGN}The item exchange with your friend"), 5}, + {_("{CENTER_ALIGN}went through successfully."), 5}, {NULL, 3}, }; -ALIGNED(4) static const u8 sUnknown_80E6C88[] = _("{CENTER_ALIGN}went through successfully."); -ALIGNED(4) static const u8 sUnknown_80E6CA8[] = _("{CENTER_ALIGN}The item exchange with your friend"); static const UnkTextStruct2 sUnknown_80E6CD0 = { 0, 0, 0, 0, @@ -329,16 +267,12 @@ static const UnkTextStruct2 sUnknown_80E6CD0 = { NULL }; -static const u8 sUnknown_80E6D2C[]; -static const u8 sUnknown_80E6D08[]; -static const MenuItem sUnknown_80E6CE8[4] = { - {sUnknown_80E65C4, 5}, - {sUnknown_80E6D2C, 5}, - {sUnknown_80E6D08, 5}, +static const MenuItem sUnknown_80E6CE8[] = { + {_("{CENTER_ALIGN}{COLOR RED}Caution!{RESET} "), 5}, + {_("{CENTER_ALIGN}Please communicate only after both"), 5}, + {_("{CENTER_ALIGN}you and your friend are ready."), 5}, {NULL, 3}, }; -ALIGNED(4) static const u8 sUnknown_80E6D08[] = _("{CENTER_ALIGN}you and your friend are ready."); -ALIGNED(4) static const u8 sUnknown_80E6D2C[] = _("{CENTER_ALIGN}Please communicate only after both"); static const UnkTextStruct2 sUnknown_80E6D54 = { 0, 0, 0, 0, @@ -349,16 +283,12 @@ static const UnkTextStruct2 sUnknown_80E6D54 = { NULL }; -static const u8 sUnknown_80E6DB0[]; -static const u8 sUnknown_80E6D8C[]; -static const MenuItem sUnknown_80E6D6C[4] = { - {sUnknown_80E6928, 5}, - {sUnknown_80E6DB0, 5}, - {sUnknown_80E6D8C, 5}, +static const MenuItem sUnknown_80E6D6C[] = { + {_("{CENTER_ALIGN}{COLOR RED}Error!{RESET} "), 5}, + {_("{CENTER_ALIGN}An incorrect number of GBA systems are"), 5}, + {_("{CENTER_ALIGN}connected. Please check again."), 5}, {NULL, 3}, }; -ALIGNED(4) static const u8 sUnknown_80E6D8C[] = _("{CENTER_ALIGN}connected. Please check again."); -ALIGNED(4) static const u8 sUnknown_80E6DB0[] = _("{CENTER_ALIGN}An incorrect number of GBA systems are"); static const UnkTextStruct2 sUnknown_80E6DDC = { 0, 0, 0, 0, @@ -369,13 +299,9 @@ static const UnkTextStruct2 sUnknown_80E6DDC = { NULL }; -static const u8 sUnknown_80E6E30[]; -static const u8 sUnknown_80E6E14[]; -static const MenuItem sUnknown_80E6DF4[4] = { - {sUnknown_80E6928, 5}, - {sUnknown_80E6E30, 5}, - {sUnknown_80E6E14, 5}, +static const MenuItem sUnknown_80E6DF4[] = { + {_("{CENTER_ALIGN}{COLOR RED}Error!{RESET} "), 5}, + {_("{CENTER_ALIGN}Communication failed."), 5}, + {_("{CENTER_ALIGN}Please check it again."), 5}, {NULL, 3}, -}; -ALIGNED(4) static const u8 sUnknown_80E6E14[] = _("{CENTER_ALIGN}Please check it again."); -ALIGNED(4) static const u8 sUnknown_80E6E30[] = _("{CENTER_ALIGN}Communication failed."); \ No newline at end of file +}; \ No newline at end of file diff --git a/src/data/personality_test1.h b/src/data/personality_test1.h index 6755ce443..50a2d8a72 100644 --- a/src/data/personality_test1.h +++ b/src/data/personality_test1.h @@ -1,1147 +1,710 @@ -ALIGNED(4) static const PersonalityEffects HardyQuest1Points[3] = -{ - { [HARDY] = 0x02, }, - { [RELAXED] = 0x02, }, - { [IMPISH] = 0x02, } + + +#include "locale/personality_test1_usa.h" + + +ALIGNED(4) static const PersonalityEffects HardyQuest1Points[] = { + { [HARDY] = 2, }, + { [RELAXED] = 2, }, + { [IMPISH] = 2, }, }; - -static const MenuItem HardyQuest1Answers[] = -{ - {"Study hard.", 0}, - {"At the last second.", 1}, - {"Ignore it and play.", 2}, - {NULL, -1}, +static const MenuItem HardyQuest1Answers[] = { + { HARDY_Q1_A0, 0 }, + { HARDY_Q1_A1, 1 }, + { HARDY_Q1_A2, 2 }, + { NULL, -1 }, }; +static const PersonalityQuestion HardyQuest1 = { HARDY_Q1, HardyQuest1Answers, HardyQuest1Points }; -static const u8 HardyQuest1Question[]; -static const PersonalityQuestion HardyQuest1 = { HardyQuest1Question, HardyQuest1Answers, HardyQuest1Points }; -ALIGNED(4) static const u8 HardyQuest1Question[] = _( - "A test is coming up.\n" - "How do you study for it?"); - -ALIGNED(4) static const PersonalityEffects HardyQuest2Points[2] = -{ - { [HARDY] = 0x02, [DOCILE] = 0x01, }, - { [QUIRKY] = 0x02, } +ALIGNED(4) static const PersonalityEffects HardyQuest2Points[] = { + { [HARDY] = 2, [DOCILE] = 1, }, + { [QUIRKY] = 2, }, }; - -static const MenuItem HardyQuest2Answers[] = -{ - {"Yes.", 0}, - {"No. ", 1}, - {NULL, -1}, +static const MenuItem HardyQuest2Answers[] = { + { HARDY_Q2_A0, 0 }, + { HARDY_Q2_A1, 1 }, + { NULL, -1 }, }; +static const PersonalityQuestion HardyQuest2 = { HARDY_Q2, HardyQuest2Answers, HardyQuest2Points }; -static const u8 HardyQuest2Question[]; -static const PersonalityQuestion HardyQuest2 = { HardyQuest2Question, HardyQuest2Answers, HardyQuest2Points }; -ALIGNED(4) static const u8 HardyQuest2Question[] = _("Can you focus on something you like?"); - -ALIGNED(4) static const PersonalityEffects HardyQuest3Points[2] = -{ - { [HARDY] = 0x02, [BRAVE] = 0x02, }, - { [SASSY] = 0x02, [QUIRKY] = 0x02, } +ALIGNED(4) static const PersonalityEffects HardyQuest3Points[] = { + { [HARDY] = 2, [BRAVE] = 2, }, + { [SASSY] = 2, [QUIRKY] = 2, }, }; - -static const MenuItem HardyQuest3Answers[] = -{ - {"Yes.", 0}, - {"No.", 1}, - {NULL, -1}, +static const MenuItem HardyQuest3Answers[] = { + { HARDY_Q3_A0, 0 }, + { HARDY_Q3_A1, 1 }, + { NULL, -1 }, }; +static const PersonalityQuestion HardyQuest3 = { HARDY_Q3, HardyQuest3Answers, HardyQuest3Points }; -static const u8 HardyQuest3Question[]; -static const PersonalityQuestion HardyQuest3 = { HardyQuest3Question, HardyQuest3Answers, HardyQuest3Points }; -ALIGNED(4) static const u8 HardyQuest3Question[] = _( - "When the going gets tough, do you get\n" - "going?"); - -ALIGNED(4) static const PersonalityEffects HardyQuest4Points[3] = -{ - { [HARDY] = 0x02, }, - { [CALM] = 0x02, }, - { [QUIRKY] = 0x02, } +ALIGNED(4) static const PersonalityEffects HardyQuest4Points[] = { + { [HARDY] = 2, }, + { [CALM] = 2, }, + { [QUIRKY] = 2, }, }; - -static const MenuItem HardyQuest4Answers[] = -{ - {"Full.", 0}, - {"Half.", 1}, - {"A little.", 2}, - {NULL, -1}, +static const MenuItem HardyQuest4Answers[] = { + { HARDY_Q4_A0, 0 }, + { HARDY_Q4_A1, 1 }, + { HARDY_Q4_A2, 2 }, + { NULL, -1 }, }; +static const PersonalityQuestion HardyQuest4 = { HARDY_Q4, HardyQuest4Answers, HardyQuest4Points }; -static const u8 HardyQuest4Question[]; -static const PersonalityQuestion HardyQuest4 = { HardyQuest4Question, HardyQuest4Answers, HardyQuest4Points }; -ALIGNED(4) static const u8 HardyQuest4Question[] = _( - "There is a bucket. If you put\n" - "water in it, how high will you fill it?"); -ALIGNED(4) static const PersonalityEffects DocileQuest1Points[2] = -{ - { [DOCILE] = 0x02, [NAIVE] = 0x01, }, - { [TIMID] = 0x02, [CALM] = 0x01, } + +ALIGNED(4) static const PersonalityEffects DocileQuest1Points[] = { + { [DOCILE] = 2, [NAIVE] = 1, }, + { [TIMID] = 2, [CALM] = 1, }, }; - -static const MenuItem DocileQuest1Answers[] = -{ - {"Big box.", 0}, - {"Small box.", 1}, - {NULL, -1}, +static const MenuItem DocileQuest1Answers[] = { + { DOCILE_Q1_A0, 0 }, + { DOCILE_Q1_A1, 1 }, + { NULL, -1 }, }; +static const PersonalityQuestion DocileQuest1 = { DOCILE_Q1, DocileQuest1Answers, DocileQuest1Points }; -static const u8 DocileQuest1Question[]; -static const PersonalityQuestion DocileQuest1 = { DocileQuest1Question, DocileQuest1Answers, DocileQuest1Points }; -ALIGNED(4) static const u8 DocileQuest1Question[] = _( - "You are offered a choice of two gifts.\n" - "Which one will you take?"); - -ALIGNED(4) static const PersonalityEffects DocileQuest2Points[2] = -{ - { [DOCILE] = 0x02, [HASTY] = 0x01, }, - { [NAIVE] = 0x02, [RELAXED] = 0x01, } +ALIGNED(4) static const PersonalityEffects DocileQuest2Points[] = { + { [DOCILE] = 2, [HASTY] = 1, }, + { [NAIVE] = 2, [RELAXED] = 1, }, }; - -static const MenuItem DocileQuest2Answers[] = -{ - {"Open a window right away.", 0}, - {"Take a sniff first.", 1}, - {NULL, -1}, +static const MenuItem DocileQuest2Answers[] = { + { DOCILE_Q2_A0, 0 }, + { DOCILE_Q2_A1, 1 }, + { NULL, -1 }, }; +static const PersonalityQuestion DocileQuest2 = { DOCILE_Q2, DocileQuest2Answers, DocileQuest2Points }; -static const u8 DocileQuest2Question[]; -static const PersonalityQuestion DocileQuest2 = { DocileQuest2Question, DocileQuest2Answers, DocileQuest2Points }; -ALIGNED(4) static const u8 DocileQuest2Question[] = _( - "You broke a rotten egg in your room!\n" - "What will you do?"); - -ALIGNED(4) static const PersonalityEffects DocileQuest3Points[3] = -{ - { [DOCILE] = 0x02, }, - { [NAIVE] = 0x01, [LONELY] = 0x01, }, - { [SASSY] = 0x02, } +ALIGNED(4) static const PersonalityEffects DocileQuest3Points[] = { + { [DOCILE] = 2, }, + { [NAIVE] = 1, [LONELY] = 1, }, + { [SASSY] = 2, }, }; - -static const u8 DocileQuest3_Regular[]; -static const u8 DocileQuest3_Joke[]; -static const u8 DocileQuest3_Cool[]; -static const MenuItem DocileQuest3Answers[] = -{ - {DocileQuest3_Regular, 0}, - {DocileQuest3_Joke, 1}, - {DocileQuest3_Cool, 2}, - {NULL, -1}, +static const MenuItem DocileQuest3Answers[] = { + { DOCILE_Q3_A0, 0 }, + { DOCILE_Q3_A1, 1 }, + { DOCILE_Q3_A2, 2 }, + { NULL, -1 }, }; -ALIGNED(4) static const u8 DocileQuest3_Cool[] = _("Say thanks, but be cool."); -ALIGNED(4) static const u8 DocileQuest3_Joke[] = _("Say thanks with a joke."); -ALIGNED(4) static const u8 DocileQuest3_Regular[] = _("Say thank you regularly."); +static const PersonalityQuestion DocileQuest3 = { DOCILE_Q3, DocileQuest3Answers, DocileQuest3Points }; -static const u8 DocileQuest3Question[]; -static const PersonalityQuestion DocileQuest3 = { DocileQuest3Question, DocileQuest3Answers, DocileQuest3Points }; -ALIGNED(4) static const u8 DocileQuest3Question[] = _( - "A friend brought over something you'd\n" - "forgotten.{WAIT_PRESS}\n" - "How do you thank your friend?"); - -ALIGNED(4) static const PersonalityEffects DocileQuest4Points[3] = -{ - { [DOCILE] = 0x02, }, - { [NAIVE] = 0x02, }, - { [IMPISH] = 0x02, } +ALIGNED(4) static const PersonalityEffects DocileQuest4Points[] = { + { [DOCILE] = 2, }, + { [NAIVE] = 2, }, + { [IMPISH] = 2, }, }; - -static const MenuItem DocileQuest4Answers[] = -{ - {"Turn it in to the police!", 0}, - {"Yay! Yay!", 1}, - {"Is anyone watching...?", 2}, - {NULL, -1}, +static const MenuItem DocileQuest4Answers[] = { + { DOCILE_Q4_A0, 0 }, + { DOCILE_Q4_A1, 1 }, + { DOCILE_Q4_A2, 2 }, + { NULL, -1 }, }; +static const PersonalityQuestion DocileQuest4 = { DOCILE_Q4, DocileQuest4Answers, DocileQuest4Points }; -static const u8 DocileQuest4Question[]; -static const PersonalityQuestion DocileQuest4 = { DocileQuest4Question, DocileQuest4Answers, DocileQuest4Points }; -ALIGNED(4) static const u8 DocileQuest4Question[] = _("There is a wallet at the side of a road."); -ALIGNED(4) static const PersonalityEffects BraveQuest1Points[2] = -{ - { [BRAVE] = 0x03, [IMPISH] = 0x01, }, - { [DOCILE] = 0x02, [TIMID] = 0x01, } + +ALIGNED(4) static const PersonalityEffects BraveQuest1Points[] = { + { [BRAVE] = 3, [IMPISH] = 1, }, + { [DOCILE] = 2, [TIMID] = 1, }, }; - -static const MenuItem BraveQuest1Answers[] = -{ - {"Yes.", 0}, - {"No.", 1}, - {NULL, -1}, +static const MenuItem BraveQuest1Answers[] = { + { BRAVE_Q1_A0, 0 }, + { BRAVE_Q1_A1, 1 }, + { NULL, -1 }, }; +static const PersonalityQuestion BraveQuest1 = { BRAVE_Q1, BraveQuest1Answers, BraveQuest1Points }; -static const u8 BraveQuest1Question[]; -static const PersonalityQuestion BraveQuest1 = { BraveQuest1Question, BraveQuest1Answers, BraveQuest1Points }; -ALIGNED(4) static const u8 BraveQuest1Question[] = _( - "You're going bungee jumping for the first\n" - "time.{EXTRA_MSG}Since it's scary, you decide to test the\n" - "jump with a doll...{WAIT_PRESS}\n" - "And the bungee cord snaps!{EXTRA_MSG}" - "Will you still try to make a jump anyway?"); - -ALIGNED(4) static const PersonalityEffects BraveQuest2APoints[3] = -{ - { }, - { [TIMID] = 0x02, }, - { [RELAXED] = 0x02, } +ALIGNED(4) static const PersonalityEffects BraveQuest2APoints[] = { + { /* Empty */ }, + { [TIMID] = 2, }, + { [RELAXED] = 2, }, }; - -static const MenuItem BraveQuest2AAnswers[] = -{ - {"Fight.", 99}, - {"Run.", 1}, - {"Ignore it.", 2}, - {NULL, -1}, +static const MenuItem BraveQuest2AAnswers[] = { + { BRAVE_Q2A_A0, 99 }, + { BRAVE_Q2A_A1, 1 }, + { BRAVE_Q2A_A2, 2 }, + { NULL, -1 }, }; +static const PersonalityQuestion BraveQuest2A = { BRAVE_Q2A, BraveQuest2AAnswers, BraveQuest2APoints }; -static const u8 BraveQuest2AQuestion[]; -static const PersonalityQuestion BraveQuest2A = { BraveQuest2AQuestion, BraveQuest2AAnswers, BraveQuest2APoints }; -ALIGNED(4) static const u8 BraveQuest2AQuestion[] = _( - "There is an alien invasion!\n" - "What will you do?"); - -ALIGNED(4) static const PersonalityEffects BraveQuest2BPoints[2] = -{ - { [SASSY] = 0x01, [RELAXED] = 0x01, }, - { [BRAVE] = 0x04, } +ALIGNED(4) static const PersonalityEffects BraveQuest2BPoints[] = { + { [SASSY] = 1, [RELAXED] = 1, }, + { [BRAVE] = 4, }, }; - -static const MenuItem BraveQuest2BAnswers[] = -{ - {"Rule with the aliens.", 0}, - {"Refuse.", 1}, - {NULL, -1}, +static const MenuItem BraveQuest2BAnswers[] = { + { BRAVE_Q2B_A0, 0 }, + { BRAVE_Q2B_A1, 1 }, + { NULL, -1 }, }; +static const PersonalityQuestion BraveQuest2B = { BRAVE_Q2B, BraveQuest2BAnswers, BraveQuest2BPoints }; -static const u8 BraveQuest2BQuestion[]; -static const PersonalityQuestion BraveQuest2B = { BraveQuest2BQuestion, BraveQuest2BAnswers, BraveQuest2BPoints }; -ALIGNED(4) static const u8 BraveQuest2BQuestion[] = _( - "You valiantly fight the aliens...{WAIT_PRESS}\n" - "But, you are defeated...{EXTRA_MSG}An alien says to you...{EXTRA_MSG}“YOU HAVE IMPRESSED US.\n" - "IT WAS A PLEASURE TO SEE.{EXTRA_MSG}JOIN US, AND TOGETHER WE SHALL\n" - "RULE THE WORLD.”{WAIT_PRESS}\n" - "What will you do?"); - -ALIGNED(4) static const PersonalityEffects BraveQuest3Points[2] = -{ - { [HARDY] = 0x01, [BRAVE] = 0x02, }, - { [NAIVE] = 0x02, } +ALIGNED(4) static const PersonalityEffects BraveQuest3Points[] = { + { [HARDY] = 1, [BRAVE] = 2, }, + { [NAIVE] = 2, }, }; - -static const MenuItem BraveQuest3Answers[] = -{ - {"Yank open the door.", 0}, - {"Scream in unison.", 1}, - {NULL, -1}, +static const MenuItem BraveQuest3Answers[] = { + { BRAVE_Q3_A0, 0 }, + { BRAVE_Q3_A1, 1 }, + { NULL, -1 }, }; +static const PersonalityQuestion BraveQuest3 = { BRAVE_Q3, BraveQuest3Answers, BraveQuest3Points }; -static const u8 BraveQuest3Question[]; -static const PersonalityQuestion BraveQuest3 = { BraveQuest3Question, BraveQuest3Answers, BraveQuest3Points }; -ALIGNED(4) static const u8 BraveQuest3Question[] = _( - "There is a scream from behind a door!{WAIT_PRESS}\n" - "How will you react?"); - -ALIGNED(4) static const PersonalityEffects BraveQuest4Points[4] = -{ - { [BRAVE] = 0x03, }, - { [HARDY] = 0x02, [BRAVE] = 0x02, }, - { [DOCILE] = 0x01, [TIMID] = 0x01, [RELAXED] = 0x01, }, - { [TIMID] = 0x02, } +ALIGNED(4) static const PersonalityEffects BraveQuest4Points[] = { + { [BRAVE] = 3, }, + { [HARDY] = 2, [BRAVE] = 2, }, + { [DOCILE] = 1, [TIMID] = 1, [RELAXED] = 1, }, + { [TIMID] = 2, }, }; - -static const u8 BraveQuest4_Hesitation[]; -static const u8 BraveQuest4_Scared[]; -static const u8 BraveQuest4_Police[]; -static const u8 BraveQuest4_Nothing[]; static const MenuItem BraveQuest4Answers[] = { - {BraveQuest4_Hesitation, 0}, - {BraveQuest4_Scared, 1}, - {BraveQuest4_Police, 2}, - {BraveQuest4_Nothing, 3}, + { BRAVE_Q4_A0, 0 }, + { BRAVE_Q4_A1, 1 }, + { BRAVE_Q4_A2, 2 }, + { BRAVE_Q4_A3, 3 }, + { NULL, -1 }, +}; +static const PersonalityQuestion BraveQuest4 = { BRAVE_Q4, BraveQuest4Answers, BraveQuest4Points }; + + + +ALIGNED(4) static const PersonalityEffects JollyQuest1Points[] = { + { [JOLLY] = 2, [NAIVE] = 1, }, + { [SASSY] = 1, [QUIRKY] = 1, }, +}; +static const MenuItem JollyQuest1Answers[] = { + { JOLLY_Q1_A0, 0 }, + { JOLLY_Q1_A1, 1 }, + { NULL, -1 }, +}; +static const PersonalityQuestion JollyQuest1 = { JOLLY_Q1, JollyQuest1Answers, JollyQuest1Points }; + +ALIGNED(4) static const PersonalityEffects JollyQuest2Points[] = { + { [JOLLY] = 2, [LONELY] = 1, }, + { [TIMID] = 1, }, +}; +static const MenuItem JollyQuest2Answers[] = { + { JOLLY_Q2_A0, 0 }, + { JOLLY_Q2_A1, 1 }, + { NULL, -1 }, +}; +static const PersonalityQuestion JollyQuest2 = { JOLLY_Q2, JollyQuest2Answers, JollyQuest2Points }; + +ALIGNED(4) static const PersonalityEffects JollyQuest3Points[] = { + { [JOLLY] = 2, }, + { [CALM] = 2, }, + { [QUIRKY] = 2, }, +}; +static const MenuItem JollyQuest3Answers[] = { + { JOLLY_Q3_A0, 0 }, + { JOLLY_Q3_A1, 1 }, + { JOLLY_Q3_A2, 2 }, + { NULL, -1 }, +}; +static const PersonalityQuestion JollyQuest3 = { JOLLY_Q3, JollyQuest3Answers, JollyQuest3Points }; + +ALIGNED(4) static const PersonalityEffects JollyQuest4Points[] = { + { [JOLLY] = 3, }, + { [HARDY] = 2, }, + { [TIMID] = 2, }, +}; +static const MenuItem JollyQuest4Answers[] = { + { JOLLY_Q4_A0, 0 }, + { JOLLY_Q4_A1, 1 }, + { JOLLY_Q4_A2, 2 }, + { NULL, -1 }, +}; +static const PersonalityQuestion JollyQuest4 = { JOLLY_Q4, JollyQuest4Answers, JollyQuest4Points }; + + + +ALIGNED(4) static const PersonalityEffects ImpishQuest1Points[] = { + { [IMPISH] = 2, [LONELY] = 1, }, + { [CALM] = 2, }, +}; +static const MenuItem ImpishQuest1Answers[] = { + { IMPISH_Q1_A0, 0 }, + { IMPISH_Q1_A1, 1 }, + { NULL, -1 }, +}; +static const PersonalityQuestion ImpishQuest1 = { IMPISH_Q1, ImpishQuest1Answers, ImpishQuest1Points }; + +ALIGNED(4) static const PersonalityEffects ImpishQuest2Points[] = { + { [IMPISH] = 2, }, + { [DOCILE] = 1, [RELAXED] = 1, }, +}; +static const MenuItem ImpishQuest2Answers[] = { + { IMPISH_Q2_A0, 0 }, + { IMPISH_Q2_A1, 1 }, + { NULL, -1 }, +}; +static const PersonalityQuestion ImpishQuest2 = { IMPISH_Q2, ImpishQuest2Answers, ImpishQuest2Points }; + +ALIGNED(4) static const PersonalityEffects ImpishQuest3Points[] = { + { [HARDY] = 1, [IMPISH] = 2, }, + { [SASSY] = 1, [QUIRKY] = 2, }, +}; +static const MenuItem ImpishQuest3Answers[] = { + { IMPISH_Q3_A0, 0 }, + { IMPISH_Q3_A1, 1 }, + { NULL, -1 }, +}; +static const PersonalityQuestion ImpishQuest3 = { IMPISH_Q3, ImpishQuest3Answers, ImpishQuest3Points }; + +ALIGNED(4) static const PersonalityEffects ImpishQuest4Points[] = { + { [BRAVE] = 3, }, + { [TIMID] = 2, }, + { [IMPISH] = 2, }, +}; +static const MenuItem ImpishQuest4Answers[] = { + { IMPISH_Q4_A0, 0 }, + { IMPISH_Q4_A1, 1 }, + { IMPISH_Q4_A2, 2 }, + { NULL, -1 }, +}; +static const PersonalityQuestion ImpishQuest4 = { IMPISH_Q4, ImpishQuest4Answers, ImpishQuest4Points }; + + + +ALIGNED(4) static const PersonalityEffects NaiveQuest1Points[] = { + { [IMPISH] = 1, [NAIVE] = 3, }, + { [JOLLY] = 2, }, + { [SASSY] = 2, }, +}; +static const MenuItem NaiveQuest1Answers[] = { + { NAIVE_Q1_A0, 0 }, + { NAIVE_Q1_A1, 1 }, + { NAIVE_Q1_A2, 2 }, + { NULL, -1 }, +}; +static const PersonalityQuestion NaiveQuest1 = { NAIVE_Q1, NaiveQuest1Answers, NaiveQuest1Points }; + +ALIGNED(4) static const PersonalityEffects NaiveQuest2Points[] = { + { [DOCILE] = 1, [NAIVE] = 2, }, + { [QUIRKY] = 2, }, +}; +static const MenuItem NaiveQuest2Answers[] = { + { NAIVE_Q2_A0, 0 }, + { NAIVE_Q2_A1, 1 }, + { NULL, -1 }, +}; +static const PersonalityQuestion NaiveQuest2 = { NAIVE_Q2, NaiveQuest2Answers, NaiveQuest2Points }; + +ALIGNED(4) static const PersonalityEffects NaiveQuest3Points[] = { + { [JOLLY] = 1, [NAIVE] = 2, }, + { [CALM] = 2, }, +}; +static const MenuItem NaiveQuest3Answers[] = { + { NAIVE_Q3_A0, 0 }, + { NAIVE_Q3_A1, 1 }, + { NULL, -1 }, +}; +static const PersonalityQuestion NaiveQuest3 = { NAIVE_Q3, NaiveQuest3Answers, NaiveQuest3Points }; + +ALIGNED(4) static const PersonalityEffects NaiveQuest4Points[] = { + { [NAIVE] = 2, }, + { [HASTY] = 2, }, +}; +static const MenuItem NaiveQuest4Answers[] = { + { NAIVE_Q4_A0, 0 }, + { NAIVE_Q4_A1, 1 }, + { NULL, -1 }, +}; +static const PersonalityQuestion NaiveQuest4 = { NAIVE_Q4, NaiveQuest4Answers, NaiveQuest4Points }; + + + +ALIGNED(4) static const PersonalityEffects TimidQuest1Points[] = { + { [TIMID] = 2, }, + { [HARDY] = 1, [CALM] = 2, }, + { [BRAVE] = 2, [IMPISH] = 1, [NAIVE] = 1, }, +}; +static const MenuItem TimidQuest1Answers[] = { + { TIMID_Q1_A0, 0 }, + { TIMID_Q1_A1, 1 }, + { TIMID_Q1_A2, 2 }, + { NULL, -1 }, +}; +static const PersonalityQuestion TimidQuest1 = { TIMID_Q1, TimidQuest1Answers, TimidQuest1Points }; + +ALIGNED(4) static const PersonalityEffects TimidQuest2Points[] = { + { [TIMID] = 2, }, + { [HASTY] = 2, }, + { [JOLLY] = 2, }, + { [SASSY] = 2, }, + { [LONELY] = 2, }, +}; +static const MenuItem TimidQuest2Answers[] = { + { TIMID_Q2_A0, 0 }, + { TIMID_Q2_A1, 1 }, + { TIMID_Q2_A2, 2 }, + { TIMID_Q2_A3, 3 }, + { TIMID_Q2_A4, 4 }, + { NULL, -1 }, +}; +static const PersonalityQuestion TimidQuest2 = { TIMID_Q2, TimidQuest2Answers, TimidQuest2Points }; + +ALIGNED(4) static const PersonalityEffects TimidQuest3Points[] = { + { [TIMID] = 2, }, + { [LONELY] = 2, }, + { [IMPISH] = 2, [QUIRKY] = 1, }, +}; +static const MenuItem TimidQuest3Answers[] = { + { TIMID_Q3_A0, 0 }, + { TIMID_Q3_A1, 1 }, + { TIMID_Q3_A2, 2 }, + { NULL, -1 }, +}; +static const PersonalityQuestion TimidQuest3 = { TIMID_Q3, TimidQuest3Answers, TimidQuest3Points }; + +ALIGNED(4) static const PersonalityEffects TimidQuest4Points[] = { + { [BRAVE] = 3, }, + { [TIMID] = 2, }, + { [SASSY] = 2, }, +}; +static const MenuItem TimidQuest4Answers[] = { + { TIMID_Q4_A0, 0 }, + { TIMID_Q4_A1, 1 }, + { TIMID_Q4_A2, 2 }, + { NULL, -1 }, +}; +static const PersonalityQuestion TimidQuest4 = { TIMID_Q4, TimidQuest4Answers, TimidQuest4Points }; + + + +ALIGNED(4) static const PersonalityEffects HastyQuest1Points[] = { + { [HASTY] = 2, }, + { [CALM] = 2, }, + { [TIMID] = 2, }, +}; +static const MenuItem HastyQuest1Answers[] = { + { HASTY_Q1_A0, 0 }, + { HASTY_Q1_A1, 1 }, + { HASTY_Q1_A2, 2 }, + { NULL, -1 }, +}; +static const PersonalityQuestion HastyQuest1 = { HASTY_Q1, HastyQuest1Answers, HastyQuest1Points }; + +ALIGNED(4) static const PersonalityEffects HastyQuest2Points[] = { + { [JOLLY] = 2, [HASTY] = 1, }, + { [HARDY] = 1, [CALM] = 1, }, + { [BRAVE] = 2, [QUIRKY] = 2, }, +}; +static const MenuItem HastyQuest2Answers[] = { + { HASTY_Q2_A0, 0 }, + { HASTY_Q2_A1, 1 }, + { HASTY_Q2_A2, 2 }, + { NULL, -1 }, +}; +static const PersonalityQuestion HastyQuest2 = { HASTY_Q2, HastyQuest2Answers, HastyQuest2Points }; + +ALIGNED(4) static const PersonalityEffects HastyQuest3Points[] = { + { [HASTY] = 2, }, + { [TIMID] = 2, }, + { [SASSY] = 2, }, +}; +static const MenuItem HastyQuest3Answers[] = { + { HASTY_Q3_A0, 0 }, + { HASTY_Q3_A1, 1 }, + { HASTY_Q3_A2, 2 }, + { NULL, -1 }, +}; +static const PersonalityQuestion HastyQuest3 = { HASTY_Q3, HastyQuest3Answers, HastyQuest3Points }; + +ALIGNED(4) static const PersonalityEffects HastyQuest4Points[] = { + { [DOCILE] = 1, [HASTY] = 2, }, + { [RELAXED] = 2, }, + { [HASTY] = 3, }, +}; +static const MenuItem HastyQuest4Answers[] = { + { HASTY_Q4_A0, 0 }, + { HASTY_Q4_A1, 1 }, + { HASTY_Q4_A2, 2 }, + { NULL, -1 }, +}; +static const PersonalityQuestion HastyQuest4 = { HASTY_Q4, HastyQuest4Answers, HastyQuest4Points }; + + + +ALIGNED(4) static const PersonalityEffects SassyQuest1Points[] = { + { [HARDY] = 2, }, + { [DOCILE] = 2, }, + { [SASSY] = 2, }, +}; +static const MenuItem SassyQuest1Answers[] = { + { SASSY_Q1_A0, 0 }, + { SASSY_Q1_A1, 1 }, + { SASSY_Q1_A2, 2 }, + { NULL, -1 }, +}; +static const PersonalityQuestion SassyQuest1 = { SASSY_Q1, SassyQuest1Answers, SassyQuest1Points }; + +ALIGNED(4) static const PersonalityEffects SassyQuest2Points[] = { + { [IMPISH] = 1, [SASSY] = 2, }, + { [CALM] = 2, }, +}; +static const MenuItem SassyQuest2Answers[] = { + { SASSY_Q2_A0, 0 }, + { SASSY_Q2_A1, 1 }, + { NULL, -1 }, +}; +static const PersonalityQuestion SassyQuest2 = { SASSY_Q2, SassyQuest2Answers, SassyQuest2Points }; + +ALIGNED(4) static const PersonalityEffects SassyQuest3Points[] = { + { [SASSY] = 2, }, + { [RELAXED] = 2, }, +}; +static const MenuItem SassyQuest3Answers[] = { + { SASSY_Q3_A0, 0 }, + { SASSY_Q3_A1, 1 }, + { NULL, -1 }, +}; +static const PersonalityQuestion SassyQuest3 = { SASSY_Q3, SassyQuest3Answers, SassyQuest3Points }; + +ALIGNED(4) static const PersonalityEffects SassyQuest4Points[] = { + { [DOCILE] = 2, [CALM] = 1, }, + { [SASSY] = 2, [QUIRKY] = 1, }, +}; +static const MenuItem SassyQuest4Answers[] = { + { SASSY_Q4_A0, 0 }, + { SASSY_Q4_A1, 1 }, + { NULL, -1 }, +}; +static const PersonalityQuestion SassyQuest4 = { SASSY_Q4, SassyQuest4Answers, SassyQuest4Points }; + + + +ALIGNED(4) static const PersonalityEffects CalmQuest1Points[] = { + { [CALM] = 2, [LONELY] = 1, }, + { [HARDY] = 2, }, +}; +static const MenuItem CalmQuest1Answers[] = { + { CALM_Q1_A0, 0 }, + { CALM_Q1_A1, 1 }, + { NULL, -1 }, +}; +static const PersonalityQuestion CalmQuest1 = { CALM_Q1, CalmQuest1Answers, CalmQuest1Points }; + +ALIGNED(4) static const PersonalityEffects CalmQuest2Points[] = { + { [CALM] = 2, }, + { [IMPISH] = 2, }, +}; +static const MenuItem CalmQuest2Answers[] = { + { CALM_Q2_A0, 0 }, + { CALM_Q2_A1, 1 }, + { NULL, -1 }, +}; +static const PersonalityQuestion CalmQuest2 = { CALM_Q2, CalmQuest2Answers, CalmQuest2Points }; + +ALIGNED(4) static const PersonalityEffects CalmQuest3Points[] = { + { [IMPISH] = 1, [TIMID] = 2, }, + { [CALM] = 2, [LONELY] = 1, }, +}; +static const MenuItem CalmQuest3Answers[] = { + { CALM_Q3_A0, 0 }, + { CALM_Q3_A1, 1 }, + { NULL, -1 }, +}; +static const PersonalityQuestion CalmQuest3 = { CALM_Q3, CalmQuest3Answers, CalmQuest3Points }; + +ALIGNED(4) static const PersonalityEffects CalmQuest4Points[] = { + { [CALM] = 2, [RELAXED] = 1, }, + { [HARDY] = 1, [HASTY] = 2, }, +}; +static const MenuItem CalmQuest4Answers[] = { + { CALM_Q4_A0, 0 }, + { CALM_Q4_A1, 1 }, + { NULL, -1 }, +}; +static const PersonalityQuestion CalmQuest4 = { CALM_Q4, CalmQuest4Answers, CalmQuest4Points }; + + + +ALIGNED(4) static const PersonalityEffects RelaxedQuest1Points[] = { + { [SASSY] = 1, [RELAXED] = 2, }, + { [HARDY] = 2, [HASTY] = 1, }, +}; +static const MenuItem RelaxedQuest1Answers[] = { + { RELAXED_Q1_A0, 0 }, + { RELAXED_Q1_A1, 1 }, + { NULL, -1 }, +}; +static const PersonalityQuestion RelaxedQuest1 = { RELAXED_Q1, RelaxedQuest1Answers, RelaxedQuest1Points }; + +ALIGNED(4) static const PersonalityEffects RelaxedQuest2Points[] = { + { [RELAXED] = 2, }, + { [IMPISH] = 1, [HASTY] = 2, }, +}; +static const MenuItem RelaxedQuest2Answers[] = { + { RELAXED_Q2_A0, 0 }, + { RELAXED_Q2_A1, 1 }, + { NULL, -1 }, +}; +static const PersonalityQuestion RelaxedQuest2 = { RELAXED_Q2, RelaxedQuest2Answers, RelaxedQuest2Points }; + +ALIGNED(4) static const PersonalityEffects RelaxedQuest3Points[] = { + { [JOLLY] = 2, }, + { [RELAXED] = 2, }, + { [HASTY] = 2, }, +}; +static const MenuItem RelaxedQuest3Answers[] = { + { RELAXED_Q3_A0, 0 }, + { RELAXED_Q3_A1, 1 }, + { RELAXED_Q3_A2, 2 }, + { NULL, -1 }, +}; +static const PersonalityQuestion RelaxedQuest3 = { RELAXED_Q3, RelaxedQuest3Answers, RelaxedQuest3Points }; + +ALIGNED(4) static const PersonalityEffects RelaxedQuest4Points[] = { + { [CALM] = 1, [RELAXED] = 2, }, + { [HARDY] = 2, }, +}; +static const MenuItem RelaxedQuest4Answers[] = { + { RELAXED_Q4_A0, 0 }, + { RELAXED_Q4_A1, 1 }, + { NULL, -1 }, +}; +static const PersonalityQuestion RelaxedQuest4 = { RELAXED_Q4, RelaxedQuest4Answers, RelaxedQuest4Points }; + + + +ALIGNED(4) static const PersonalityEffects LonelyQuest1Points[] = { + { [TIMID] = 1, [LONELY] = 2, }, + { [SASSY] = 2, }, +}; +static const MenuItem LonelyQuest1Answers[] = { + { LONELY_Q1_A0, 0 }, + { LONELY_Q1_A1, 1 }, + { NULL, -1 }, +}; +static const PersonalityQuestion LonelyQuest1 = { LONELY_Q1, LonelyQuest1Answers, LonelyQuest1Points }; + +ALIGNED(4) static const PersonalityEffects LonelyQuest2Points[] = { + { [TIMID] = 1, [LONELY] = 2, }, + { [BRAVE] = 3, [RELAXED] = 1, }, +}; +static const MenuItem LonelyQuest2Answers[] = { + { LONELY_Q2_A0, 0 }, + { LONELY_Q2_A1, 1 }, + { NULL, -1 }, +}; +static const PersonalityQuestion LonelyQuest2 = { LONELY_Q2, LonelyQuest2Answers, LonelyQuest2Points }; + +ALIGNED(4) static const PersonalityEffects LonelyQuest3Points[] = { + { [TIMID] = 1, [LONELY] = 2, }, + { [CALM] = 2, }, +}; +static const MenuItem LonelyQuest3Answers[] = { + { LONELY_Q3_A0, 0 }, + { LONELY_Q3_A1, 1 }, + { NULL, -1 }, +}; +static const PersonalityQuestion LonelyQuest3 = { LONELY_Q3, LonelyQuest3Answers, LonelyQuest3Points }; + +ALIGNED(4) static const PersonalityEffects LonelyQuest4Points[] = { + { [JOLLY] = 1, [LONELY] = 1, }, + { [CALM] = 1, [RELAXED] = 2, }, + { [TIMID] = 1, [LONELY] = 3, }, +}; +static const MenuItem LonelyQuest4Answers[] = { + { LONELY_Q4_A0, 0 }, + { LONELY_Q4_A1, 1 }, + { LONELY_Q4_A2, 2 }, + { NULL, -1 }, +}; +static const PersonalityQuestion LonelyQuest4 = { LONELY_Q4, LonelyQuest4Answers, LonelyQuest4Points }; + + + +ALIGNED(4) static const PersonalityEffects QuirkyQuest1Points[] = { + { [QUIRKY] = 2, }, + { [HARDY] = 2, }, +}; +static const MenuItem QuirkyQuest1Answers[] = { + { QUIRKY_Q1_A0, 0 }, + { QUIRKY_Q1_A1, 1 }, + { NULL, -1 }, +}; +static const PersonalityQuestion QuirkyQuest1 = { QUIRKY_Q1, QuirkyQuest1Answers, QuirkyQuest1Points }; + +ALIGNED(4) static const PersonalityEffects QuirkyQuest2Points[] = { + { [HARDY] = 1, [HASTY] = 1, }, + { [QUIRKY] = 2, }, + { [SASSY] = 2, }, +}; +static const MenuItem QuirkyQuest2Answers[] = { + { QUIRKY_Q2_A0, 0 }, + { QUIRKY_Q2_A1, 1 }, + { QUIRKY_Q2_A2, 2 }, + { NULL, -1 }, +}; +static const PersonalityQuestion QuirkyQuest2 = { QUIRKY_Q2, QuirkyQuest2Answers, QuirkyQuest2Points }; + +ALIGNED(4) static const PersonalityEffects QuirkyQuest3Points[] = { + { [HARDY] = 1, [BRAVE] = 3, }, + { [QUIRKY] = 2, }, + { [IMPISH] = 2, }, + { [TIMID] = 2, }, +}; +static const MenuItem QuirkyQuest3Answers[] = { + { QUIRKY_Q3_A0, 0 }, + { QUIRKY_Q3_A1, 1 }, + { QUIRKY_Q3_A2, 2 }, + { QUIRKY_Q3_A3, 3 }, + { NULL, -1 }, +}; +static const PersonalityQuestion QuirkyQuest3 = { QUIRKY_Q3, QuirkyQuest3Answers, QuirkyQuest3Points }; + +ALIGNED(4) static const PersonalityEffects QuirkyQuest4Points[] = { + { [DOCILE] = 2, }, + { [SASSY] = 2, }, + { [QUIRKY] = 2, }, +}; +static const MenuItem QuirkyQuest4Answers[] = { + {QUIRKY_Q4_A0, 0}, + {QUIRKY_Q4_A1, 1}, + {QUIRKY_Q4_A2, 2}, {NULL, -1}, }; -ALIGNED(4) static const u8 BraveQuest4_Nothing[] = _("Do nothing out of fear."); -ALIGNED(4) static const u8 BraveQuest4_Police[] = _("Call the police."); -ALIGNED(4) static const u8 BraveQuest4_Scared[] = _("Help, even if scared."); -ALIGNED(4) static const u8 BraveQuest4_Hesitation[] = _("Help without hesitation."); +static const PersonalityQuestion QuirkyQuest4 = { QUIRKY_Q4, QuirkyQuest4Answers, QuirkyQuest4Points }; -static const u8 BraveQuest4Question[]; -static const PersonalityQuestion BraveQuest4 = { BraveQuest4Question, BraveQuest4Answers, BraveQuest4Points }; -ALIGNED(4) static const u8 BraveQuest4Question[] = _( - "A delinquent is hassling a girl on\n" - "a busy city street!{WAIT_PRESS}\n" - "What will you do?"); -ALIGNED(4) static const PersonalityEffects JollyQuest1Points[2] = -{ - { [JOLLY] = 0x02, [NAIVE] = 0x01, }, - { [SASSY] = 0x01, [QUIRKY] = 0x01, } -}; - -static const MenuItem JollyQuest1Answers[] = -{ - {"Yes.", 0}, - {"No.", 1}, - {NULL, -1}, -}; - -static const u8 JollyQuest1Question[]; -static const PersonalityQuestion JollyQuest1 = { JollyQuest1Question, JollyQuest1Answers, JollyQuest1Points }; -ALIGNED(4) static const u8 JollyQuest1Question[] = _("Are you a cheerful personality?"); - -ALIGNED(4) static const PersonalityEffects JollyQuest2Points[2] = -{ - { [JOLLY] = 0x02, [LONELY] = 0x01, }, - { [TIMID] = 0x01, } -}; - -static const MenuItem JollyQuest2Answers[] = -{ - {"Yes.", 0}, - {"No.", 1}, - {NULL, -1}, -}; - -static const u8 JollyQuest2Question[]; -static const PersonalityQuestion JollyQuest2 = { JollyQuest2Question, JollyQuest2Answers, JollyQuest2Points }; -ALIGNED(4) static const u8 JollyQuest2Question[] = _( - "Do you like to noisily enjoy yourself\n" - "with others?"); - -ALIGNED(4) static const PersonalityEffects JollyQuest3Points[3] = -{ - { [JOLLY] = 0x02, }, - { [CALM] = 0x02, }, - { [QUIRKY] = 0x02, } -}; - -static const MenuItem JollyQuest3Answers[] = -{ - {"The beach!", 0}, - {"Spas.", 1}, - {"Anywhere.", 2}, - {NULL, -1}, -}; - -static const u8 JollyQuest3Question[]; -static const PersonalityQuestion JollyQuest3 = { JollyQuest3Question, JollyQuest3Answers, JollyQuest3Points }; -ALIGNED(4) static const u8 JollyQuest3Question[] = _( - "It's the summer holidays!\n" - "Where would you like to go?"); - -ALIGNED(4) static const PersonalityEffects JollyQuest4Points[3] = -{ - { [JOLLY] = 0x03, }, - { [HARDY] = 0x02, }, - { [TIMID] = 0x02, } -}; - -static const u8 JollyQuest4_Funny[]; -static const u8 JollyQuest4_Again[]; -static const u8 JollyQuest4_Go[]; -static const MenuItem JollyQuest4Answers[] = -{ - {JollyQuest4_Funny, 0}, - {JollyQuest4_Again, 1}, - {JollyQuest4_Go, 2}, - {NULL, -1}, -}; -ALIGNED(4) static const u8 JollyQuest4_Go[] = _("Right... Well, I gotta go."); -ALIGNED(4) static const u8 JollyQuest4_Again[] = _("Um... Could you say that again?"); -ALIGNED(4) static const u8 JollyQuest4_Funny[] = _("Haha! Yes. Very funny!"); - -static const u8 JollyQuest4Question[]; -static const PersonalityQuestion JollyQuest4 = { JollyQuest4Question, JollyQuest4Answers, JollyQuest4Points }; -ALIGNED(4) static const u8 JollyQuest4Question[] = _( - "A foreign person has started up a\n" - "conversation with you.{EXTRA_MSG}" - "To be honest, you don't have a clue what\n" - "this fellow is saying.{WAIT_PRESS}\n" - "How do you reply?"); - -ALIGNED(4) static const PersonalityEffects ImpishQuest1Points[2] = -{ - { [IMPISH] = 0x02, [LONELY] = 0x01, }, - { [CALM] = 0x02, } -}; - -static const MenuItem ImpishQuest1Answers[] = -{ - {"Yes.", 0}, - {"No.", 1}, - {NULL, -1}, -}; - -static const u8 ImpishQuest1Question[]; -static const PersonalityQuestion ImpishQuest1 = { ImpishQuest1Question, ImpishQuest1Answers, ImpishQuest1Points }; -ALIGNED(4) static const u8 ImpishQuest1Question[] = _("Have you ever made a pitfall trap?"); - -ALIGNED(4) static const PersonalityEffects ImpishQuest2Points[2] = -{ - { [IMPISH] = 0x02, }, - { [DOCILE] = 0x01, [RELAXED] = 0x01, } -}; - -static const MenuItem ImpishQuest2Answers[] = -{ - {"Yes.", 0}, - {"No.", 1}, - {NULL, -1}, -}; - -static const u8 ImpishQuest2Question[]; -static const PersonalityQuestion ImpishQuest2 = { ImpishQuest2Question, ImpishQuest2Answers, ImpishQuest2Points }; -ALIGNED(4) static const u8 ImpishQuest2Question[] = _("Do you like pranks?"); - -ALIGNED(4) static const PersonalityEffects ImpishQuest3Points[2] = -{ - { [HARDY] = 0x01, [IMPISH] = 0x02, }, - { [SASSY] = 0x01, [QUIRKY] = 0x02, } -}; - -static const MenuItem ImpishQuest3Answers[] = -{ - {"Yes.", 0}, - {"No.", 1}, - {NULL, -1}, -}; - -static const u8 ImpishQuest3Question[]; -static const PersonalityQuestion ImpishQuest3 = { ImpishQuest3Question, ImpishQuest3Answers, ImpishQuest3Points }; -ALIGNED(4) static const u8 ImpishQuest3Question[] = _("Are there many things that you would like\nto do?"); - -ALIGNED(4) static const PersonalityEffects ImpishQuest4Points[3] = -{ - { [BRAVE] = 0x03, }, - { [TIMID] = 0x02, }, - { [IMPISH] = 0x02, } -}; - -static const MenuItem ImpishQuest4Answers[] = -{ - {"Face up to the bully.", 0}, - {"Caution the bully from afar.", 1}, - {"Heckle the bully from behind.", 2}, - {NULL, -1}, -}; - -static const u8 ImpishQuest4Question[]; -static const PersonalityQuestion ImpishQuest4 = { ImpishQuest4Question, ImpishQuest4Answers, ImpishQuest4Points }; -ALIGNED(4) static const u8 ImpishQuest4Question[] = _( - "Your friend is being bullied!\n" - "What do you do?"); - -ALIGNED(4) static const PersonalityEffects NaiveQuest1Points[3] = -{ - { [IMPISH] = 0x01, [NAIVE] = 0x03, }, - { [JOLLY] = 0x02, }, - { [SASSY] = 0x02, } -}; - -static const MenuItem NaiveQuest1Answers[] = -{ - {"Love them!", 0}, - {"A little.", 1}, - {"Spare me.", 2}, - {NULL, -1}, -}; - -static const u8 NaiveQuest1Question[]; -static const PersonalityQuestion NaiveQuest1 = { NaiveQuest1Question, NaiveQuest1Answers, NaiveQuest1Points }; -ALIGNED(4) static const u8 NaiveQuest1Question[] = _("Do you like groan-inducing puns?"); - -ALIGNED(4) static const PersonalityEffects NaiveQuest2Points[2] = -{ - { [DOCILE] = 0x01, [NAIVE] = 0x02, }, - { [QUIRKY] = 0x02, } -}; - -static const MenuItem NaiveQuest2Answers[] = -{ - {"Yes.", 0}, - {"No.", 1}, - {NULL, -1}, -}; - -static const u8 NaiveQuest2Question[]; -static const PersonalityQuestion NaiveQuest2 = { NaiveQuest2Question, NaiveQuest2Answers, NaiveQuest2Points }; -ALIGNED(4) static const u8 NaiveQuest2Question[] = _("Do you tend to laugh a lot?"); - -ALIGNED(4) static const PersonalityEffects NaiveQuest3Points[2] = -{ - { [JOLLY] = 0x01, [NAIVE] = 0x02, }, - { [CALM] = 0x02, } -}; -static const MenuItem NaiveQuest3Answers[] = -{ - {"Yes.", 0}, - {"No.", 1}, - {NULL, -1}, +ALIGNED(4) static const PersonalityEffects MiscQuest1Points[] = { + { [HASTY] = 1, [QUIRKY] = 1, }, + { [JOLLY] = 1, [LONELY] = 1, }, }; - -static const u8 NaiveQuest3Question[]; -static const PersonalityQuestion NaiveQuest3 = { NaiveQuest3Question, NaiveQuest3Answers, NaiveQuest3Points }; -ALIGNED(4) static const u8 NaiveQuest3Question[] = _("Do others often call you childish?"); - -ALIGNED(4) static const PersonalityEffects NaiveQuest4Points[2] = -{ - { [NAIVE] = 0x02, }, - { [HASTY] = 0x02, } -}; - -static const MenuItem NaiveQuest4Answers[] = -{ - {"Yes.", 0}, - {"No.", 1}, - {NULL, -1}, -}; - -static const u8 NaiveQuest4Question[]; -static const PersonalityQuestion NaiveQuest4 = { NaiveQuest4Question, NaiveQuest4Answers, NaiveQuest4Points }; -ALIGNED(4) static const u8 NaiveQuest4Question[] = _( - "Do you like to imagine things for your\n" - "amusement?"); - -ALIGNED(4) static const PersonalityEffects TimidQuest1Points[3] = -{ - { [TIMID] = 0x02, }, - { [HARDY] = 0x01, [CALM] = 0x02, }, - { [BRAVE] = 0x02, [IMPISH] = 0x01, [NAIVE] = 0x01, } -}; - -static const MenuItem TimidQuest1Answers[] = -{ - {"Scream and run.", 0}, - {"Close the lid without a word.", 1}, - {"Shake hands with it.", 2}, - {NULL, -1}, -}; - -static const u8 TimidQuest1Question[]; -static const PersonalityQuestion TimidQuest1 = { TimidQuest1Question, TimidQuest1Answers, TimidQuest1Points }; -ALIGNED(4) static const u8 TimidQuest1Question[] = _( - "A human hand extends out of a toilet!\n" - "What would you do?"); - -ALIGNED(4) static const PersonalityEffects TimidQuest2Points[5] = -{ - { [TIMID] = 0x02, }, - { [HASTY] = 0x02, }, - { [JOLLY] = 0x02, }, - { [SASSY] = 0x02, }, - { [LONELY] = 0x02, } -}; - -static const MenuItem TimidQuest2Answers[] = -{ - {"Thumb.", 0}, - {"Index finger.", 1}, - {"Middle finger.", 2}, - {"Ring finger.", 3}, - {"Little finger.", 4}, - {NULL, -1}, +static const MenuItem MiscQuest1Answers[] = { + { MISC_Q1_A0, 0 }, + { MISC_Q1_A1, 1 }, + { NULL, -1 }, }; +static const PersonalityQuestion MiscQuest1 = { MISC_Q1, MiscQuest1Answers, MiscQuest1Points }; -static const u8 TimidQuest2Question[]; -static const PersonalityQuestion TimidQuest2 = { TimidQuest2Question, TimidQuest2Answers, TimidQuest2Points }; -ALIGNED(4) static const u8 TimidQuest2Question[] = _( - "Grab any digit on your left hand with your\n" - "right hand.{WAIT_PRESS}\n" - "Which digit did you grab?"); - -ALIGNED(4) static const PersonalityEffects TimidQuest3Points[3] = -{ - { [TIMID] = 0x02, }, - { [LONELY] = 0x02, }, - { [IMPISH] = 0x02, [QUIRKY] = 0x01, } +ALIGNED(4) static const PersonalityEffects MiscQuest2Points[] = { + { [JOLLY] = 2, }, + { [SASSY] = 1, [QUIRKY] = 1, }, }; - -static const MenuItem TimidQuest3Answers[] = -{ - {"Kick the door.", 0}, - {"Cry.", 1}, - {"Clean it.", 2}, - {NULL, -1}, +static const MenuItem MiscQuest2Answers[] = { + { MISC_Q2_A0, 0 }, + { MISC_Q2_A1, 1 }, + { NULL, -1 }, }; +static const PersonalityQuestion MiscQuest2 = { MISC_Q2, MiscQuest2Answers, MiscQuest2Points }; -static const u8 TimidQuest3Question[]; -static const PersonalityQuestion TimidQuest3 = { TimidQuest3Question, TimidQuest3Answers, TimidQuest3Points }; -ALIGNED(4) static const u8 TimidQuest3Question[] = _( - "You are suddenly locked inside a\n" - "pitch-black room!{WAIT_PRESS}\n" - "What do you do?"); - -ALIGNED(4) static const PersonalityEffects TimidQuest4Points[3] = -{ - { [BRAVE] = 0x03, }, - { [TIMID] = 0x02, }, - { [SASSY] = 0x02, } +ALIGNED(4) static const PersonalityEffects MiscQuest3Points[] = { + { [NAIVE] = 1, [LONELY] = 1, }, + { [HASTY] = 1, [SASSY] = 1, }, }; - -static const MenuItem TimidQuest4Answers[] = -{ - {"No problem!", 0}, - {"Uh... N-no...", 1}, - {"With someone I like.", 2}, - {NULL, -1}, -}; - -static const u8 TimidQuest4Question[]; -static const PersonalityQuestion TimidQuest4 = { TimidQuest4Question, TimidQuest4Answers, TimidQuest4Points }; -ALIGNED(4) static const u8 TimidQuest4Question[] = _("Can you go into a haunted house?"); - -ALIGNED(4) static const PersonalityEffects HastyQuest1Points[3] = -{ - { [HASTY] = 0x02, }, - { [CALM] = 0x02, }, - { [TIMID] = 0x02, } -}; - -static const MenuItem HastyQuest1Answers[] = -{ - {"Open it now.", 0}, - {"Open it later.", 1}, - {"Get someone to open it.", 2}, - {NULL, -1}, -}; - -static const u8 HastyQuest1Question[]; -static const PersonalityQuestion HastyQuest1 = { HastyQuest1Question, HastyQuest1Answers, HastyQuest1Points }; -ALIGNED(4) static const u8 HastyQuest1Question[] = _( - "You receive a gift!{WAIT_PRESS}\n" - "But you don't know what's in it.{WAIT_PRESS}\n" - "You're curious, so what do you do?"); - -ALIGNED(4) static const PersonalityEffects HastyQuest2Points[3] = -{ - { [JOLLY] = 0x02, [HASTY] = 0x01, }, - { [HARDY] = 0x01, [CALM] = 0x01, }, - { [BRAVE] = 0x02, [QUIRKY] = 0x02, } -}; - -static const MenuItem HastyQuest2Answers[] = -{ - {"Spend it now.", 0}, - {"Save it.", 1}, - {"Give it away.", 2}, - {NULL, -1}, -}; - -static const u8 HastyQuest2Question[]; -static const PersonalityQuestion HastyQuest2 = { HastyQuest2Question, HastyQuest2Answers, HastyQuest2Points }; -ALIGNED(4) static const u8 HastyQuest2Question[] = _( - "You win a lottery!{WAIT_PRESS}\n" - "What do you do with the money?"); - -ALIGNED(4) static const PersonalityEffects HastyQuest3Points[3] = -{ - { [HASTY] = 0x02, }, - { [TIMID] = 0x02, }, - { [SASSY] = 0x02, } -}; - -static const u8 HastyQuest3_Open[]; -static const u8 HastyQuest3_Trap[]; -static const u8 HastyQuest3_Empty[]; -static const MenuItem HastyQuest3Answers[] = -{ - {HastyQuest3_Open, 0}, - {HastyQuest3_Trap, 1}, - {HastyQuest3_Empty, 2}, - {NULL, -1}, -}; -ALIGNED(4) static const u8 HastyQuest3_Empty[] = _("It's going to be empty..."); -ALIGNED(4) static const u8 HastyQuest3_Trap[] = _("No... Could be a trap..."); -ALIGNED(4) static const u8 HastyQuest3_Open[] = _("Open it right away!"); - -static const u8 HastyQuest3Question[]; -static const PersonalityQuestion HastyQuest3 = { HastyQuest3Question, HastyQuest3Answers, HastyQuest3Points }; -ALIGNED(4) static const u8 HastyQuest3Question[] = _( - "You come across a treasure chest!\n" - "What do you do?"); - -ALIGNED(4) static const PersonalityEffects HastyQuest4Points[3] = -{ - { [DOCILE] = 0x01, [HASTY] = 0x02, }, - { [RELAXED] = 0x02, }, - { [HASTY] = 0x03, } -}; - -static const MenuItem HastyQuest4Answers[] = -{ - {"Become irritated.", 0}, - {"Wait patiently.", 1}, - {"Get angry and bail.", 2}, - {NULL, -1}, -}; - -static const u8 HastyQuest4Question[]; -static const PersonalityQuestion HastyQuest4 = { HastyQuest4Question, HastyQuest4Answers, HastyQuest4Points }; -ALIGNED(4) static const u8 HastyQuest4Question[] = _( - "Your friend fails to show up for a meeting\n" - "at the promised time.\n" - "What do you do?"); - -ALIGNED(4) static const PersonalityEffects SassyQuest1Points[3] = -{ - { [HARDY] = 0x02, }, - { [DOCILE] = 0x02, }, - { [SASSY] = 0x02, } -}; - -static const MenuItem SassyQuest1Answers[] = -{ - {"Speak calmly.", 0}, - {"Speak nervously.", 1}, - {"WHATEVER!!", 2}, - {NULL, -1}, -}; - -static const u8 SassyQuest1Question[]; -static const PersonalityQuestion SassyQuest1 = { SassyQuest1Question, SassyQuest1Answers, SassyQuest1Points }; -ALIGNED(4) static const u8 SassyQuest1Question[] = _( - "Your country's leader is in front of you.\n" - "How do you speak to him or her?"); - -ALIGNED(4) static const PersonalityEffects SassyQuest2Points[2] = -{ - { [IMPISH] = 0x01, [SASSY] = 0x02, }, - { [CALM] = 0x02, } -}; - -static const MenuItem SassyQuest2Answers[] = -{ - {"Yes.", 0}, - {"No.", 1}, - {NULL, -1}, -}; - -static const u8 SassyQuest2Question[]; -static const PersonalityQuestion SassyQuest2 = { SassyQuest2Question, SassyQuest2Answers, SassyQuest2Points }; -ALIGNED(4) static const u8 SassyQuest2Question[] = _("Do others tell you to watch what you say?"); - -ALIGNED(4) static const PersonalityEffects SassyQuest3Points[2] = -{ - { [SASSY] = 0x02, }, - { [RELAXED] = 0x02, } +static const MenuItem MiscQuest3Answers[] = { + { MISC_Q3_A0, 0 }, + { MISC_Q3_A1, 1 }, + { NULL, -1 }, }; +static const PersonalityQuestion MiscQuest3 = { MISC_Q3, MiscQuest3Answers, MiscQuest3Points }; -static const MenuItem SassyQuest3Answers[] = -{ - {"Yes.", 0}, - {"No.", 1}, - {NULL, -1}, -}; - -static const u8 SassyQuest3Question[]; -static const PersonalityQuestion SassyQuest3 = { SassyQuest3Question, SassyQuest3Answers, SassyQuest3Points }; -ALIGNED(4) static const u8 SassyQuest3Question[] = _( - "Do you think you are cool?\n" - "Be honest."); - -ALIGNED(4) static const PersonalityEffects SassyQuest4Points[2] = -{ - { [DOCILE] = 0x02, [CALM] = 0x01, }, - { [SASSY] = 0x02, [QUIRKY] = 0x01, } -}; - -static const MenuItem SassyQuest4Answers[] = -{ - {"Yes.", 0}, - {"No.", 1}, - {NULL, -1}, -}; - -static const u8 SassyQuest4Question[]; -static const PersonalityQuestion SassyQuest4 = { SassyQuest4Question, SassyQuest4Answers, SassyQuest4Points }; -ALIGNED(4) static const u8 SassyQuest4Question[] = _( - "Can you sincerely thank someone when you\n" - "feel grateful?"); - -ALIGNED(4) static const PersonalityEffects CalmQuest1Points[2] = -{ - { [CALM] = 0x02, [LONELY] = 0x01, }, - { [HARDY] = 0x02, } -}; - -static const MenuItem CalmQuest1Answers[] = -{ - {"Yes.", 0}, - {"No.", 1}, - {NULL, -1}, -}; - -static const u8 CalmQuest1Question[]; -static const PersonalityQuestion CalmQuest1 = { CalmQuest1Question, CalmQuest1Answers, CalmQuest1Points }; -ALIGNED(4) static const u8 CalmQuest1Question[] = _( - "Do you occasionally consider yourself\n" - "dull and overly cautious?"); - -ALIGNED(4) static const PersonalityEffects CalmQuest2Points[2] = -{ - { [CALM] = 0x02, }, - { [IMPISH] = 0x02, } -}; - -static const MenuItem CalmQuest2Answers[] = -{ - {"Yes.", 0}, - {"No.", 1}, - {NULL, -1}, -}; - -static const u8 CalmQuest2Question[]; -static const PersonalityQuestion CalmQuest2 = { CalmQuest2Question, CalmQuest2Answers, CalmQuest2Points }; -ALIGNED(4) static const u8 CalmQuest2Question[] = _( - "Do you dream of lounging around idly\n" - "without much excitement?"); - -ALIGNED(4) static const PersonalityEffects CalmQuest3Points[2] = -{ - { [IMPISH] = 0x01, [TIMID] = 0x02, }, - { [CALM] = 0x02, [LONELY] = 0x01, } -}; - -static const MenuItem CalmQuest3Answers[] = -{ - {"Yes.", 0}, - {"No.", 1}, - {NULL, -1}, -}; - -static const u8 CalmQuest3Question[]; -static const PersonalityQuestion CalmQuest3 = { CalmQuest3Question, CalmQuest3Answers, CalmQuest3Points }; -ALIGNED(4) static const u8 CalmQuest3Question[] = _("Do you like to fight?"); - -ALIGNED(4) static const PersonalityEffects CalmQuest4Points[2] = -{ - { [CALM] = 0x02, [RELAXED] = 0x01, }, - { [HARDY] = 0x01, [HASTY] = 0x02, } -}; - -static const MenuItem CalmQuest4Answers[] = -{ - {"Yes.", 0}, - {"No.", 1}, - {NULL, -1}, -}; - -static const u8 CalmQuest4Question[]; -static const PersonalityQuestion CalmQuest4 = { CalmQuest4Question, CalmQuest4Answers, CalmQuest4Points }; -ALIGNED(4) static const u8 CalmQuest4Question[] = _("Do you often yawn?"); - -ALIGNED(4) static const PersonalityEffects RelaxedQuest1Points[2] = -{ - { [SASSY] = 0x01, [RELAXED] = 0x02, }, - { [HARDY] = 0x02, [HASTY] = 0x01, } -}; - -static const MenuItem RelaxedQuest1Answers[] = -{ - {"Yes.", 0}, - {"No.", 1}, - {NULL, -1}, -}; - -static const u8 RelaxedQuest1Question[]; -static const PersonalityQuestion RelaxedQuest1 = { RelaxedQuest1Question, RelaxedQuest1Answers, RelaxedQuest1Points }; -ALIGNED(4) static const u8 RelaxedQuest1Question[] = _("Are you often late for school or meetings?"); - -ALIGNED(4) static const PersonalityEffects RelaxedQuest2Points[2] = -{ - { [RELAXED] = 0x02, }, - { [IMPISH] = 0x01, [HASTY] = 0x02, } -}; - -static const MenuItem RelaxedQuest2Answers[] = -{ - {"Yes.", 0}, - {"No.", 1}, - {NULL, -1}, -}; - -static const u8 RelaxedQuest2Question[]; -static const PersonalityQuestion RelaxedQuest2 = { RelaxedQuest2Question, RelaxedQuest2Answers, RelaxedQuest2Points }; -ALIGNED(4) static const u8 RelaxedQuest2Question[] = _( - "Do you get the feeling that you've slowed\n" - "down lately?"); - -ALIGNED(4) static const PersonalityEffects RelaxedQuest3Points[3] = -{ - { [JOLLY] = 0x02, }, - { [RELAXED] = 0x02, }, - { [HASTY] = 0x02, } -}; - -static const MenuItem RelaxedQuest3Answers[] = -{ - {"This feels great!", 0}, - {"Snore...", 1}, - {"I want to go home soon!", 2}, - {NULL, -1}, -}; - -static const u8 RelaxedQuest3Question[]; -static const PersonalityQuestion RelaxedQuest3 = { RelaxedQuest3Question, RelaxedQuest3Answers, RelaxedQuest3Points }; -ALIGNED(4) static const u8 RelaxedQuest3Question[] = _( - "It is a pleasant day at the beach.\n" - "How do you feel?"); - -ALIGNED(4) static const PersonalityEffects RelaxedQuest4Points[2] = -{ - { [CALM] = 0x01, [RELAXED] = 0x02, }, - { [HARDY] = 0x02, } -}; - -static const MenuItem RelaxedQuest4Answers[] = -{ - {"Yes.", 0}, - {"No.", 1}, - {NULL, -1}, -}; - -static const u8 RelaxedQuest4Question[]; -static const PersonalityQuestion RelaxedQuest4 = { RelaxedQuest4Question, RelaxedQuest4Answers, RelaxedQuest4Points }; -ALIGNED(4) static const u8 RelaxedQuest4Question[] = _("Do you fall asleep without noticing?"); - -ALIGNED(4) static const PersonalityEffects LonelyQuest1Points[2] = -{ - { [TIMID] = 0x01, [LONELY] = 0x02, }, - { [SASSY] = 0x02, } -}; - -static const MenuItem LonelyQuest1Answers[] = -{ - {"Yes.", 0}, - {"No.", 1}, - {NULL, -1}, -}; - -static const u8 LonelyQuest1Question[]; -static const PersonalityQuestion LonelyQuest1 = { LonelyQuest1Question, LonelyQuest1Answers, LonelyQuest1Points }; -ALIGNED(4) static const u8 LonelyQuest1Question[] = _("Do you feel lonesome when you are alone?"); - -ALIGNED(4) static const PersonalityEffects LonelyQuest2Points[2] = -{ - { [TIMID] = 0x01, [LONELY] = 0x02, }, - { [BRAVE] = 0x03, [RELAXED] = 0x01, } -}; - -static const MenuItem LonelyQuest2Answers[] = -{ - {"Yes.", 0}, - {"No.", 1}, - {NULL, -1}, -}; - -static const u8 LonelyQuest2Question[]; -static const PersonalityQuestion LonelyQuest2 = { LonelyQuest2Question, LonelyQuest2Answers, LonelyQuest2Points }; -ALIGNED(4) static const u8 LonelyQuest2Question[] = _( - "Do you hate to be the last person to leave\n" - "class at the end of a school day?"); - -ALIGNED(4) static const PersonalityEffects LonelyQuest3Points[2] = -{ - { [TIMID] = 0x01, [LONELY] = 0x02, }, - { [CALM] = 0x02, } -}; - -static const MenuItem LonelyQuest3Answers[] = -{ - {"Leave it on.", 0}, - {"Turn it off.", 1}, - {NULL, -1}, -}; - -static const u8 LonelyQuest3Question[]; -static const PersonalityQuestion LonelyQuest3 = { LonelyQuest3Question, LonelyQuest3Answers, LonelyQuest3Points }; -ALIGNED(4) static const u8 LonelyQuest3Question[] = _( - "What do you do with your room's light\n" - "when you're going to bed at night?"); - -ALIGNED(4) static const PersonalityEffects LonelyQuest4Points[3] = -{ - { [JOLLY] = 0x01, [LONELY] = 0x01, }, - { [CALM] = 0x01, [RELAXED] = 0x02, }, - { [TIMID] = 0x01, [LONELY] = 0x03, } -}; - -static const MenuItem LonelyQuest4Answers[] = -{ - {"Go on a trip.", 0}, - {"Hang around vacantly.", 1}, - {"Huddle in a corner.", 2}, - {NULL, -1}, -}; - -static const u8 LonelyQuest4Question[]; -static const PersonalityQuestion LonelyQuest4 = { LonelyQuest4Question, LonelyQuest4Answers, LonelyQuest4Points }; -ALIGNED(4) static const u8 LonelyQuest4Question[] = _( - "It's a weekend, but no one will play\n" - "with you...\n" - "What do you do?"); - -ALIGNED(4) static const PersonalityEffects QuirkyQuest1Points[2] = -{ - { [QUIRKY] = 0x02, }, - { [HARDY] = 0x02, } -}; - -static const MenuItem QuirkyQuest1Answers[] = -{ - {"Yes.", 0}, - {"No.", 1}, - {NULL, -1}, -}; - -static const u8 QuirkyQuest1Question[]; -static const PersonalityQuestion QuirkyQuest1 = { QuirkyQuest1Question, QuirkyQuest1Answers, QuirkyQuest1Points }; -ALIGNED(4) static const u8 QuirkyQuest1Question[] = _( - "Do you sometimes run out of things to do\n" - "all of a sudden?"); - -ALIGNED(4) static const PersonalityEffects QuirkyQuest2Points[3] = -{ - { [HARDY] = 0x01, [HASTY] = 0x01, }, - { [QUIRKY] = 0x02, }, - { [SASSY] = 0x02, } -}; - -static const u8 QuirkyQuest2_Reply[]; -static const u8 QuirkyQuest2_MayMayNot[]; -static const u8 QuirkyQuest2_Trouble[]; -static const MenuItem QuirkyQuest2Answers[] = -{ - {QuirkyQuest2_Reply, 0}, - {QuirkyQuest2_MayMayNot, 1}, - {QuirkyQuest2_Trouble, 2}, - {NULL, -1}, -}; -ALIGNED(4) static const u8 QuirkyQuest2_Trouble[] = _("Too much trouble."); -ALIGNED(4) static const u8 QuirkyQuest2_MayMayNot[] = _("May reply, may not."); -ALIGNED(4) static const u8 QuirkyQuest2_Reply[] = _("Reply right away."); - -static const u8 QuirkyQuest2Question[]; -static const PersonalityQuestion QuirkyQuest2 = { QuirkyQuest2Question, QuirkyQuest2Answers, QuirkyQuest2Points }; -ALIGNED(4) static const u8 QuirkyQuest2Question[] = _("How quickly do you respond to an e-mail?"); - -ALIGNED(4) static const PersonalityEffects QuirkyQuest3Points[4] = -{ - { [HARDY] = 0x01, [BRAVE] = 0x03, }, - { [QUIRKY] = 0x02, }, - { [IMPISH] = 0x02, }, - { [TIMID] = 0x02, } -}; - -static const MenuItem QuirkyQuest3Answers[] = -{ - {"Bravely declare my love.", 0}, - {"Might say hello...", 1}, - {"Pull a prank to get attention.", 2}, - {"Look from afar.", 3}, - {NULL, -1}, -}; - -static const u8 QuirkyQuest3Question[]; -static const PersonalityQuestion QuirkyQuest3 = { QuirkyQuest3Question, QuirkyQuest3Answers, QuirkyQuest3Points }; -ALIGNED(4) static const u8 QuirkyQuest3Question[] = _( - "There is a person you like...{WAIT_PRESS}\n" - "But there's no opportunity to get close.\n" - "What do you do?"); - -ALIGNED(4) static const PersonalityEffects QuirkyQuest4Points[3] = -{ - { [DOCILE] = 0x02, }, - { [SASSY] = 0x02, }, - { [QUIRKY] = 0x02, } -}; - -static const u8 QuirkyQuest4_GoRight[]; -static const u8 QuirkyQuest4_GoLeft[]; -static const u8 QuirkyQuest4_EitherSide[]; -static const MenuItem QuirkyQuest4Answers[] = -{ - {QuirkyQuest4_GoRight, 0}, - {QuirkyQuest4_GoLeft, 1}, - {QuirkyQuest4_EitherSide, 2}, - {NULL, -1}, -}; -ALIGNED(4) static const u8 QuirkyQuest4_EitherSide[] = _("Choose either side."); -ALIGNED(4) static const u8 QuirkyQuest4_GoLeft[] = _("It's a trap! Go left."); -ALIGNED(4) static const u8 QuirkyQuest4_GoRight[] = _("Instantly go right."); - -static const u8 QuirkyQuest4Question[]; -static const PersonalityQuestion QuirkyQuest4 = { QuirkyQuest4Question, QuirkyQuest4Answers, QuirkyQuest4Points }; -ALIGNED(4) static const u8 QuirkyQuest4Question[] = _( - "The road forks to the right and left.\n" - "You are told there is a treasure on the\n" - "right side. What do you do?"); - -ALIGNED(4) static const PersonalityEffects MiscQuest1Points[2] = -{ - { [HASTY] = 0x01, [QUIRKY] = 0x01, }, - { [JOLLY] = 0x01, [LONELY] = 0x01, } -}; - -static const MenuItem MiscQuest1Answers[] = -{ - {"Go alone.", 0}, - {"Go with others.", 1}, - {NULL, -1}, -}; - -static const u8 MiscQuest1Question[]; -static const PersonalityQuestion MiscQuest1 = { MiscQuest1Question, MiscQuest1Answers, MiscQuest1Points }; -ALIGNED(4) static const u8 MiscQuest1Question[] = _("On vacation outings, you want to..."); - -ALIGNED(4) static const PersonalityEffects MiscQuest2Points[2] = -{ - { [JOLLY] = 0x02, }, - { [SASSY] = 0x01, [QUIRKY] = 0x01, } -}; - -static const u8 MiscQuest2_DontCare[]; -static const MenuItem MiscQuest2Answers[] = -{ - {"Love them!", 0}, - {MiscQuest2_DontCare, 1}, - {NULL, -1}, -}; -ALIGNED(4) static const u8 MiscQuest2_DontCare[] = _("Don't care."); - -static const u8 MiscQuest2Question[]; -static const PersonalityQuestion MiscQuest2 = { MiscQuest2Question, MiscQuest2Answers, MiscQuest2Points }; -ALIGNED(4) static const u8 MiscQuest2Question[] = _( - "It's the summer festival!\n" - "Do you like carnivals?"); - -ALIGNED(4) static const PersonalityEffects MiscQuest3Points[2] = -{ - { [NAIVE] = 0x01, [LONELY] = 0x01, }, - { [HASTY] = 0x01, [SASSY] = 0x01, } -}; - -static const MenuItem MiscQuest3Answers[] = -{ - {"Happy!", 0}, - {"Not happy.", 1}, - {NULL, -1}, -}; -static const u8 MiscQuest3Question[]; -static const PersonalityQuestion MiscQuest3 = { MiscQuest3Question, MiscQuest3Answers, MiscQuest3Points }; -ALIGNED(4) static const u8 MiscQuest3Question[] = _( - "Somebody calls you “weird but funny.”\n" - "How does that make you feel?"); -static const PersonalityQuestion* const gPersonalityQuestionPointerTable[NUM_QUIZ_QUESTIONS + 1] = -{ +static const PersonalityQuestion* const gPersonalityQuestionPointerTable[NUM_QUIZ_QUESTIONS + 1] = { &HardyQuest1, &HardyQuest2, &HardyQuest3, &HardyQuest4, &DocileQuest1, &DocileQuest2, &DocileQuest3, &DocileQuest4, &BraveQuest1, &BraveQuest2A, &BraveQuest3, &BraveQuest4, @@ -1160,8 +723,7 @@ static const PersonalityQuestion* const gPersonalityQuestionPointerTable[NUM_QUI }; // NOTE: 2nd Part of Brave is included at the end so it isn't actually chosen -static const u8 gNatureQuestionTable[NUM_QUIZ_QUESTIONS + 1] = -{ +static const u8 gNatureQuestionTable[NUM_QUIZ_QUESTIONS + 1] = { HARDY, HARDY, HARDY, HARDY, DOCILE, DOCILE, DOCILE, DOCILE, BRAVE, BRAVE, BRAVE, BRAVE, @@ -1179,23 +741,24 @@ static const u8 gNatureQuestionTable[NUM_QUIZ_QUESTIONS + 1] = BRAVE }; -ALIGNED(4) static const u8 gGenderText[] = _("Are you a boy or a girl?"); -UNUSED ALIGNED(4) static const u8* const gGenderTextPtr[] = { gGenderText }; -static const MenuItem gGenderMenu[] = -{ - {"Boy.", 0}, - {"Girl.", 1}, - {NULL, -1}, + +ALIGNED(4) static const u8 sGender0[] = GENDER_Q; +UNUSED ALIGNED(4) static const u8* const gGenderTextPtr[] = { sGender0 }; + +static const MenuItem gGenderMenu[] = { + { GENDER_A0, 0 }, + { GENDER_A1, 1 }, + { NULL, -1 }, }; -UNUSED static const u8 unknownPersonality[13] = -{ + + +UNUSED static const u8 unknownPersonality[NUM_PERSONALITIES] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static const s16 gStarters[NUM_PERSONALITIES][2] = -{ +static const s16 gStarters[NUM_PERSONALITIES][2] = { // MALE / FEMALE [HARDY] = {MONSTER_CHARMANDER, MONSTER_PIKACHU}, [DOCILE] = {MONSTER_BULBASAUR, MONSTER_CHIKORITA}, @@ -1212,298 +775,43 @@ static const s16 gStarters[NUM_PERSONALITIES][2] = [QUIRKY] = {MONSTER_MEOWTH, MONSTER_TREECKO} }; -ALIGNED(4) static const u8 gStarterReveal[] = _( - "\n" - "{CENTER_ALIGN}The Pokémon {POKEMON_0}!"); + + +ALIGNED(4) static const u8 gStarterReveal[] = STARTER_REVEAL; UNUSED ALIGNED(4) static const u8* const gStarterRevealPtr[] = { gStarterReveal }; -ALIGNED(4) static const u8 gPartnerPrompt[] = _( - "{CENTER_ALIGN}This is the final step.{WAIT_PRESS}\n" - "{CENTER_ALIGN}Who would you like to have as a partner?{EXTRA_MSG}" - "{CENTER_ALIGN}Choose the Pokémon you want\n" - "{CENTER_ALIGN}as your partner from this group."); +ALIGNED(4) static const u8 gPartnerPrompt[] = PARTNER_PROMPT; UNUSED ALIGNED(4) static const u8* const gPartnerPromptPtr = gPartnerPrompt; -ALIGNED(4) static const u8 gPartnerNickPrompt[] = _("{CENTER_ALIGN}What is your partner's nickname?"); +ALIGNED(4) static const u8 gPartnerNickPrompt[] = PARTNER_NICK_PROMPT; UNUSED ALIGNED(4) static const u8* const gPartnerNickPromptPtr[] = { gPartnerNickPrompt }; -ALIGNED(4) static const u8 gEndIntroText[] = _( - "{CENTER_ALIGN}OK! We're all set!{EXTRA_MSG}" - "{CENTER_ALIGN}Let's get you into the\n" - "{CENTER_ALIGN}world of Pokémon!{EXTRA_MSG}" - "{CENTER_ALIGN}Go for it!"); +ALIGNED(4) static const u8 gEndIntroText[] = END_TEXT; UNUSED ALIGNED(4) static const u8* const gEndIntroTextPtr[] = { gEndIntroText }; -static const u8 gHardyDescription[]; -static const u8 gDocileDescription[]; -static const u8 gBraveDescription[]; -static const u8 gJollyDescription[]; -static const u8 gImpishDescription[]; -static const u8 gNaiveDescription[]; -static const u8 gTimidDescription[]; -static const u8 gHastyDescription[]; -static const u8 gSassyDescription[]; -static const u8 gCalmDescription[]; -static const u8 gRelaxedDescription[]; -static const u8 gLonelyDescription[]; -static const u8 gQuirkyDescription[]; -static const u8* const sPersonalityTypeDescriptionTable[NUM_PERSONALITIES] = -{ - [HARDY] = gHardyDescription, - [DOCILE] = gDocileDescription, - [BRAVE] = gBraveDescription, - [JOLLY] = gJollyDescription, - [IMPISH] = gImpishDescription, - [NAIVE] = gNaiveDescription, - [TIMID] = gTimidDescription, - [HASTY] = gHastyDescription, - [SASSY] = gSassyDescription, - [CALM] = gCalmDescription, - [RELAXED] = gRelaxedDescription, - [LONELY] = gLonelyDescription, - [QUIRKY] = gQuirkyDescription + +static const u8* const sPersonalityTypeDescriptionTable[NUM_PERSONALITIES] = { + [HARDY] = DESC_HARDY, + [DOCILE] = DESC_DOCILE, + [BRAVE] = DESC_BRAVE, + [JOLLY] = DESC_JOLLY, + [IMPISH] = DESC_IMPISH, + [NAIVE] = DESC_NAIVE, + [TIMID] = DESC_TIMID, + [HASTY] = DESC_HASTY, + [SASSY] = DESC_SASSY, + [CALM] = DESC_CALM, + [RELAXED] = DESC_RELAXED, + [LONELY] = DESC_LONELY, + [QUIRKY] = DESC_QUIRKY }; -ALIGNED(4) static const u8 gQuirkyDescription[] = _( - "{CENTER_ALIGN}You appear to be...{WAIT_PRESS}\n" - "{CENTER_ALIGN}The quirky type.{EXTRA_MSG}" - "{CENTER_ALIGN}People consider you an eccentric\n" - "{CENTER_ALIGN}who does things at your own pace.{EXTRA_MSG}" - "{CENTER_ALIGN}You never break tempo.{EXTRA_MSG}" - "{CENTER_ALIGN}Your carefree nature makes you\n" - "{CENTER_ALIGN}attractive. But you also happen\n" - "{CENTER_ALIGN}to be somewhat childish...{EXTRA_MSG}" - "{CENTER_ALIGN}You are fickle and cause problems for the\n" - "{CENTER_ALIGN}people who have to go along with you.{EXTRA_MSG}" - "{CENTER_ALIGN}Maybe people are even upset\n" - "{CENTER_ALIGN}with you for being so fickle?{EXTRA_MSG}" - "{CENTER_ALIGN}If you realize how selfishly\n" - "{CENTER_ALIGN}you're behaving, try to think\n" - "{CENTER_ALIGN}before you do anything rash.{EXTRA_MSG}" - "{CENTER_ALIGN}A quirky person like you should be..."); - -ALIGNED(4) static const u8 gLonelyDescription[] = _( - "{CENTER_ALIGN}You appear to be...{WAIT_PRESS}\n" - "{CENTER_ALIGN}The lonely type.{EXTRA_MSG}" - "{CENTER_ALIGN}You always act cheerful and\n" - "{CENTER_ALIGN}jocular around other people.{EXTRA_MSG}" - "{CENTER_ALIGN}But that's only because\n" - "{CENTER_ALIGN}you are with other people.{EXTRA_MSG}" - "{CENTER_ALIGN}However, when you get alone...{EXTRA_MSG}" - "{CENTER_ALIGN}Do you find yourself\n" - "{CENTER_ALIGN}feeling oddly depressed?{EXTRA_MSG}" - "{CENTER_ALIGN}That's why you always\n" - "{CENTER_ALIGN}want to be with others.{EXTRA_MSG}" - "{CENTER_ALIGN}But if you go around feeling\n" - "{CENTER_ALIGN}depressed too much...{EXTRA_MSG}" - "{CENTER_ALIGN}Your nutritional balance goes out\n" - "{CENTER_ALIGN}of wack. Eat more vegetables!{EXTRA_MSG}" - "{CENTER_ALIGN}However...{WAIT_PRESS}\n" - "{CENTER_ALIGN}It's not a bad thing\n" - "{CENTER_ALIGN}to feel lonely.{EXTRA_MSG}" - "{CENTER_ALIGN}You know what it's like when you aren't\n" - "{CENTER_ALIGN}alone, so that's why you feel lonesome.{EXTRA_MSG}" - "{CENTER_ALIGN}And that's why you aren't really alone.{EXTRA_MSG}" - "{CENTER_ALIGN}A lonely person like you should be..."); - -ALIGNED(4) static const u8 gRelaxedDescription[] = _( - "{CENTER_ALIGN}You appear to be...{WAIT_PRESS}\n" - "{CENTER_ALIGN}The relaxed type.{EXTRA_MSG}" - "{CENTER_ALIGN}Do you occasionally\n" - "{CENTER_ALIGN}zone out and miss a bus?{EXTRA_MSG}" - "{CENTER_ALIGN}Or do you find yourself dozing off?{EXTRA_MSG}" - "{CENTER_ALIGN}Or is your reaction time\n" - "{CENTER_ALIGN}a little slower than others?{EXTRA_MSG}" - "{CENTER_ALIGN}But that's not necessarily\n" - "{CENTER_ALIGN}a bad thing.{EXTRA_MSG}" - "{CENTER_ALIGN}You can do things at your own\n" - "{CENTER_ALIGN}tempo without feeling pressured.{EXTRA_MSG}" - "{CENTER_ALIGN}You can live in a relaxed and\n" - "{CENTER_ALIGN}unhurried manner without worries.{EXTRA_MSG}" - "{CENTER_ALIGN}I think that's a happy\n" - "{CENTER_ALIGN}lifestyle to be envied, even.{EXTRA_MSG}" - "{CENTER_ALIGN}You're also surprisingly popular.{EXTRA_MSG}" - "{CENTER_ALIGN}The way you vacantly stare\n" - "{CENTER_ALIGN}off into the distance...{EXTRA_MSG}" - "{CENTER_ALIGN}It should make that someone\n" - "{CENTER_ALIGN}special's pulse race.{EXTRA_MSG}" - "{CENTER_ALIGN}A relaxed person like you should be..."); - -ALIGNED(4) static const u8 gCalmDescription[] = _( - "{CENTER_ALIGN}You appear to be...{WAIT_PRESS}\n" - "{CENTER_ALIGN}The calm type.{EXTRA_MSG}" - "{CENTER_ALIGN}You're capable of giving advice\n" - "{CENTER_ALIGN}to friends with worries.{EXTRA_MSG}" - "{CENTER_ALIGN}You don't like to fight.{EXTRA_MSG}" - "{CENTER_ALIGN}You're a warm, kindhearted\n" - "{CENTER_ALIGN}person who cares.{EXTRA_MSG}" - "{CENTER_ALIGN}You must have many friends\n" - "{CENTER_ALIGN}who look up to you.{EXTRA_MSG}" - "{CENTER_ALIGN}However...{WAIT_PRESS}\n" - "{CENTER_ALIGN}You may also be somewhat gullible...{EXTRA_MSG}" - "{CENTER_ALIGN}As well as a little careless...{EXTRA_MSG}" - "{CENTER_ALIGN}And even a little sloppy.{EXTRA_MSG}" - "{CENTER_ALIGN}You might want to keep\n" - "{CENTER_ALIGN}those points in mind.{EXTRA_MSG}" - "{CENTER_ALIGN}A calm person like you should be..."); - -ALIGNED(4) static const u8 gSassyDescription[] = _( - "{CENTER_ALIGN}You appear to be...{WAIT_PRESS}\n" - "{CENTER_ALIGN}The sassy type.{EXTRA_MSG}" - "{CENTER_ALIGN}You tend to be somewhat cynical.{EXTRA_MSG}" - "{CENTER_ALIGN}Despite that, there is something\n" - "{CENTER_ALIGN}appealing and lovable about you.{EXTRA_MSG}" - "{CENTER_ALIGN}But do you occasionally say something\n" - "{CENTER_ALIGN}arrogant that angers others?{EXTRA_MSG}" - "{CENTER_ALIGN}Do you make that mistake?{EXTRA_MSG}" - "{CENTER_ALIGN}Or have people called you\n" - "{CENTER_ALIGN}conceited, vain, or selfish?{EXTRA_MSG}" - "{CENTER_ALIGN}Have people said that about you?{EXTRA_MSG}" - "{CENTER_ALIGN}Huh?{WAIT_PRESS} You're telling me to get lost?{EXTRA_MSG}" - "{CENTER_ALIGN}Why, you... Come here and say that!{WAIT_PRESS}\n" - "{CENTER_ALIGN}......Gasp!{EXTRA_MSG}" - "{CENTER_ALIGN}...I'm sorry.\n" - "{CENTER_ALIGN}I let my feelings run away.\n" - "{CENTER_ALIGN}I truly regret this, really.{EXTRA_MSG}" - "{CENTER_ALIGN}Anyway, your cool and aloof\n" - "{CENTER_ALIGN}attitude is what defines you.{EXTRA_MSG}" - "{CENTER_ALIGN}It makes you exasperating and\n" - "{CENTER_ALIGN}appealing at the same time.{EXTRA_MSG}" - "{CENTER_ALIGN}A sassy person like you should be..."); - -ALIGNED(4) static const u8 gHastyDescription[] = _( - "{CENTER_ALIGN}You appear to be...{WAIT_PRESS}\n" - "{CENTER_ALIGN}The hasty type.{EXTRA_MSG}" - "{CENTER_ALIGN}You like to take charge\n" - "{CENTER_ALIGN}and get things done.{EXTRA_MSG}" - "{CENTER_ALIGN}You're a real go-getter.{EXTRA_MSG}" - "{CENTER_ALIGN}But are you also stressed out?{EXTRA_MSG}" - "{CENTER_ALIGN}You get irritated when your\n" - "{CENTER_ALIGN}friends don't show up on time.{EXTRA_MSG}" - "{CENTER_ALIGN}You get frustrated when things\n" - "{CENTER_ALIGN}don't turn out the way you expect.{EXTRA_MSG}" - "{CENTER_ALIGN}Maybe you jab the elevator button\n" - "{CENTER_ALIGN}if the elevator is slow to arrive.{EXTRA_MSG}" - "{CENTER_ALIGN}...Maybe you're already jabbing\n" - "{CENTER_ALIGN}the A Button repeatedly now.{EXTRA_MSG}" - "{CENTER_ALIGN}Beware--getting too easily irritated\n" - "{CENTER_ALIGN}just isn't good for your well-being.{EXTRA_MSG}" - "{CENTER_ALIGN}A hasty person like you should be..."); - -ALIGNED(4) static const u8 gTimidDescription[] = _( - "{CENTER_ALIGN}You appear to be...{WAIT_PRESS}\n" - "{CENTER_ALIGN}The timid type.{EXTRA_MSG}" - "{CENTER_ALIGN}You may find it hard to go\n" - "{CENTER_ALIGN}to the washroom at night.{EXTRA_MSG}" - "{CENTER_ALIGN}You may also find it too frightening\n" - "{CENTER_ALIGN}to go back to school to get something\n" - "{CENTER_ALIGN}you left behind in class.{EXTRA_MSG}" - "{CENTER_ALIGN}If you're ever walking on a dark\n" - "{CENTER_ALIGN}street at night, you probably turn\n" - "{CENTER_ALIGN}around often to check behind you.{EXTRA_MSG}" - "{CENTER_ALIGN}But your timid nature is\n" - "{CENTER_ALIGN}also your good point!{EXTRA_MSG}" - "{CENTER_ALIGN}Because those who know fear are\n" - "{CENTER_ALIGN}those who know true courage.{EXTRA_MSG}" - "{CENTER_ALIGN}A timid person like you should be..."); - -ALIGNED(4) static const u8 gNaiveDescription[] = _( - "{CENTER_ALIGN}You appear to be...{WAIT_PRESS}\n" - "{CENTER_ALIGN}The naive type.{EXTRA_MSG}" - "{CENTER_ALIGN}You are highly curious,\n" - "{CENTER_ALIGN}and you love rare things.{EXTRA_MSG}" - "{CENTER_ALIGN}Your cheerful and carefree\n" - "{CENTER_ALIGN}attitude should make things fun\n" - "{CENTER_ALIGN}for the people around you.{EXTRA_MSG}" - "{CENTER_ALIGN}But you do have one flaw.\n" - "{CENTER_ALIGN}You can be childish.{EXTRA_MSG}" - "{CENTER_ALIGN}You can never sit still.\n" - "{CENTER_ALIGN}You're always on the move.{EXTRA_MSG}" - "{CENTER_ALIGN}You can also be selfish,\n" - "{CENTER_ALIGN}so you should watch yourself.{EXTRA_MSG}" - "{CENTER_ALIGN}A naive person like you should be..."); - -ALIGNED(4) static const u8 gImpishDescription[] = _( - "{CENTER_ALIGN}You appear to be...{WAIT_PRESS}\n" - "{CENTER_ALIGN}The impish type.{EXTRA_MSG}" - "{CENTER_ALIGN}You're playful, cheerful,\n" - "{CENTER_ALIGN}and you love pranks.{EXTRA_MSG}" - "{CENTER_ALIGN}You're also kindhearted.{EXTRA_MSG}" - "{CENTER_ALIGN}That's why the people around\n" - "{CENTER_ALIGN}you find you so irresistible.{EXTRA_MSG}" - "{CENTER_ALIGN}You must be the most\n" - "{CENTER_ALIGN}popular person around!{EXTRA_MSG}" - "{CENTER_ALIGN}Oh?{WAIT_PRESS} You're not that popular?{WAIT_PRESS}\n" - "{CENTER_ALIGN}You're either being modest...\n" - "{CENTER_ALIGN}or you just don't notice it.{EXTRA_MSG}" - "{CENTER_ALIGN}I bet people are just too shy\n" - "{CENTER_ALIGN}to let their feelings be known.{EXTRA_MSG}" - "{CENTER_ALIGN}There's someone out there who's\n" - "{CENTER_ALIGN}afraid to declare their love for you!{EXTRA_MSG}" - "{CENTER_ALIGN}An impish person like you should be..."); - -ALIGNED(4) static const u8 gJollyDescription[] = _( - "{CENTER_ALIGN}You appear to be...{WAIT_PRESS}\n" - "{CENTER_ALIGN}The jolly type.{EXTRA_MSG}" - "{CENTER_ALIGN}Always laughing and smiling,\n" - "{CENTER_ALIGN}you uplift everyone around you.{EXTRA_MSG}" - "{CENTER_ALIGN}You love jokes!{EXTRA_MSG}" - "{CENTER_ALIGN}You have lots of friends, and\n" - "{CENTER_ALIGN}you're popular wherever you go.{EXTRA_MSG}" - "{CENTER_ALIGN}But sometimes you get carried away\n" - "{CENTER_ALIGN}and say things that get you in trouble.{EXTRA_MSG}" - "{CENTER_ALIGN}You should learn to think before\n" - "{CENTER_ALIGN}saying or doing anything.{EXTRA_MSG}" - "{CENTER_ALIGN}A jolly person like you should be..."); - -ALIGNED(4) static const u8 gBraveDescription[] = _( - "{CENTER_ALIGN}You appear to be...{WAIT_PRESS}\n" - "{CENTER_ALIGN}The brave type.{EXTRA_MSG}" - "{CENTER_ALIGN}You have a strong sense of justice.{WAIT_PRESS}\n" - "{CENTER_ALIGN}You hate evil.{WAIT_PRESS}\n" - "{CENTER_ALIGN}You will take on any opponent.{EXTRA_MSG}" - "{CENTER_ALIGN}You are truly a hero!{EXTRA_MSG}" - "{CENTER_ALIGN}Go forth!{EXTRA_MSG}" - "{CENTER_ALIGN}For justice...{WAIT_PRESS}\n" - "{CENTER_ALIGN}For peace on earth...{WAIT_PRESS}\n" - "{CENTER_ALIGN}Fight the forces of evil!{EXTRA_MSG}" - "{CENTER_ALIGN}......{WAIT_PRESS}If I'm wrong...{WAIT_PRESS}\n" - "{CENTER_ALIGN}Work at becoming a true hero!{EXTRA_MSG}" - "{CENTER_ALIGN}A brave person like you should be..."); - -ALIGNED(4) static const u8 gDocileDescription[] = _( - "{CENTER_ALIGN}You appear to be...{WAIT_PRESS}\n" - "{CENTER_ALIGN}The docile type.{EXTRA_MSG}" - "{CENTER_ALIGN}You're very kindhearted.{WAIT_PRESS}\n" - "{CENTER_ALIGN}Very helpful.{WAIT_PRESS}\n" - "{CENTER_ALIGN}You can make friends with anyone.{EXTRA_MSG}" - "{CENTER_ALIGN}You're a wonderful person.{EXTRA_MSG}" - "{CENTER_ALIGN}......{WAIT_PRESS}Is that going overboard?{WAIT_PRESS}\n" - "{CENTER_ALIGN}I don't think so.{EXTRA_MSG}" - "{CENTER_ALIGN}You yourself should be\n" - "{CENTER_ALIGN}the best judge of that.{EXTRA_MSG}" - "{CENTER_ALIGN}A docile person like you should be..."); - -ALIGNED(4) static const u8 gHardyDescription[] = _( - "{CENTER_ALIGN}You appear to be...{WAIT_PRESS}\n" - "{CENTER_ALIGN}The hardy type.{EXTRA_MSG}" - "{CENTER_ALIGN}You do your homework diligently,\n" - "{CENTER_ALIGN}and you know to eat properly.{EXTRA_MSG}" - "{CENTER_ALIGN}You have strong willpower that lets\n" - "{CENTER_ALIGN}you complete tasks, however tough.{EXTRA_MSG}" - "{CENTER_ALIGN}But, you can also be stubborn to the\n" - "{CENTER_ALIGN}point of even feuding with friends...{EXTRA_MSG}" - "{CENTER_ALIGN}Nothing will go right for you when you're\n" - "{CENTER_ALIGN}irritated, so learn to laugh it off.{EXTRA_MSG}" - "{CENTER_ALIGN}A hardy person like you should be..."); - -static const UnkTextStruct2 sUnknown_80F4244 = -{ +static const UnkTextStruct2 sUnknown_80F4244 = { 0, 0, 0, 0, 5, 12, 6, 5, 5, 5, 0, NULL -}; +}; \ No newline at end of file diff --git a/src/data/post_office_guide1.h b/src/data/post_office_guide1.h index de55f3702..9228950fe 100644 --- a/src/data/post_office_guide1.h +++ b/src/data/post_office_guide1.h @@ -21,68 +21,43 @@ enum PostOfficeMenuActions SEND_THANK_YOU_MAIL }; -static const u8 sPostOffice[]; -static const u8 sBulletinBoard[]; -static const u8 sDelivery[]; -static const u8 sFriendRescue[]; -static const u8 sCancel[]; - -static const MenuItem sPostOfficeHelpStartMenu[] = -{ - {sPostOffice, POST_OFFICE}, - {sBulletinBoard, BULLETIN_BOARD}, - {sDelivery, DELIVERY}, - {sFriendRescue, FRIEND_RESCUE}, - {sCancel, CANCEL}, +static const MenuItem sPostOfficeHelpStartMenu[] = { + {_("Post Office"), POST_OFFICE}, + {_("Bulletin Board"), BULLETIN_BOARD}, + {_("Delivery"), DELIVERY}, + {_("{COLOR YELLOW}Friend Rescue{RESET} "), FRIEND_RESCUE}, + {_("Cancel"), CANCEL}, {NULL, EXIT} }; -ALIGNED(4) static const u8 sCancel[] = _("Cancel"); -ALIGNED(4) static const u8 sFriendRescue[] = _("{COLOR YELLOW}Friend Rescue{RESET} "); -ALIGNED(4) static const u8 sDelivery[] = _("Delivery"); -ALIGNED(4) static const u8 sBulletinBoard[] = _("Bulletin Board"); -ALIGNED(4) static const u8 sPostOffice[] = _("Post Office"); - -static const u8 sFriendRescueInfo[]; -static const u8 sGoRescue[]; -static const u8 sGetHelp[]; -static const u8 sDeletingMailInfo[]; -static const u8 sExit[]; - static const MenuItem gPostOfficeHelpFriendRescueMenu[] = { - {sFriendRescueInfo, FRIEND_RESCUE_INFO}, - {sGoRescue, GO_RESCUE}, - {sGetHelp, GET_HELP_MENU}, - {sDeletingMailInfo, DELETING_MAIL}, - {sExit, EXIT}, + {_("Friend Rescue Info"), FRIEND_RESCUE_INFO}, + {_("{COLOR YELLOW}Go rescue{RESET} "), GO_RESCUE}, + {_("{COLOR YELLOW}Get help{RESET} "), GET_HELP_MENU}, + {_("Deleting Mail Info"), DELETING_MAIL}, + {_("Exit"), EXIT}, {NULL, EXIT} }; -ALIGNED(4) static const u8 sExit[] = _("Exit"); -ALIGNED(4) static const u8 sDeletingMailInfo[] = _("Deleting Mail Info"); -ALIGNED(4) static const u8 sGetHelp[] = _("{COLOR YELLOW}Get help{RESET} "); -ALIGNED(4) static const u8 sGoRescue[] = _("{COLOR YELLOW}Go rescue{RESET} "); -ALIGNED(4) static const u8 sFriendRescueInfo[] = _("Friend Rescue Info"); - static const MenuItem sPostOfficeHelpGoRescueMenu[] = { - {"Rescue Procedures", RESCUE_PROCEDURES}, - {"Receive SOS Mail", RECEIVE_SOS_MAIL}, - {"Leave for Rescue", LEAVE_FOR_RESCUE}, - {"Send A-OK Mail", SEND_AOK_MAIL}, - {"Get Thank-You Mail", GET_THANK_YOU_MAIL}, - {sExit, EXIT}, // Typing "Exit" as a literal will automatically point to the previous one also + {_("Rescue Procedures"), RESCUE_PROCEDURES}, + {_("Receive SOS Mail"), RECEIVE_SOS_MAIL}, + {_("Leave for Rescue"), LEAVE_FOR_RESCUE}, + {_("Send A-OK Mail"), SEND_AOK_MAIL}, + {_("Get Thank-You Mail"), GET_THANK_YOU_MAIL}, + {_("Exit"), EXIT}, {NULL, EXIT} }; static const MenuItem sPostOfficeHelpGetHelpMenu[] = { - {"Getting Help", GETTING_HELP}, - {"Send SOS Mail", SEND_SOS_MAIL}, - {"Receive A-OK Mail", RECEIVE_AOK_MAIL}, - {"Send Thank-You Mail", SEND_THANK_YOU_MAIL}, - {sExit, EXIT}, // Typing "Exit" as a literal will automatically point to the previous one also + {_("Getting Help"), GETTING_HELP}, + {_("Send SOS Mail"), SEND_SOS_MAIL}, + {_("Receive A-OK Mail"), RECEIVE_AOK_MAIL}, + {_("Send Thank-You Mail"), SEND_THANK_YOU_MAIL}, + {_("Exit"), EXIT}, {NULL, EXIT} }; diff --git a/src/data/story_missions.h b/src/data/story_missions.h index c7eae1879..a2c253169 100644 --- a/src/data/story_missions.h +++ b/src/data/story_missions.h @@ -1,94 +1,35 @@ -static const u8 gUnknown_8109C94[]; -static const u8 gUnknown_8109C80[]; -static const u8 gUnknown_8109C70[]; -static const u8 gUnknown_8109C60[]; -static const u8 gUnknown_8109C4C[]; -static const u8 gUnknown_8109C3C[]; -static const u8 gUnknown_8109C30[]; -static const u8 gUnknown_8109C24[]; -static const u8 gUnknown_8109C24[]; -static const u8 gUnknown_8109C24[]; -static const u8 gUnknown_8109C14[]; -static const u8 gUnknown_8109C00[]; -static const u8 gUnknown_8109BE8[]; -static const u8 gUnknown_8109BC8[]; -static const u8 gUnknown_8109BB4[]; -static const u8 gUnknown_8109BA0[]; -static const u8 gUnknown_8109B8C[]; -static const u8 gUnknown_8109B78[]; -static const u8 gUnknown_8109B60[]; -static const u8 gUnknown_8109C30[]; -static const u8 gUnknown_8109B4C[]; -static const u8 gUnknown_8109B38[]; -static const u8 gUnknown_8109B24[]; -static const u8 gUnknown_8109B10[]; -static const u8 gUnknown_8109AF8[]; -static const u8 gUnknown_8109AE8[]; -static const u8 gUnknown_8109AD8[]; -static const u8 gUnknown_8109AC4[]; -static const u8 gUnknown_8109AB0[]; -static const u8 gUnknown_8109C14[]; -static const u8 gUnknown_8109A94[]; -static const MissionText gStoryMissionText[] = { - { gUnknown_8109C94, -1, -1, 0, 0 }, - { gUnknown_8109C80, -1, -1, 0, 0 }, - { gUnknown_8109C70, 0, 1, 0, 0 }, - { gUnknown_8109C60, 2, 3, 0, 0 }, - { gUnknown_8109C4C, -1, -1, 0, 0 }, - { gUnknown_8109C3C, 4, 5, 0, 0 }, - { gUnknown_8109C30, -1, -1, 0, 0 }, - { gUnknown_8109C24, -1, -1, 0, 0 }, - { gUnknown_8109C24, 6, 7, 0, 0 }, - { gUnknown_8109C24, 8, 9, 0, 0 }, - { gUnknown_8109C14, -1, 10, 0, 0 }, - { gUnknown_8109C00, 11, 12, 0, 0 }, - { gUnknown_8109BE8, 14, 15, 0, 0 }, - { gUnknown_8109BC8, -1, -1, 0, 0 }, - { gUnknown_8109BB4, 16, 17, 0, 0 }, - { gUnknown_8109BA0, -1, 33, 0, 0 }, - { gUnknown_8109B8C, -1, -1, 0, 0 }, - { gUnknown_8109B78, -1, -1, 0, 0 }, - { gUnknown_8109B60, -1, -1, 0, 0 }, - { gUnknown_8109C30, -1, -1, 0, 0 }, - { gUnknown_8109B4C, 20, 21, 0, 0 }, - { gUnknown_8109B38, 22, 23, 0, 0 }, - { gUnknown_8109B24, 24, 25, 0, 0 }, - { gUnknown_8109B10, -1, 26, 0, 0 }, - { gUnknown_8109AF8, 18, 19, 0, 0 }, - { gUnknown_8109AE8, 27, 28, 0, 0 }, - { gUnknown_8109AD8, -1, -1, 0, 0 }, - { gUnknown_8109AC4, -1, -1, 0, 0 }, - { gUnknown_8109AB0, -1, 32, 0, 0 }, - { gUnknown_8109C14, -1, -1, 0, 0 }, - { gUnknown_8109A94, -1, -1, 0, 0 }, +static const MissionText sStoryMissionText[] = { + { _("Rescue Caterpie."), -1, -1, 0, 0 }, + { _("Rescue Magnemite."), -1, -1, 0, 0 }, + { _("Rescue Diglett."), 0, 1, 0, 0 }, + { _("Rescue Metapod."), 2, 3, 0, 0 }, + { _("Rescue Jumpluff."), -1, -1, 0, 0 }, + { _("Rescue Shiftry."), 4, 5, 0, 0 }, + { _("Meet Xatu."), -1, -1, 0, 0 }, + { _("Fugitive"), -1, -1, 0, 0 }, + { _("Fugitive"), 6, 7, 0, 0 }, + { _("Fugitive"), 8, 9, 0, 0 }, + { _("Meet Ninetales."), -1, 10, 0, 0 }, + { _("Rescue Alakazam."), 11, 12, 0, 0 }, + { _("Seek Rayquaza's help."), 14, 15, 0, 0 }, + { _("{COLOR YELLOW_C}Scenario Progress Dummy{RESET}"), -1, -1, 0, 0 }, + { _("Punish bad Mankey."), 16, 17, 0, 0 }, + { _("Rescue Smeargle."), -1, 33, 0, 0 }, + { _("Explore seafloor."), -1, -1, 0, 0 }, + { _("Meet sea guardian."), -1, -1, 0, 0 }, + { _("Check mystery Pokémon."), -1, -1, 0, 0 }, + { _("Meet Xatu."), -1, -1, 0, 0 }, + { _("Mirage Pokémon 1"), 20, 21, 0, 0 }, + { _("Mirage Pokémon 2"), 22, 23, 0, 0 }, + { _("Mirage Pokémon 3"), 24, 25, 0, 0 }, + { _("Mirage Pokémon 4"), -1, 26, 0, 0 }, + { _("Meet toughest Pokémon."), 18, 19, 0, 0 }, + { _("Catch thief."), 27, 28, 0, 0 }, + { _("Rescue Latias."), -1, -1, 0, 0 }, + { _("Investigate Relic."), -1, -1, 0, 0 }, + { _("Rescue Medicham."), -1, 32, 0, 0 }, + { _("Meet Ninetales."), -1, -1, 0, 0 }, + { _("Break Gardevoir's curse."), -1, -1, 0, 0 }, { NULL, -1, -1, 0, 0 }, -}; - -ALIGNED(4) const u8 gUnknown_8109A94[] = _("Break Gardevoir's curse."); -ALIGNED(4) const u8 gUnknown_8109AB0[] = _("Rescue Medicham."); -ALIGNED(4) const u8 gUnknown_8109AC4[] = _("Investigate Relic."); -ALIGNED(4) const u8 gUnknown_8109AD8[] = _("Rescue Latias."); -ALIGNED(4) const u8 gUnknown_8109AE8[] = _("Catch thief."); -ALIGNED(4) const u8 gUnknown_8109AF8[] = _("Meet toughest Pokémon."); -ALIGNED(4) const u8 gUnknown_8109B10[] = _("Mirage Pokémon 4"); -ALIGNED(4) const u8 gUnknown_8109B24[] = _("Mirage Pokémon 3"); -ALIGNED(4) const u8 gUnknown_8109B38[] = _("Mirage Pokémon 2"); -ALIGNED(4) const u8 gUnknown_8109B4C[] = _("Mirage Pokémon 1"); -ALIGNED(4) const u8 gUnknown_8109B60[] = _("Check mystery Pokémon."); -ALIGNED(4) const u8 gUnknown_8109B78[] = _("Meet sea guardian."); -ALIGNED(4) const u8 gUnknown_8109B8C[] = _("Explore seafloor."); -ALIGNED(4) const u8 gUnknown_8109BA0[] = _("Rescue Smeargle."); -ALIGNED(4) const u8 gUnknown_8109BB4[] = _("Punish bad Mankey."); -ALIGNED(4) const u8 gUnknown_8109BC8[] = _("{COLOR YELLOW_C}Scenario Progress Dummy{RESET}"); -ALIGNED(4) const u8 gUnknown_8109BE8[] = _("Seek Rayquaza's help."); -ALIGNED(4) const u8 gUnknown_8109C00[] = _("Rescue Alakazam."); -ALIGNED(4) const u8 gUnknown_8109C14[] = _("Meet Ninetales."); -ALIGNED(4) const u8 gUnknown_8109C24[] = _("Fugitive"); -ALIGNED(4) const u8 gUnknown_8109C30[] = _("Meet Xatu."); -ALIGNED(4) const u8 gUnknown_8109C3C[] = _("Rescue Shiftry."); -ALIGNED(4) const u8 gUnknown_8109C4C[] = _("Rescue Jumpluff."); -ALIGNED(4) const u8 gUnknown_8109C60[] = _("Rescue Metapod."); -ALIGNED(4) const u8 gUnknown_8109C70[] = _("Rescue Diglett."); -ALIGNED(4) const u8 gUnknown_8109C80[] = _("Rescue Magnemite."); -ALIGNED(4) const u8 gUnknown_8109C94[] = _("Rescue Caterpie."); +}; \ No newline at end of file diff --git a/src/data/trade_items_menu.h b/src/data/trade_items_menu.h index e38cf8331..e56aab7d9 100644 --- a/src/data/trade_items_menu.h +++ b/src/data/trade_items_menu.h @@ -1,12 +1,12 @@ -static const MenuItem sUnknown_80E60A0[3] = { - {"Send item", 1}, - {"Receive item", 2}, +static const MenuItem sUnknown_80E60A0[] = { + {_("Send item"), 1}, + {_("Receive item"), 2}, {NULL, 0}, }; -static const MenuItem sUnknown_80E60D4[3] = { - {"Send item", -1}, - {"Receive item", 2}, +static const MenuItem sUnknown_80E60D4[] = { + {_("Send item"), -1}, + {_("Receive item"), 2}, {NULL, 0}, }; @@ -20,10 +20,10 @@ static const UnkTextStruct2 sUnknown_80E60EC = NULL }; -static const MenuItem sUnknown_80E6104[4] = { - {"Confirm", 3}, - {"Info", 4}, - {"Cancel", 7}, +static const MenuItem sUnknown_80E6104[] = { + {_("Confirm"), 3}, + {_("Info"), 4}, + {_("Cancel"), 7}, {NULL, 0}, }; @@ -37,9 +37,9 @@ static const UnkTextStruct2 unused = NULL }; -static const MenuItem sUnknown_80E6154[3] = { - {"Yes", 5}, - {"No", 6}, +static const MenuItem sUnknown_80E6154[] = { + {_("Yes"), 5}, + {_("No"), 6}, {NULL, 0}, }; @@ -53,9 +53,9 @@ static const UnkTextStruct2 sUnknown_80E6174 = NULL }; -static const MenuItem sUnknown_80E618C[3] = { - {"Yes", 5}, - {"Cancel", 0}, +static const MenuItem sUnknown_80E618C[] = { + {_("Yes"), 5}, + {_("Cancel"), 0}, {NULL, 0}, }; diff --git a/src/data/wonder_mail_1.h b/src/data/wonder_mail_1.h index fd1d3aed6..f4df68bf9 100644 --- a/src/data/wonder_mail_1.h +++ b/src/data/wonder_mail_1.h @@ -1,55 +1,45 @@ - - -const MenuItem gUnknown_80DD970[] = -{ - {"Receive SOS Mail", 0x0}, - {"Leave for Rescue", 0x1}, - {"Send A-OK Mail", 0x2}, - {"Delete Mail", 0x3}, - {"Cancel", 0xA}, - {NULL, 0xA} +const MenuItem gUnknown_80DD970[] = { + {_("Receive SOS Mail"), 0}, + {_("Leave for Rescue"), 1}, + {_("Send A-OK Mail"), 2}, + {_("Delete Mail"), 3}, + {_("Cancel"), 10}, + {NULL, 10} }; -const MenuItem gUnknown_80DD9EC[] = -{ - {"Delete SOS Mail", 0x5}, - {"Delete A-OK Mail", 0x6}, - {"Delete All Mail", 0x7}, - {"Cancel", 0xA}, - {NULL, 0xA} +const MenuItem gUnknown_80DD9EC[] = { + {_("Delete SOS Mail"), 5}, + {_("Delete A-OK Mail"), 6}, + {_("Delete All Mail"), 7}, + {_("Cancel"), 10}, + {NULL, 10} }; -const MenuItem gUnknown_80DDA48[] = -{ - {"Yes", 0x8}, - {"Cancel", 0xA}, - {NULL, 0xA} +const MenuItem gUnknown_80DDA48[] = { + {_("Yes"), 8}, + {_("Cancel"), 10}, + {NULL, 10} }; -const MenuItem gUnknown_80DDA64[] = -{ - {"Yes", 0x8}, - {"No", 0x9}, - {NULL, 0xA} +const MenuItem gUnknown_80DDA64[] = { + {_("Yes"), 8}, + {_("No"), 9}, + {NULL, 10} }; -const MenuItem gUnknown_80DDA80[] = -{ - {"Yes", 0x8}, - {"No", 0x9}, - {"Cancel", 0xA}, - {NULL, 0xA} +const MenuItem gUnknown_80DDA80[] = { + {_("Yes"), 8}, + {_("No"), 9}, + {_("Cancel"), 10}, + {NULL, 10} }; -const MenuItem gUnknown_80DDAA0[] = -{ - {SendWOPokemon, 0x12}, - {"Cancel", 0xA}, - {NULL, 0xA}, +const MenuItem gUnknown_80DDAA0[] = { + {_("Send w/o Pokémon"), 18}, + {_("Cancel"), 10}, + {NULL, 10}, }; -ALIGNED(4) const u8 SendWOPokemon[] = _("Send w/o Pokémon"); - const UnkTextStruct2 gUnknown_80DDACC = { 0x00, 0x00, 0x00, 0x00, @@ -70,31 +60,27 @@ const UnkTextStruct2 gUnknown_80DDAE4 = NULL }; -const MenuItem gUnknown_80DDAFC[] = -{ - {"Confirm", 0xB}, - {"Info", 0xC}, - {NULL, 0xA}, +const MenuItem gUnknown_80DDAFC[] = { + {_("Confirm"), 11}, + {_("Info"), 12}, + {NULL, 10}, }; -const MenuItem gUnknown_80DDB24[] = -{ - {"Game Link cable", 0xD}, - {"Password", 0xF}, - {"Cancel", 0xA}, - {NULL, 0xA}, +const MenuItem gUnknown_80DDB24[] = { + {_("Game Link cable"), 13}, + {_("Password"), 15}, + {_("Cancel"), 10}, + {NULL, 10}, }; -const MenuItem gUnknown_80DDB60[] = -{ - {SendPokemon_80DDB98, 0x11}, - {DontSendPokemon_80DDB80, 0x12}, - {"Cancel", 0xA}, - {NULL, 0xA}, +const MenuItem gUnknown_80DDB60[] = { + {_("Send Pokémon"), 17}, + {_("Don't Send Pokémon"), 18}, + {_("Cancel"), 10}, + {NULL, 10}, }; -ALIGNED(4) const u8 DontSendPokemon_80DDB80[] = _("Don't Send Pokémon"); -ALIGNED(4) const u8 SendPokemon_80DDB98[] = _("Send Pokémon"); + ALIGNED(4) const char gUnknown_80DDBA8[] = _( " What you need to do is\n" diff --git a/src/data/wonder_mail_main_menu.h b/src/data/wonder_mail_main_menu.h index 18a98b928..a54d04dad 100644 --- a/src/data/wonder_mail_main_menu.h +++ b/src/data/wonder_mail_main_menu.h @@ -1,36 +1,32 @@ - - -const MenuItem gSelectWonderMailModeMainMenuItems[3] = -{ - {"Send", WONDER_MAIL_MODE_SEND}, - {"Receive", WONDER_MAIL_MODE_RECEIVE}, +const MenuItem gSelectWonderMailModeMainMenuItems[] = { + {_("Send"), WONDER_MAIL_MODE_SEND}, + {_("Receive"), WONDER_MAIL_MODE_RECEIVE}, {NULL, 0} }; -const MenuItem gSendWonderMailMainMenuItems[4] = -{ - {"Game Link cable", WONDER_MAIL_GAME_LINK}, - {"Password", -1}, - {"Cancel", 8}, +const MenuItem gSendWonderMailMainMenuItems[] = { + {_("Game Link cable"), WONDER_MAIL_GAME_LINK}, + {_("Password"), -1}, + {_("Cancel"), 8}, {NULL, 0} }; -const MenuItem gReceiveWonderMailMainMenuItems[4] = -{ - {"Game Link cable", WONDER_MAIL_GAME_LINK}, - {"Password", WONDER_MAIL_PASSWORD}, - {"Cancel", 8}, +const MenuItem gReceiveWonderMailMainMenuItems[] = { + {_("Game Link cable"), WONDER_MAIL_GAME_LINK}, + {_("Password"), WONDER_MAIL_PASSWORD}, + {_("Cancel"), 8}, {NULL, 0} }; -const MenuItem gUnknown_80E78F8[3] = -{ - {"Yes", 6}, - {"Cancel", 0}, +const MenuItem gUnknown_80E78F8[] = { + {_("Yes"), 6}, + {_("Cancel"), 0}, {NULL, 0} }; + + ALIGNED(4) const char gUnknown_80E7914[] = "There was a communication error."; ALIGNED(4) const char gUnknown_80E7938[] = "An incorrect number of GBA systems are\n" diff --git a/src/debug_menu1.c b/src/debug_menu1.c index 519cf62af..c83bb8c07 100644 --- a/src/debug_menu1.c +++ b/src/debug_menu1.c @@ -1,4 +1,5 @@ #include "global.h" +#include "globaldata.h" #include "code_8097670.h" #include "constants/friend_area.h" #include "constants/main_menu.h" diff --git a/src/debug_unused1.c b/src/debug_unused1.c new file mode 100644 index 000000000..fc285b374 --- /dev/null +++ b/src/debug_unused1.c @@ -0,0 +1,2 @@ +#include "global.h" +#include "globaldata.h" \ No newline at end of file diff --git a/src/debug_unused2.c b/src/debug_unused2.c new file mode 100644 index 000000000..fc285b374 --- /dev/null +++ b/src/debug_unused2.c @@ -0,0 +1,2 @@ +#include "global.h" +#include "globaldata.h" \ No newline at end of file diff --git a/src/debug_unused3.c b/src/debug_unused3.c new file mode 100644 index 000000000..fc285b374 --- /dev/null +++ b/src/debug_unused3.c @@ -0,0 +1,2 @@ +#include "global.h" +#include "globaldata.h" \ No newline at end of file diff --git a/src/debug_unused4.c b/src/debug_unused4.c new file mode 100644 index 000000000..fc285b374 --- /dev/null +++ b/src/debug_unused4.c @@ -0,0 +1,2 @@ +#include "global.h" +#include "globaldata.h" \ No newline at end of file diff --git a/src/debug_unused5.c b/src/debug_unused5.c new file mode 100644 index 000000000..fc285b374 --- /dev/null +++ b/src/debug_unused5.c @@ -0,0 +1,2 @@ +#include "global.h" +#include "globaldata.h" \ No newline at end of file diff --git a/src/debug_unused6.c b/src/debug_unused6.c new file mode 100644 index 000000000..fc285b374 --- /dev/null +++ b/src/debug_unused6.c @@ -0,0 +1,2 @@ +#include "global.h" +#include "globaldata.h" \ No newline at end of file diff --git a/src/hints_menu1.c b/src/hints_menu1.c index 263b4d472..45d49ce19 100644 --- a/src/hints_menu1.c +++ b/src/hints_menu1.c @@ -108,7 +108,7 @@ static void DrawHintSelectionMenu(void) sub_80073B8(sUnknown_203B264->unk34); PrintStringOnWindow(16, 0, sHints, sUnknown_203B264->unk34, 0); - for (hintIndex = 0; hintIndex < NUM_HINTS; hintIndex++) { + for (hintIndex = 0; hintIndex < HINT_MAX; hintIndex++) { y = sub_8013800(&sUnknown_203B264->input, hintIndex); PrintStringOnWindow(10, y, gCommonHints[hintIndex].heading, sUnknown_203B264->unk34, 0); } diff --git a/src/kangaskhan_storage1.c b/src/kangaskhan_storage1.c index 9bd044f20..25cf93b93 100644 --- a/src/kangaskhan_storage1.c +++ b/src/kangaskhan_storage1.c @@ -220,7 +220,7 @@ static void sub_8016FF8(void) case 7: gKangaskhanStorageWork->fallbackState = KANGASKHAN_STORAGE_MAIN_MENU; gKangaskhanStorageWork->monPortrait.spriteId = FALSE; - CreateDialogueBoxAndPortrait(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_STORAGE_HAS_NOTHING], 0, gKangaskhanStorageWork->monPortraitPtr, 0x10D); + CreateDialogueBoxAndPortrait(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_STORAGE_EMPTY], 0, gKangaskhanStorageWork->monPortraitPtr, 0x10D); break; case 8: gKangaskhanStorageWork->fallbackState = KANGASKHAN_STORAGE_MAIN_MENU; @@ -231,12 +231,12 @@ static void sub_8016FF8(void) sub_8090E14(gFormatBuffer_Items[0], &gKangaskhanStorageWork->storedItem, 0); gKangaskhanStorageWork->fallbackState = 14; gKangaskhanStorageWork->monPortrait.spriteId = FALSE; - CreateDialogueBoxAndPortrait(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_DEPOSIT__INVALID_ITEM], 0, gKangaskhanStorageWork->monPortraitPtr, 0x30D); + CreateDialogueBoxAndPortrait(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_DEPOSIT_INVALID_ITEM], 0, gKangaskhanStorageWork->monPortraitPtr, 0x30D); break; case 10: gKangaskhanStorageWork->fallbackState = 14; gKangaskhanStorageWork->monPortrait.spriteId = FALSE; - CreateDialogueBoxAndPortrait(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_DEPOSIT__TOO_MANY_OF_ITEM], 0, gKangaskhanStorageWork->monPortraitPtr, 0x30D); + CreateDialogueBoxAndPortrait(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_DEPOSIT_TOO_MANY_OF_ITEM], 0, gKangaskhanStorageWork->monPortraitPtr, 0x30D); break; case 11: gKangaskhanStorageWork->fallbackState = 13; diff --git a/src/personality_test1.c b/src/personality_test1.c index 499895066..0af227121 100644 --- a/src/personality_test1.c +++ b/src/personality_test1.c @@ -182,7 +182,7 @@ static void GenerateNewQuestionOrGender(void) sPersonalityTestTracker->QuestionCounter++; if (sPersonalityTestTracker->QuestionCounter > MAX_ASKED_QUESTIONS) { - CreateMenuDialogueBoxAndPortrait(gGenderText, 0, 0, gGenderMenu, 0, 3, 0, 0, 257); + CreateMenuDialogueBoxAndPortrait(sGender0, 0, 0, gGenderMenu, 0, 3, 0, 0, 257); sPersonalityTestTracker->TestState = PERSONALITY_PLAYER_GENDER; } else { From 7506f05cb8999bddc06faed9ff43c2ca973db462 Mon Sep 17 00:00:00 2001 From: Kermalis <29823718+Kermalis@users.noreply.github.com> Date: Fri, 15 Nov 2024 16:30:57 -0500 Subject: [PATCH 13/16] Update code_8097670.h --- include/code_8097670.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/code_8097670.h b/include/code_8097670.h index 34f15dbab..d712ad31e 100644 --- a/include/code_8097670.h +++ b/include/code_8097670.h @@ -44,7 +44,7 @@ enum AdventureAchievement // size: 0xC4 struct unkStruct_203B494 { - /* 0x4 */ u32 achievements; // Adventure achievement flags + /* 0x0 */ u32 achievements; // Adventure achievement flags /* 0x4 */ s32 numAdventures; /* 0x8 */ s32 friendRescueSuccesses; /* 0xC */ s32 numEvolved; From e8ae8d8b73c14903fc9a1bffb5cae7395a4d4883 Mon Sep 17 00:00:00 2001 From: Kermalis <29823718+Kermalis@users.noreply.github.com> Date: Fri, 15 Nov 2024 16:36:14 -0500 Subject: [PATCH 14/16] Update personality_test1.h --- src/data/personality_test1.h | 44 +++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/src/data/personality_test1.h b/src/data/personality_test1.h index 50a2d8a72..5e939f674 100644 --- a/src/data/personality_test1.h +++ b/src/data/personality_test1.h @@ -754,25 +754,37 @@ static const MenuItem gGenderMenu[] = { -UNUSED static const u8 unknownPersonality[NUM_PERSONALITIES] = { - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 +UNUSED static const u8 sUnusedLUT[NUM_PERSONALITIES] = { + [HARDY ] = HARDY + 1, + [DOCILE ] = DOCILE + 1, + [BRAVE ] = BRAVE + 1, + [JOLLY ] = JOLLY + 1, + [IMPISH ] = IMPISH + 1, + [NAIVE ] = NAIVE + 1, + [TIMID ] = TIMID + 1, + [HASTY ] = HASTY + 1, + [SASSY ] = SASSY + 1, + [CALM ] = CALM + 1, + [RELAXED] = RELAXED + 1, + [LONELY ] = LONELY + 1, + [QUIRKY ] = QUIRKY + 1, }; static const s16 gStarters[NUM_PERSONALITIES][2] = { - // MALE / FEMALE - [HARDY] = {MONSTER_CHARMANDER, MONSTER_PIKACHU}, - [DOCILE] = {MONSTER_BULBASAUR, MONSTER_CHIKORITA}, - [BRAVE] = {MONSTER_MACHOP, MONSTER_CHARMANDER}, - [JOLLY] = {MONSTER_SQUIRTLE, MONSTER_TOTODILE}, - [IMPISH] = {MONSTER_PIKACHU, MONSTER_CUBONE}, - [NAIVE] = {MONSTER_TOTODILE, MONSTER_EEVEE}, - [TIMID] = {MONSTER_CYNDAQUIL, MONSTER_MUDKIP}, - [HASTY] = {MONSTER_TORCHIC, MONSTER_SKITTY}, - [SASSY] = {MONSTER_TREECKO, MONSTER_TORCHIC}, - [CALM] = {MONSTER_MUDKIP, MONSTER_BULBASAUR}, - [RELAXED] = {MONSTER_PSYDUCK, MONSTER_SQUIRTLE}, - [LONELY] = {MONSTER_CUBONE, MONSTER_PSYDUCK}, - [QUIRKY] = {MONSTER_MEOWTH, MONSTER_TREECKO} + // MALE FEMALE + [HARDY ] = { MONSTER_CHARMANDER, MONSTER_PIKACHU }, + [DOCILE ] = { MONSTER_BULBASAUR, MONSTER_CHIKORITA }, + [BRAVE ] = { MONSTER_MACHOP, MONSTER_CHARMANDER }, + [JOLLY ] = { MONSTER_SQUIRTLE, MONSTER_TOTODILE }, + [IMPISH ] = { MONSTER_PIKACHU, MONSTER_CUBONE }, + [NAIVE ] = { MONSTER_TOTODILE, MONSTER_EEVEE }, + [TIMID ] = { MONSTER_CYNDAQUIL, MONSTER_MUDKIP }, + [HASTY ] = { MONSTER_TORCHIC, MONSTER_SKITTY }, + [SASSY ] = { MONSTER_TREECKO, MONSTER_TORCHIC }, + [CALM ] = { MONSTER_MUDKIP, MONSTER_BULBASAUR }, + [RELAXED] = { MONSTER_PSYDUCK, MONSTER_SQUIRTLE }, + [LONELY ] = { MONSTER_CUBONE, MONSTER_PSYDUCK }, + [QUIRKY ] = { MONSTER_MEOWTH, MONSTER_TREECKO } }; From d7fbd95975e88aade95275add62fe746d1144ba3 Mon Sep 17 00:00:00 2001 From: Kermalis <29823718+Kermalis@users.noreply.github.com> Date: Fri, 15 Nov 2024 16:54:26 -0500 Subject: [PATCH 15/16] Update pokemon.h --- include/pokemon.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/pokemon.h b/include/pokemon.h index ec99ed9f0..f4290ff7d 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -102,12 +102,12 @@ extern s32 sub_808D580(s32 *); static inline bool8 PokemonFlag1(PokemonStruct1 *mon) { - return (mon->unk0 & FLAG_UNK_1); + return (mon->unk0 >> (FLAG_UNK_1 - 1)) & 1; } static inline bool8 PokemonFlag2(PokemonStruct1 *mon) { - return ((mon->unk0 >> (FLAG_ON_TEAM - 1)) & 1); + return (mon->unk0 >> (FLAG_ON_TEAM - 1)) & 1; } static inline void SetPokemonFlag2(PokemonStruct1 *mon) From 04d4fb787815b2e3a6d3aa9759974be3a1002328 Mon Sep 17 00:00:00 2001 From: Kermalis <29823718+Kermalis@users.noreply.github.com> Date: Fri, 15 Nov 2024 19:21:24 -0500 Subject: [PATCH 16/16] Fix 32bit reads/writes --- include/structs/dungeon_entity.h | 7 +++--- src/dungeon_serializer.c | 40 ++++++++++++++++---------------- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/include/structs/dungeon_entity.h b/include/structs/dungeon_entity.h index 0bf034ef3..df5c121c1 100644 --- a/include/structs/dungeon_entity.h +++ b/include/structs/dungeon_entity.h @@ -8,6 +8,7 @@ #include "structs/str_items.h" #include "structs/str_moves.h" #include "structs/str_position.h" +#include "math.h" #include "number_util.h" #include "sprite.h" @@ -231,9 +232,9 @@ typedef struct EntityInfo /* 0x28 */ s16 flashFireBoost; // These start at 0x1000, and are halved by certain moves like Screech to lower the corresponding stat. // Index 0 is Attack. Index 1 is Special Attack. - /* 0x2C */ s32 offensiveMultipliers[2]; + /* 0x2C */ s24_8 offensiveMultipliers[2]; // Index 0 is Defense. Index 1 is Special Defense. - /* 0x34 */ s32 defensiveMultipliers[2]; + /* 0x34 */ s24_8 defensiveMultipliers[2]; /* 0x3C */ HiddenPower hiddenPower; /* 0x40 */ JoinedAt joinedAt; // Uses the dungeon index in dungeon.h. /* 0x44 */ ActionContainer action; @@ -338,7 +339,7 @@ typedef struct EntityInfo /* 0x169 */ u8 turnsSinceWarpScarfActivation; /* 0x16C */ Position targetPos; /* 0x170 */ Position pixelPos; - u32 unk174; + s24_8 unk174; u16 abilityEffectFlags; // See enum AbilityEffectFlags /* 0x17A */ u16 mimicMoveIDs[MAX_MON_MOVES]; // All moves that Mimic has copied (not sure on size...) // Previous value of targetPosition for movement, 1 and 2 moves ago. diff --git a/src/dungeon_serializer.c b/src/dungeon_serializer.c index 9016fd767..7e2dbfb9b 100644 --- a/src/dungeon_serializer.c +++ b/src/dungeon_serializer.c @@ -42,6 +42,7 @@ 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 s24_8 ReadF24_8(DataSerializer *seri); static void ReadHiddenPower(DataSerializer *seri, HiddenPower *dst); static void ReadImmobilize(DataSerializer *seri, Immobilize *dst); static void ReadIQSkills(DataSerializer *seri, u8 *dst); @@ -59,7 +60,6 @@ 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); @@ -95,6 +95,7 @@ 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 WriteF24_8(DataSerializer *seri, s24_8 value); static void WriteHiddenPower(DataSerializer *seri, HiddenPower *src); static void WriteImmobilize(DataSerializer *seri, Immobilize *src); static void WriteIQSkills(DataSerializer *seri, u8 *src); @@ -113,7 +114,6 @@ 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); @@ -307,10 +307,10 @@ static void WriteMonster(DataSerializer *seri, Entity *src) 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]); + WriteF24_8(seri, info->offensiveMultipliers[0]); + WriteF24_8(seri, info->offensiveMultipliers[1]); + WriteF24_8(seri, info->defensiveMultipliers[0]); + WriteF24_8(seri, info->defensiveMultipliers[1]); WriteActionContainer(seri, &info->action); WriteType(seri, info->types[0]); WriteType(seri, info->types[1]); @@ -390,7 +390,7 @@ static void WriteMonster(DataSerializer *seri, Entity *src) WriteU8(seri, info->unk168); WriteU8(seri, info->turnsSinceWarpScarfActivation); WriteTilePos(seri, &info->targetPos); - WriteS32(seri, info->unk174); + WriteF24_8(seri, info->unk174); WriteU16(seri, info->abilityEffectFlags); WriteS16(seri, info->unk1F8); WriteS16(seri, info->mobileTurnTimer); @@ -990,10 +990,10 @@ static void ReadMonster(DataSerializer *seri, bool8 isTeamMember, s32 index) 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); + entInfo.offensiveMultipliers[0] = ReadF24_8(seri); + entInfo.offensiveMultipliers[1] = ReadF24_8(seri); + entInfo.defensiveMultipliers[0] = ReadF24_8(seri); + entInfo.defensiveMultipliers[1] = ReadF24_8(seri); ReadActionContainer(seri, &entInfo.action); entInfo.types[0] = ReadType(seri); entInfo.types[1] = ReadType(seri); @@ -1074,7 +1074,7 @@ static void ReadMonster(DataSerializer *seri, bool8 isTeamMember, s32 index) entInfo.unk168 = ReadU8(seri); entInfo.turnsSinceWarpScarfActivation = ReadU8(seri); ReadTilePos(seri, &entInfo.targetPos); - entInfo.unk174 = ReadS32(seri); + entInfo.unk174 = ReadF24_8(seri); entInfo.abilityEffectFlags = ReadU16(seri); entInfo.unk1F8 = ReadS16(seri); entInfo.mobileTurnTimer = ReadS16(seri); @@ -1600,18 +1600,18 @@ static void WriteU32(DataSerializer *seri, u32 value) WriteBytes(seri, &uStack_8, 4); } -UNUSED static void sub_808308C(DataSerializer *seri, u32 value) +UNUSED static void WriteS32(DataSerializer *seri, s32 value) { - u32 uStack_8; + s32 uStack_8; uStack_8 = value; WriteBytes(seri, &uStack_8, 4); } -static void WriteS32(DataSerializer *seri, s32 value) +static void WriteF24_8(DataSerializer *seri, s24_8 value) { - s32 uStack_8; + s24_8 uStack_8; uStack_8 = value; @@ -1684,17 +1684,17 @@ static u32 ReadU32(DataSerializer *seri) return local_8; } -UNUSED static u32 sub_80831B4(DataSerializer *seri) +UNUSED static s32 ReadS32(DataSerializer *seri) { - u32 local_8; + s32 local_8; ReadBytes(seri, &local_8, 4); return local_8; } -static s32 ReadS32(DataSerializer *seri) +static s24_8 ReadF24_8(DataSerializer *seri) { - s32 local_8; + s24_8 local_8; ReadBytes(seri, &local_8, 4); return local_8;