From ba3f4714b1c374f2acc75972b9250391eea7e5b0 Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Mon, 2 Dec 2024 21:54:14 -0800 Subject: [PATCH 01/11] Decomp more of pokemon.s --- asm/pokemon.s | 499 ---------------------------------------------- include/pokemon.h | 14 +- src/pokemon.c | 203 +++++++++++++++++++ 3 files changed, 212 insertions(+), 504 deletions(-) diff --git a/asm/pokemon.s b/asm/pokemon.s index 1ce0b21da..7b70b2b25 100644 --- a/asm/pokemon.s +++ b/asm/pokemon.s @@ -5,505 +5,6 @@ .text - thumb_func_start sub_808D1DC -sub_808D1DC: - push {r4-r7,lr} - mov r7, r8 - push {r7} - mov r8, r0 - movs r2, 0x8 - ldrsh r1, [r0, r2] - ldr r0, _0808D204 - ldr r2, [r0] - lsls r0, r1, 3 - adds r0, r1 - lsls r0, 3 - adds r0, r2 - ldrb r6, [r0, 0x16] - ldr r0, _0808D208 - ldr r0, [r0] - adds r0, r6 - ldrb r0, [r0] - cmp r0, 0 - bne _0808D238 - b _0808D268 - .align 2, 0 -_0808D204: .4byte gMonsterParameters -_0808D208: .4byte gFriendAreas -_0808D20C: - ldr r0, [r7] - adds r0, r5 - mov r1, r8 - movs r2, 0x58 - bl memcpy - ldr r1, [r7] - adds r1, r5 - ldrh r2, [r1] - ldr r0, _0808D234 - ands r0, r2 - strh r0, [r1] - mov r1, r8 - movs r2, 0x8 - ldrsh r0, [r1, r2] - bl sub_80980B4 - ldr r0, [r7] - adds r0, r5 - b _0808D26A - .align 2, 0 -_0808D234: .4byte 0x0000bfff -_0808D238: - movs r4, 0 - ldr r7, _0808D274 -_0808D23C: - movs r0, 0x58 - adds r5, r4, 0 - muls r5, r0 - ldr r0, [r7] - adds r0, r5, r0 - ldrb r1, [r0] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - bne _0808D25E - adds r0, r4, 0 - bl sub_80923D4 - lsls r0, 24 - lsrs r0, 24 - cmp r0, r6 - beq _0808D20C -_0808D25E: - adds r4, 0x1 - movs r0, 0xCE - lsls r0, 1 - cmp r4, r0 - ble _0808D23C -_0808D268: - movs r0, 0 -_0808D26A: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - .align 2, 0 -_0808D274: .4byte gRecruitedPokemonRef - thumb_func_end sub_808D1DC - - thumb_func_start sub_808D278 -sub_808D278: - push {r4-r7,lr} - lsls r0, 16 - asrs r0, 16 - ldr r1, _0808D29C - ldr r2, [r1] - lsls r1, r0, 3 - adds r1, r0 - lsls r1, 3 - adds r1, r2 - ldrb r6, [r1, 0x16] - ldr r0, _0808D2A0 - ldr r0, [r0] - adds r0, r6 - ldrb r0, [r0] - cmp r0, 0 - bne _0808D2AA - b _0808D2DA - .align 2, 0 -_0808D29C: .4byte gMonsterParameters -_0808D2A0: .4byte gFriendAreas -_0808D2A4: - ldr r0, [r7] - adds r0, r5 - b _0808D2DC -_0808D2AA: - movs r4, 0 - ldr r7, _0808D2E4 -_0808D2AE: - movs r0, 0x58 - adds r5, r4, 0 - muls r5, r0 - ldr r0, [r7] - adds r0, r5, r0 - ldrb r1, [r0] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - bne _0808D2D0 - adds r0, r4, 0 - bl sub_80923D4 - lsls r0, 24 - lsrs r0, 24 - cmp r0, r6 - beq _0808D2A4 -_0808D2D0: - adds r4, 0x1 - movs r0, 0xCE - lsls r0, 1 - cmp r4, r0 - ble _0808D2AE -_0808D2DA: - movs r0, 0 -_0808D2DC: - pop {r4-r7} - pop {r1} - bx r1 - .align 2, 0 -_0808D2E4: .4byte gRecruitedPokemonRef - thumb_func_end sub_808D278 - - thumb_func_start sub_808D2E8 -sub_808D2E8: - push {r4-r6,lr} - sub sp, 0x60 - adds r4, r0, 0 - adds r6, r1, 0 - adds r5, r2, 0 - ldr r0, [sp, 0x70] - lsls r4, 16 - asrs r4, 16 - lsls r5, 24 - lsrs r5, 24 - str r3, [sp] - str r0, [sp, 0x4] - add r0, sp, 0x8 - adds r1, r4, 0 - adds r2, r6, 0 - adds r3, r5, 0 - bl sub_808CFD0 - add r0, sp, 0x8 - bl sub_808D1DC - add sp, 0x60 - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_808D2E8 - - thumb_func_start sub_808D31C -sub_808D31C: - push {lr} - adds r1, r0, 0 - ldrb r0, [r1, 0x2] - cmp r0, 0 - bne _0808D338 - movs r2, 0 - ldrb r0, [r1, 0x4] - cmp r0, 0x41 - bne _0808D330 - movs r2, 0x1 -_0808D330: - adds r0, r2, 0 - cmp r0, 0 - bne _0808D338 - strh r0, [r1] -_0808D338: - pop {r0} - bx r0 - thumb_func_end sub_808D31C - - thumb_func_start GetPlayerPokemonStruct -GetPlayerPokemonStruct: - push {r4,lr} - movs r3, 0 - ldr r0, _0808D360 - ldr r4, [r0] -_0808D344: - movs r0, 0x58 - muls r0, r3 - adds r2, r0, r4 - ldrb r1, [r2] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _0808D364 - ldrb r0, [r2, 0x2] - cmp r0, 0 - beq _0808D364 - adds r0, r2, 0 - b _0808D370 - .align 2, 0 -_0808D360: .4byte gRecruitedPokemonRef -_0808D364: - adds r3, 0x1 - movs r0, 0xCE - lsls r0, 1 - cmp r3, r0 - ble _0808D344 - movs r0, 0 -_0808D370: - pop {r4} - pop {r1} - bx r1 - thumb_func_end GetPlayerPokemonStruct - - thumb_func_start sub_808D378 -sub_808D378: - push {r4,lr} - movs r3, 0 - ldr r0, _0808D3A4 - ldr r4, [r0] -_0808D380: - movs r0, 0x58 - muls r0, r3 - adds r2, r0, r4 - ldrb r1, [r2] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _0808D3A8 - movs r1, 0 - ldrb r0, [r2, 0x4] - cmp r0, 0x41 - bne _0808D39A - movs r1, 0x1 -_0808D39A: - cmp r1, 0 - beq _0808D3A8 - adds r0, r2, 0 - b _0808D3B4 - .align 2, 0 -_0808D3A4: .4byte gRecruitedPokemonRef -_0808D3A8: - adds r3, 0x1 - movs r0, 0xCE - lsls r0, 1 - cmp r3, r0 - ble _0808D380 - movs r0, 0 -_0808D3B4: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_808D378 - - thumb_func_start sub_808D3BC -sub_808D3BC: - push {r4-r6,lr} - movs r4, 0 - ldr r0, _0808D3E0 - ldr r2, [r0] - adds r3, r2, 0 - movs r6, 0x1 - movs r5, 0xCE - lsls r5, 1 -_0808D3CC: - ldrb r1, [r2] - adds r0, r6, 0 - ands r0, r1 - cmp r0, 0 - beq _0808D3E4 - ldrb r0, [r2, 0x4] - cmp r0, 0x40 - bne _0808D3E4 - adds r0, r3, 0 - b _0808D3F0 - .align 2, 0 -_0808D3E0: .4byte gRecruitedPokemonRef -_0808D3E4: - adds r2, 0x58 - adds r3, 0x58 - adds r4, 0x1 - cmp r4, r5 - ble _0808D3CC - movs r0, 0 -_0808D3F0: - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_808D3BC - - thumb_func_start sub_808D3F8 -sub_808D3F8: - push {r4-r6,lr} - movs r4, 0 - ldr r0, _0808D41C - ldr r2, [r0] - adds r3, r2, 0 - movs r6, 0x1 - movs r5, 0xCE - lsls r5, 1 -_0808D408: - ldrb r1, [r2] - adds r0, r6, 0 - ands r0, r1 - cmp r0, 0 - beq _0808D420 - ldrb r0, [r2, 0x4] - cmp r0, 0x41 - bne _0808D420 - adds r0, r3, 0 - b _0808D42C - .align 2, 0 -_0808D41C: .4byte gRecruitedPokemonRef -_0808D420: - adds r2, 0x58 - adds r3, 0x58 - adds r4, 0x1 - cmp r4, r5 - ble _0808D408 - movs r0, 0 -_0808D42C: - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_808D3F8 - - thumb_func_start sub_808D434 -sub_808D434: - push {r4-r7,lr} - adds r6, r1, 0 - lsls r0, 16 - asrs r5, r0, 16 - ldr r0, _0808D468 - ldr r2, [r0] - movs r4, 0 - movs r3, 0 - movs r0, 0x1 - mov r12, r0 - movs r7, 0xCE - lsls r7, 1 -_0808D44C: - ldrb r1, [r2] - mov r0, r12 - ands r0, r1 - cmp r0, 0 - beq _0808D46E - movs r1, 0x8 - ldrsh r0, [r2, r1] - cmp r0, r5 - bne _0808D46E - cmp r4, r6 - bne _0808D46C - adds r0, r2, 0 - b _0808D478 - .align 2, 0 -_0808D468: .4byte gRecruitedPokemonRef -_0808D46C: - adds r4, 0x1 -_0808D46E: - adds r3, 0x1 - adds r2, 0x58 - cmp r3, r7 - ble _0808D44C - movs r0, 0 -_0808D478: - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_808D434 - - thumb_func_start GetFriendSum_808D480 -GetFriendSum_808D480: - push {r4,r5,lr} - ldr r0, _0808D4A8 - ldr r2, [r0] - movs r4, 0 - movs r5, 0x1 - ldr r3, _0808D4AC -_0808D48C: - ldrb r1, [r2] - adds r0, r5, 0 - ands r0, r1 - cmp r0, 0 - beq _0808D498 - adds r4, 0x1 -_0808D498: - subs r3, 0x1 - adds r2, 0x58 - cmp r3, 0 - bne _0808D48C - adds r0, r4, 0 - pop {r4,r5} - pop {r1} - bx r1 - .align 2, 0 -_0808D4A8: .4byte gRecruitedPokemonRef -_0808D4AC: .4byte 0x0000019d - thumb_func_end GetFriendSum_808D480 - - thumb_func_start sub_808D4B0 -sub_808D4B0: - push {r4-r6,lr} - ldr r0, _0808D4F8 - ldr r2, [r0] - movs r5, 0 - movs r4, 0 - ldr r6, _0808D4FC -_0808D4BC: - ldrh r3, [r2] - lsrs r0, r3, 1 - movs r1, 0x1 - ands r0, r1 - cmp r0, 0 - beq _0808D4E4 - ldrb r0, [r2, 0x2] - cmp r0, 0 - bne _0808D4E4 - movs r1, 0 - ldrb r0, [r2, 0x4] - cmp r0, 0x41 - bne _0808D4D8 - movs r1, 0x1 -_0808D4D8: - cmp r1, 0 - bne _0808D4E4 - movs r5, 0x1 - adds r0, r6, 0 - ands r0, r3 - strh r0, [r2] -_0808D4E4: - adds r4, 0x1 - adds r2, 0x58 - movs r0, 0xCE - lsls r0, 1 - cmp r4, r0 - ble _0808D4BC - adds r0, r5, 0 - pop {r4-r6} - pop {r1} - bx r1 - .align 2, 0 -_0808D4F8: .4byte gRecruitedPokemonRef -_0808D4FC: .4byte 0x0000fffd - thumb_func_end sub_808D4B0 - - thumb_func_start sub_808D500 -sub_808D500: - push {r4-r6,lr} - ldr r0, _0808D53C - ldr r2, [r0] - movs r5, 0 - movs r4, 0 - ldr r6, _0808D540 -_0808D50C: - ldrh r3, [r2] - lsrs r0, r3, 1 - movs r1, 0x1 - ands r0, r1 - cmp r0, 0 - beq _0808D526 - ldrb r0, [r2, 0x2] - cmp r0, 0 - bne _0808D526 - movs r5, 0x1 - adds r0, r6, 0 - ands r0, r3 - strh r0, [r2] -_0808D526: - adds r4, 0x1 - adds r2, 0x58 - movs r0, 0xCE - lsls r0, 1 - cmp r4, r0 - ble _0808D50C - adds r0, r5, 0 - pop {r4-r6} - pop {r1} - bx r1 - .align 2, 0 -_0808D53C: .4byte gRecruitedPokemonRef -_0808D540: .4byte 0x0000fffd - thumb_func_end sub_808D500 - thumb_func_start GetUnitSum_808D544 GetUnitSum_808D544: push {r4-r7,lr} diff --git a/include/pokemon.h b/include/pokemon.h index dfe0b30fb..9a3275a48 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -87,13 +87,17 @@ 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); +PokemonStruct1 *GetPlayerPokemonStruct(void); +PokemonStruct1 *sub_808D1DC(PokemonStruct1*); +PokemonStruct1 *sub_808D378(void); +PokemonStruct1 *sub_808D3BC(void); +PokemonStruct1 *sub_808D3F8(void); +PokemonStruct1 * sub_808D434(s16 species, s32 param_2); +s32 GetFriendSum_808D480(void); +bool8 sub_808D4B0(void); +bool8 sub_808D500(void); // pokemon.s -extern PokemonStruct1 *GetPlayerPokemonStruct(void); -extern u32 sub_808D1DC(PokemonStruct1*); -extern PokemonStruct1 *sub_808D378(void); -extern PokemonStruct1 *sub_808D3BC(void); -extern PokemonStruct1 *sub_808D3F8(void); extern s32 GetUnitSum_808D544(u32); extern s32 sub_808D580(s32 *); diff --git a/src/pokemon.c b/src/pokemon.c index 865661bcf..15af66608 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -238,3 +238,206 @@ void sub_808D144(PokemonStruct1 *pokemon, struct unkStruct_808D144 *r1) } } + +PokemonStruct1 *sub_808D1DC(PokemonStruct1 *pokemon) +{ + u32 friendArea; + s32 i; + + s32 species = pokemon->speciesNum; + friendArea = gMonsterParameters[species].friendArea; + + if(!gFriendAreas[friendArea]) return NULL; + for (i = 0; i < NUM_MONSTERS; i++) { + if (!PokemonFlag1(&gRecruitedPokemonRef->pokemon[i])) { + u8 speciesFriendArea = sub_80923D4(i); + if (speciesFriendArea == friendArea) { + gRecruitedPokemonRef->pokemon[i] = *pokemon; + gRecruitedPokemonRef->pokemon[i].unk0 &= 0xbfff; + sub_80980B4(pokemon->speciesNum); + return &gRecruitedPokemonRef->pokemon[i]; + } + } + } + return NULL; +} + +PokemonStruct1 *sub_808D278(s16 species, PokemonStruct1 *pokemon) +{ + u32 friendArea; + s32 i; + + friendArea = gMonsterParameters[species].friendArea; + + if(!gFriendAreas[friendArea]) return NULL; + for (i = 0; i < NUM_MONSTERS; i++) { + if (!PokemonFlag1(&gRecruitedPokemonRef->pokemon[i])) { + u8 speciesFriendArea = sub_80923D4(i); + if (speciesFriendArea == friendArea) { + return &gRecruitedPokemonRef->pokemon[i]; + } + } + } + return NULL; +} + +PokemonStruct1 *sub_808D2E8(s32 species, u8 *name, u32 _itemID, DungeonLocation *location, u16 *moveID) +{ + PokemonStruct1 pokemon; + + sub_808CFD0(&pokemon, species, name, (u8)_itemID, location, moveID); + return sub_808D1DC(&pokemon); +} + +void sub_808D31C(PokemonStruct1 *param_1) +{ + bool8 flag; +#ifndef NONMATCHING + register bool32 flag_32 asm("r0"); +#else + bool32 flag_32; +#endif + + if ((!param_1->isTeamLeader)){ + flag = ((param_1->dungeonLocation).id == 0x41); + flag_32 = flag; + if(!flag_32) param_1->unk0 = flag_32; + } +} + +PokemonStruct1 * GetPlayerPokemonStruct(void) +{ + s32 index; + + for(index = 0; index < NUM_MONSTERS; index++) + { + if(((PokemonFlag1(&gRecruitedPokemonRef->pokemon[index])))){ + if(IsMonTeamLeader(&gRecruitedPokemonRef->pokemon[index])) { + return &gRecruitedPokemonRef->pokemon[index]; + } + } + } + return NULL; +} + +PokemonStruct1 * sub_808D378(void) +{ + s32 index; + + for(index = 0; index < NUM_MONSTERS; index++) + { + if(((PokemonFlag1(&gRecruitedPokemonRef->pokemon[index])))){ + if(IsMonPartner(&gRecruitedPokemonRef->pokemon[index])) { + return &gRecruitedPokemonRef->pokemon[index]; + } + } + } + return NULL; +} + +// NOTE: couldn't match with macros.. +// https://decomp.me/scratch/Qorg0 +PokemonStruct1 * sub_808D3BC(void) +{ + PokemonStruct1 *pokeStruct; + s32 index; + + for(index = 0; index < NUM_MONSTERS; index++) + { + pokeStruct = &gRecruitedPokemonRef->pokemon[index]; + if(((*(u8 *)&pokeStruct->unk0 & FLAG_UNK_1) && (pokeStruct->dungeonLocation.id == DUNGEON_JOIN_LOCATION_LEADER))) { + return pokeStruct; + } + } + return NULL; +} + +// NOTE: couldn't match with macros.. +// https://decomp.me/scratch/jCa3V +PokemonStruct1 * sub_808D3F8(void) +{ + PokemonStruct1 *pokeStruct; + s32 index; + + for(index = 0; index < NUM_MONSTERS; index++) + { + pokeStruct = &gRecruitedPokemonRef->pokemon[index]; + if(((*(u8 *)&pokeStruct->unk0 & FLAG_UNK_1) && (pokeStruct->dungeonLocation.id == DUNGEON_JOIN_LOCATION_PARTNER))) { + return &gRecruitedPokemonRef->pokemon[index]; + } + } + return NULL; +} + +PokemonStruct1 * sub_808D434(s16 species, s32 param_2) +{ + PokemonStruct1 *pokeStruct; + s32 index; + s32 counter; + s32 species_s32 = species; + + pokeStruct = gRecruitedPokemonRef->pokemon; + counter = 0; + for(index = 0; index < NUM_MONSTERS; index++, pokeStruct++) + { + if(((PokemonFlag1(pokeStruct)) && (pokeStruct->speciesNum == species_s32))) { + if (counter == param_2) + return pokeStruct; + counter++; + } + } + return NULL; +} + +s32 GetFriendSum_808D480(void) +{ + s32 index; + s32 count; + PokemonStruct1 *pokeStruct; + + pokeStruct = gRecruitedPokemonRef->pokemon; + count = 0; + for(index = 0; index < NUM_MONSTERS; index++, pokeStruct++) + { + if(PokemonFlag1(pokeStruct)){ + count++; + } + } + return count; +} + +bool8 sub_808D4B0(void) +{ + s32 index; + PokemonStruct1 *pokeStruct; + bool8 flag; + + pokeStruct = gRecruitedPokemonRef->pokemon; + flag = FALSE; + for(index = 0; index < NUM_MONSTERS; index++, pokeStruct++) + { + if(PokemonFlag2(pokeStruct) && !IsMonTeamLeader(pokeStruct) && !IsMonPartner(pokeStruct)){ + flag = TRUE; + pokeStruct->unk0 &= 0xFFFD; + } + } + return flag; +} + +bool8 sub_808D500(void) +{ + s32 index; + PokemonStruct1 *pokeStruct; + bool8 flag; + + pokeStruct = gRecruitedPokemonRef->pokemon; + flag = FALSE; + for(index = 0; index < NUM_MONSTERS; index++, pokeStruct++) + { + if(PokemonFlag2(pokeStruct) && !IsMonTeamLeader(pokeStruct)){ + flag = TRUE; + pokeStruct->unk0 &= 0xFFFD; + } + } + return flag; +} From 456dfec6b0c54743aed23edfd150fb3fb3d15365 Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Fri, 6 Dec 2024 12:02:30 -0800 Subject: [PATCH 02/11] move some data over and nonmatch GetUnitSum --- asm/pokemon.s | 163 ----- data/data_8107224.s | 1371 ------------------------------------------- data/data_81076E4.s | 1345 ++++++++++++++++++++++++++++++++++++++++++ include/pokemon.h | 2 +- ld_script.txt | 4 +- src/pokemon.c | 1094 +++++++++++++++++++++++++++++++++- src/pokemon_mid.c | 969 ------------------------------ 7 files changed, 2427 insertions(+), 2521 deletions(-) delete mode 100644 asm/pokemon.s create mode 100644 data/data_81076E4.s delete mode 100644 src/pokemon_mid.c diff --git a/asm/pokemon.s b/asm/pokemon.s deleted file mode 100644 index 7b70b2b25..000000000 --- a/asm/pokemon.s +++ /dev/null @@ -1,163 +0,0 @@ - #include "asm/constants/gba_constants.inc" - #include "asm/macros.inc" - - .syntax unified - - .text - - thumb_func_start GetUnitSum_808D544 -GetUnitSum_808D544: - push {r4-r7,lr} - adds r4, r0, 0 - ldr r0, _0808D57C - ldr r3, [r0] - movs r5, 0 - movs r2, 0 - movs r7, 0x1 - movs r6, 0xCE - lsls r6, 1 - adds r1, r4, 0 -_0808D558: - ldrh r0, [r3] - lsrs r0, 1 - ands r0, r7 - cmp r0, 0 - beq _0808D56C - cmp r4, 0 - beq _0808D568 - str r2, [r1] -_0808D568: - adds r1, 0x4 - adds r5, 0x1 -_0808D56C: - adds r2, 0x1 - adds r3, 0x58 - cmp r2, r6 - ble _0808D558 - adds r0, r5, 0 - pop {r4-r7} - pop {r1} - bx r1 - .align 2, 0 -_0808D57C: .4byte gRecruitedPokemonRef - thumb_func_end GetUnitSum_808D544 - - thumb_func_start sub_808D580 -sub_808D580: - push {r4-r7,lr} - adds r6, r0, 0 - ldr r0, _0808D5AC - ldr r2, [r0] - movs r5, 0 - movs r4, 0 - mov r12, r0 - adds r3, r6, 0 -_0808D590: - ldrb r0, [r2, 0x2] - cmp r0, 0 - beq _0808D5B0 - ldrb r1, [r2] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _0808D5B0 - cmp r6, 0 - beq _0808D5B0 - str r4, [r3] - adds r5, 0x1 - b _0808D5BC - .align 2, 0 -_0808D5AC: .4byte gRecruitedPokemonRef -_0808D5B0: - adds r4, 0x1 - adds r2, 0x58 - movs r0, 0xCE - lsls r0, 1 - cmp r4, r0 - ble _0808D590 -_0808D5BC: - mov r0, r12 - ldr r2, [r0] - movs r4, 0 - lsls r0, r5, 2 - adds r7, r0, r6 -_0808D5C6: - movs r1, 0 - ldrb r0, [r2, 0x4] - cmp r0, 0x41 - bne _0808D5D0 - movs r1, 0x1 -_0808D5D0: - cmp r1, 0 - beq _0808D5F8 - ldrb r0, [r2, 0x2] - cmp r0, 0 - bne _0808D5F8 - ldrh r1, [r2] - lsrs r0, r1, 1 - movs r3, 0x1 - ands r0, r3 - cmp r0, 0 - beq _0808D5F8 - adds r0, r3, 0 - ands r0, r1 - cmp r0, 0 - beq _0808D5F8 - cmp r6, 0 - beq _0808D5F8 - str r4, [r7] - adds r5, 0x1 - b _0808D604 -_0808D5F8: - adds r4, 0x1 - adds r2, 0x58 - movs r0, 0xCE - lsls r0, 1 - cmp r4, r0 - ble _0808D5C6 -_0808D604: - mov r0, r12 - ldr r2, [r0] - movs r4, 0 - movs r3, 0x1 - lsls r0, r5, 2 - adds r7, r0, r6 -_0808D610: - ldrh r1, [r2] - lsrs r0, r1, 1 - ands r0, r3 - cmp r0, 0 - beq _0808D63E - adds r0, r3, 0 - ands r0, r1 - cmp r0, 0 - beq _0808D63E - ldrb r0, [r2, 0x2] - cmp r0, 0 - bne _0808D63E - movs r1, 0 - ldrb r0, [r2, 0x4] - cmp r0, 0x41 - bne _0808D632 - movs r1, 0x1 -_0808D632: - cmp r1, 0 - bne _0808D63E - cmp r6, 0 - beq _0808D63E - stm r7!, {r4} - adds r5, 0x1 -_0808D63E: - adds r4, 0x1 - adds r2, 0x58 - movs r0, 0xCE - lsls r0, 1 - cmp r4, r0 - ble _0808D610 - adds r0, r5, 0 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_808D580 - - .align 2,0 diff --git a/data/data_8107224.s b/data/data_8107224.s index 4574e5be7..bdc0e4353 100644 --- a/data/data_8107224.s +++ b/data/data_8107224.s @@ -148,1376 +148,5 @@ gUnknown_8107544: @ 8107544 .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/data_81076E4.s b/data/data_81076E4.s new file mode 100644 index 000000000..9adb67e84 --- /dev/null +++ b/data/data_81076E4.s @@ -0,0 +1,1345 @@ +.section .rodata + +.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 +.align 2,0 + +@ 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/include/pokemon.h b/include/pokemon.h index 9a3275a48..a9013ba96 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -98,7 +98,7 @@ bool8 sub_808D4B0(void); bool8 sub_808D500(void); // pokemon.s -extern s32 GetUnitSum_808D544(u32); +extern s32 GetUnitSum_808D544(s32 *); extern s32 sub_808D580(s32 *); static inline bool8 PokemonFlag1(PokemonStruct1 *mon) diff --git a/ld_script.txt b/ld_script.txt index e576aa391..768e36b08 100755 --- a/ld_script.txt +++ b/ld_script.txt @@ -286,8 +286,6 @@ SECTIONS { src/code_80869E4.o(.text); src/dungeon_cutscenes.o(.text); src/pokemon.o(.text); - asm/pokemon.o(.text); - src/pokemon_mid.o(.text); asm/pokemon_2.o(.text); src/pokemon_3.o(.text); asm/pokemon_3.o(.text); @@ -549,6 +547,8 @@ SECTIONS { data/data_8107010.o(.rodata); src/dungeon_serializer.o(.rodata); data/data_8107224.o(.rodata); + src/pokemon.o(.rodata); + data/data_81076E4.o(.rodata); src/game_options.o(.rodata); data/data_8109964.o(.rodata); src/code_80972F4.o(.rodata); diff --git a/src/pokemon.c b/src/pokemon.c index 15af66608..0e7dea0a3 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -1,5 +1,10 @@ #include "global.h" +#include "globaldata.h" #include "pokemon.h" +#include "code_800D090.h" +#include "code_8097DD0.h" +#include "constants/colors.h" +#include "decompress.h" #include "file_system.h" #include "pokemon_3.h" #include "text_util.h" @@ -8,20 +13,62 @@ #include "exclusive_pokemon.h" extern struct FileArchive gSystemFileArchive; -extern const char gUnknown_81075F4; +extern struct FileArchive gMonsterFileArchive; + EWRAM_DATA MonsterDataEntry *gMonsterParameters; EWRAM_DATA OpenedFile *gMonsterParametersFile; +EWRAM_DATA SpriteOAM gShadowSprites[3]; // Shadow sprites of some kind EWRAM_DATA unkStruct_203B45C gRecruitedPokemon; EWRAM_DATA u16 gLevelCurrentPokeId; +EWRAM_DATA LevelData gLevelCurrentData[0x64]; EWRAM_DATA_2 unkStruct_203B45C *gRecruitedPokemonRef = {0}; extern void sub_808E490(Move* a1, s32 species); +struct unkStruct_8107654 { + s16 unk0; + s16 fill2; + s32 unk4; +}; + +//const char gUnknown_810763C[] = "{color}%c%s{reset}" ; +//const u8 gUnknown_8107645[12] = {0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; +//struct unkStruct_8107654 gUnknown_8107654[6]; +//ALIGNED(4) const char gUnknown_8107684[] = "kao%03d"; +//ALIGNED(4) const char gUnknown_810768C[] = "lvmp%03d"; // lvmp%03d\0 +//const u8 gShadowSpriteSizeFlags_8107698[] = {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, 0x03, 0x00, 0x00, 0x00 }; +//ALIGNED(4) const char gUnknown_81076BC[] = "etcfont"; +//const s32 gUnknown_81076C4[6] = {-4, -8, -16, -4, -8, -16}; // x-coord positioning for shadow sprites + +ALIGNED(4) static const char sMonsterParameterFileName[] = "monspara"; +ALIGNED(4) static const char gUnknown_8107600[] = _("{color YELLOW_RAW}%s{reset}"); +ALIGNED(4) static const char gUnknown_8107608[] = _("{color CYAN_RAW}%s{reset}"); +ALIGNED(4) static const char gUnownLetters[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ!?"; +ALIGNED(4) static const char gUnknown_8107630[] = "%s%c"; +ALIGNED(4) static const char gUnknown_8107638[] = "%s"; +extern const char gUnknown_810763C[]; +extern const u8 gUnknown_8107645[12]; +extern struct unkStruct_8107654 gUnknown_8107654[6]; +extern const char gUnknown_8107684[]; +extern const char gUnknown_810768C[]; // lvmp%03d +extern const u8 gShadowSpriteSizeFlags_8107698[]; +extern const char gUnknown_81076BC[]; +extern const s32 gUnknown_81076C4[6]; + +extern s16 gFrenzyPlantIQReq; // 0x14d +extern s16 gHydroCannonIQReq; // 0x14d +extern s16 gBlastBurnIQReq; // 0x14d +extern s16 gVoltTackleIQReq; // 0x14d +extern char* gFormattedStatusNames[]; + +extern int sprintf(char *, const char *, ...); +extern u32 ReturnIntFromChar(u8 r0); +extern void xxx_pokemon2_to_pokemonstruct_808DF44(PokemonStruct1*, PokemonStruct2*); void LoadMonsterParameters(void) { gRecruitedPokemonRef = &gRecruitedPokemon; - gMonsterParametersFile = OpenFileAndGetFileDataPtr(&gUnknown_81075F4, &gSystemFileArchive); + gMonsterParametersFile = OpenFileAndGetFileDataPtr(sMonsterParameterFileName, &gSystemFileArchive); gMonsterParameters = (MonsterDataEntry *)gMonsterParametersFile->data; gLevelCurrentPokeId = 0; } @@ -290,19 +337,9 @@ PokemonStruct1 *sub_808D2E8(s32 species, u8 *name, u32 _itemID, DungeonLocation } void sub_808D31C(PokemonStruct1 *param_1) -{ - bool8 flag; -#ifndef NONMATCHING - register bool32 flag_32 asm("r0"); -#else - bool32 flag_32; -#endif - - if ((!param_1->isTeamLeader)){ - flag = ((param_1->dungeonLocation).id == 0x41); - flag_32 = flag; - if(!flag_32) param_1->unk0 = flag_32; - } +{ + if ((!IsMonTeamLeader(param_1)) && !IsMonPartner(param_1)) + param_1->unk0 = 0; } PokemonStruct1 * GetPlayerPokemonStruct(void) @@ -441,3 +478,1030 @@ bool8 sub_808D500(void) } return flag; } + +#ifdef NONMATCHING +s32 GetUnitSum_808D544(s32 *team) +{ + int *ptr; + int index; + s32 count; + PokemonStruct1 *pokemon; + + pokemon = gRecruitedPokemonRef->pokemon; + count = 0; + for(index = 0, ptr = team; index < NUM_MONSTERS; index++, pokemon++) + { + if ((PokemonFlag2(pokemon))) { + if (team != 0) *ptr = index; + ptr++; + count++; + } + } + return count; +} +#else +NAKED +s32 GetUnitSum_808D544(s32 *team) +{ + asm_unified( + "\tpush {r4-r7,lr}\n" + "\tadds r4, r0, 0\n" + "\tldr r0, _0808D57C\n" + "\tldr r3, [r0]\n" + "\tmovs r5, 0\n" + "\tmovs r2, 0\n" + "\tmovs r7, 0x1\n" + "\tmovs r6, 0xCE\n" + "\tlsls r6, 1\n" + "\tadds r1, r4, 0\n" +"_0808D558:\n" + "\tldrh r0, [r3]\n" + "\tlsrs r0, 1\n" + "\tands r0, r7\n" + "\tcmp r0, 0\n" + "\tbeq _0808D56C\n" + "\tcmp r4, 0\n" + "\tbeq _0808D568\n" + "\tstr r2, [r1]\n" +"_0808D568:\n" + "\tadds r1, 0x4\n" + "\tadds r5, 0x1\n" +"_0808D56C:\n" + "\tadds r2, 0x1\n" + "\tadds r3, 0x58\n" + "\tcmp r2, r6\n" + "\tble _0808D558\n" + "\tadds r0, r5, 0\n" + "\tpop {r4-r7}\n" + "\tpop {r1}\n" + "\tbx r1\n" + "\t.align 2, 0\n" +"_0808D57C: .4byte gRecruitedPokemonRef"); +} +#endif + +s32 sub_808D580(s32 *team) +{ + PokemonStruct1 *mon; + s32 index; + s32 counter; + + mon = gRecruitedPokemonRef->pokemon; + counter = 0; + + for(index = 0; index < NUM_MONSTERS; index++, mon++) + { + if (((IsMonTeamLeader(mon)) && (PokemonFlag1(mon))) && (team != NULL)) { + team[counter] = index; + counter++; + break; + } + } + + for(mon = gRecruitedPokemonRef->pokemon, index = 0; index < NUM_MONSTERS; index++, mon++) + { + if (((IsMonPartner(mon) && !IsMonTeamLeader(mon) && PokemonFlag2(mon)) && (PokemonFlag1(mon))) && + ((((team != NULL))))) + { + team[counter] = index; + counter++; + break; + } + } + + + for(mon = gRecruitedPokemonRef->pokemon, index = 0; index < NUM_MONSTERS; index++, mon++) + { + if ((((PokemonFlag2(mon)) && (PokemonFlag1(mon))) && + (!IsMonTeamLeader(mon))) && + (((!IsMonPartner(mon) && (team != NULL))))) { + team[counter] = index; + counter++; + } + } + return counter; +} + +s32 sub_808D654(s32 *ptr) +{ + s32 i; + PokemonStruct1 *mon = &gRecruitedPokemonRef->pokemon[0]; + s32 count = 0; + s32 *ptr2; + + for (i = 0, ptr2 = ptr; i < NUM_MONSTERS; i++, mon++) { + if (PokemonFlag2(mon) && !IsMonTeamLeader(mon) && !IsMonPartner(mon)) { + if (ptr != NULL) { + *ptr2 = i; + } + ptr2++; + count++; + } + } + + return count; +} + +// The same as sub_808D654 except it doesn't exclude partner. +s32 sub_808D6A4(s32 *ptr) +{ + s32 i; + PokemonStruct1 *mon = &gRecruitedPokemonRef->pokemon[0]; + s32 count = 0; + s32 *ptr2; + + for (i = 0, ptr2 = ptr; i < NUM_MONSTERS; i++, mon++) { + if (PokemonFlag2(mon) && !IsMonTeamLeader(mon)) { + if (ptr != NULL) { + *ptr2 = i; + } + ptr2++; + count++; + } + } + + return count; +} + +bool8 sub_808D6E8() +{ + s32 i; + s32 count = 0; + s32 size_count = 0; + for (i = 0; i < NUM_MONSTERS; i++) { + PokemonStruct1* pokemon = &gRecruitedPokemonRef->pokemon[i]; + if (PokemonFlag1(pokemon) && PokemonFlag2(pokemon)) { + size_count += GetBodySize(pokemon->speciesNum); + count++; + } + } + if ((size_count < 6) && (count < 4)) { + return 1; + } + return 0; +} + +// this one is surprisingly frustrating +// https://decomp.me/scratch/OIMII - (99.24% matching - Seth) +NAKED +bool8 sub_808D750(s16 index_) { + asm_unified( +"\tpush {r4-r7,lr}\n" +"\tmov r7, r9\n" +"\tmov r6, r8\n" +"\tpush {r6,r7}\n" +"\tlsls r0, 16\n" +"\tasrs r0, 16\n" +"\tmov r8, r0\n" +"\tmovs r6, 0\n" +"\tmovs r5, 0\n" +"\tmovs r4, 0\n" +"\tldr r0, _0808D7C8\n" +"\tmov r9, r0\n" +"\tmovs r7, 0x1\n" +"_0808D76A:\n" +"\tmovs r0, 0x58\n" +"\tadds r1, r4, 0\n" +"\tmuls r1, r0\n" +"\tmov r2, r9\n" +"\tldr r0, [r2]\n" +"\tadds r1, r0, r1\n" +"\tldrh r2, [r1]\n" +"\tadds r0, r7, 0\n" +"\tands r0, r2\n" +"\tcmp r0, 0\n" +"\tbeq _0808D798\n" +"\tlsrs r0, r2, 1\n" +"\tands r0, r7\n" +"\tcmp r0, 0\n" +"\tbeq _0808D798\n" +"\tmovs r2, 0x8\n" +"\tldrsh r0, [r1, r2]\n" +"\tbl GetBodySize\n" +"\tlsls r0, 24\n" +"\tlsrs r0, 24\n" +"\tadds r5, r0\n" +"\tadds r6, 0x1\n" +"_0808D798:\n" +"\tadds r4, 0x1\n" +"\tmovs r0, 0xCE\n" +"\tlsls r0, 1\n" +"\tcmp r4, r0\n" +"\tble _0808D76A\n" +"\tcmp r6, 0x3\n" +"\tbgt _0808D7CC\n" +"\tldr r2, _0808D7C8\n" +"\tmovs r0, 0x58\n" +"\tmov r1, r8\n" +"\tmuls r1, r0\n" +"\tldr r0, [r2]\n" +"\tadds r1, r0, r1\n" +"\tmovs r2, 0x8\n" +"\tldrsh r0, [r1, r2]\n" +"\tbl GetBodySize\n" +"\tlsls r0, 24\n" +"\tlsrs r0, 24\n" +"\tadds r5, r0\n" +"\tcmp r5, 0x6\n" +"\tbgt _0808D7CC\n" +"\tmovs r0, 0x1\n" +"\tb _0808D7CE\n" +"\t.align 2, 0\n" +"_0808D7C8: .4byte gRecruitedPokemonRef\n" +"_0808D7CC:\n" +"\tmovs r0, 0\n" +"_0808D7CE:\n" +"\tpop {r3,r4}\n" +"\tmov r8, r3\n" +"\tmov r9, r4\n" +"\tpop {r4-r7}\n" +"\tpop {r1}\n" +"\tbx r1\n" + ); +} + +// bool8 sub_808D750(s16 index_) { +// s32 i; +// register s32 index asm("r8") = index_; +// s32 count = 0; +// s32 size_count = 0; + +// for (i = 0; i < 413; i++) { +// register PokemonStruct1* pokemon = &i[gRecruitedPokemonRef->pokemon]; +// register u16 unk0 = pokemon->unk0; +// if ((unk0 & 1) && ((pokemon->unk0 >> 1) & 1)) { +// size_count += GetBodySize(pokemon->speciesNum); +// count++; +// } +// } + +// if (count < 4) { +// PokemonStruct1* pokemon; + +// pokemon = &gRecruitedPokemonRef->pokemon[index]; + +// size_count += GetBodySize(pokemon->speciesNum); +// if (size_count < 7) { +// return TRUE; +// } +// } +// return FALSE; +// } + + +void PeekPokemonItem(s16 index_, BulkItem* item) { + s32 index = index_; + PokemonStruct1* pokemon = &gRecruitedPokemonRef->pokemon[index]; + item->id = pokemon->heldItem.id; + item->quantity = pokemon->heldItem.quantity; +} + +void GivePokemonItem(s16 index_, BulkItem* item) { + s32 index = index_; + PokemonStruct1* pokemon = &gRecruitedPokemonRef->pokemon[index]; + pokemon->heldItem.id = item->id; + pokemon->heldItem.quantity = item->quantity; +} + +bool8 IsPokemonRenamed(PokemonStruct1* pokemon) { + char species_name[20]; + char* species = GetMonSpecies(pokemon->speciesNum); + s32 i; + CopyStringtoBuffer(species_name, species); + for (i = 0; i < POKEMON_NAME_LENGTH; i++) { + if (pokemon->name[i] != species_name[i]) { + return FALSE; + } + if (!pokemon->name[i]) { + return TRUE; + } + } + return TRUE; +} + +bool8 ComparePokemonNames(s16 a1, s16 a2) +{ + s32 index1 = a1; + s32 index2 = a2; + u8* name1 = gRecruitedPokemonRef->pokemon[index1].name; + u8* name2 = gRecruitedPokemonRef->pokemon[index2].name; + + s32 i; + for (i = 0; i < POKEMON_NAME_LENGTH; i++) { + s32 c1 = ReturnIntFromChar(*name1); + s32 c2 = ReturnIntFromChar(*name2); + if (c1 > c2) { + return TRUE; + } + if (c1 < c2) { + return FALSE; + } + name1++; + name2++; + } + return FALSE; +} + +void CopyMonsterNameToBuffer(u8 * buffer, s32 index) +{ + s16 index_s16 = index; + strncpy(buffer, gMonsterParameters[index_s16].species, 0x14); +} + +void CopyYellowMonsterNametoBuffer(u8 *buffer, s16 index) +{ + s32 new_index = index; + sprintfStatic(buffer, gUnknown_8107600, gMonsterParameters[new_index].species); // {color YELLOW}%s{reset} +} + +void CopyCyanMonsterNametoBuffer(u8 *buffer, s16 index) +{ + s32 new_index = index; + sprintfStatic(buffer, gUnknown_8107608, gMonsterParameters[new_index].species); // {color CYAN}%s{reset} +} + +void sub_808D930(u8 *buffer, s32 index) +{ + char *unownString; + s32 unownIndex; + const char *preload; + s16 index_s16 = index; + + if (GetBaseSpecies(index_s16) == MONSTER_UNOWN) { + preload = gUnknown_8107630; // %s%c + unownString = GetMonSpecies(MONSTER_UNOWN); + unownIndex = GetUnownIndex(index_s16); + sprintfStatic(buffer,preload,unownString,gUnownLetters[unownIndex]); // ABCDEFGHIJKLMNOPQRSTUVWXYZ!? + } + else { + sprintfStatic(buffer,gUnknown_8107638, gMonsterParameters[index_s16].species); // %s + } +} + +char * GetMonSpecies(s16 index) +{ + return gMonsterParameters[index].species; +} + +void PrintColoredPokeNameToBuffer(u8 *buffer, PokemonStruct1 *pokemon, s32 colorNum) +{ + u8 nameBuffer [20]; + + sub_80922B4(nameBuffer, pokemon->name, POKEMON_NAME_LENGTH); + if (colorNum == COLOR_WHITE) { + colorNum = COLOR_CYAN; + } + sprintfStatic(buffer,gUnknown_810763C,colorNum,nameBuffer); // {color}%c%s{reset} +} + +void sub_808D9DC(u8 *buffer, PokemonStruct2 *param_2, s32 colorNum) +{ + u8 nameBuffer [20]; + + sub_80922B4(nameBuffer, param_2->name, POKEMON_NAME_LENGTH); + if (colorNum == COLOR_WHITE) { + colorNum = COLOR_YELLOW; + } + sprintfStatic(buffer,gUnknown_810763C,colorNum,nameBuffer); // {color}%c%s{reset} +} + +void sub_808DA0C(u8 *buffer, PokemonStruct2 *param_2) +{ + u8 nameBuffer [20]; + + sub_80922B4(nameBuffer, param_2->name, POKEMON_NAME_LENGTH); + sprintfStatic(buffer,gUnknown_8107638,nameBuffer); // %s +} + +void PrintPokeNameToBuffer(u8 *buffer, PokemonStruct1 *pokemon) +{ + sub_80922B4(buffer, pokemon->name, POKEMON_NAME_LENGTH); +} + +bool8 sub_808DA44(s32 a1_, u32 a2_) +{ + // this is the dumbest thing ever, but just making a1 a s16 and + // a2 a u8 did weird stuff with shifting... + s32 a1 = (s16)a1_; + u32 a2 = (u8)a2_; + if (a2 > 0xc) { + s32 i; + struct unkStruct_8107654 data[6]; + memcpy(data, gUnknown_8107654, 6 * sizeof(struct unkStruct_8107654)); + + for (i = 0; i < 10 && data[i].unk0; i++) { + if (data[i].unk0 == a1 && data[i].unk4 == a2) { + return 1; + } + } + return 0; + } + else { + return gUnknown_8107645[a2]; + } +} + +u8 *GetCategoryString(s16 index) +{ + return gMonsterParameters[index].category; +} + +u8 GetBodySize(s32 index) +{ + s16 index_s16 = index; + return gMonsterParameters[index_s16].bodySize; +} + +u8 GetShadowSize(s16 index) +{ + return gMonsterParameters[index].shadowSize; +} + +s32 GetMovementSpeed(s16 index) +{ + return gMonsterParameters[index].movementSpeed; +} + +u8 GetMovementType(s16 index) +{ + return gMonsterParameters[index].movementType; +} + +u8 GetRegenSpeed(s16 index) +{ + return ((u8)(gMonsterParameters[index].regenSpeed) << 25) >> 24; +} + +bool8 GetCanMoveFlag(s16 index) +{ + return gMonsterParameters[index].canMove; +} + +u8 GetChanceAsleep(s16 index) +{ + return gMonsterParameters[index].chanceAsleep; +} + +u32 GetWeight(s16 index) +{ + return gMonsterParameters[index].weight; +} + +u32 GetSize(s16 index) +{ + return gMonsterParameters[index].size; +} + +u8 GetFriendArea(s32 index) +{ + s16 index_s32 = index; + return gMonsterParameters[index_s32].friendArea; +} + +s32 GetBaseHP(s32 index) +{ + s16 index_s32 = index; + return gMonsterParameters[index_s32].baseHP; +} + +bool8 MonsterIDCanThrowItems(s16 index) +{ + return gMonsterParameters[index].canThrowItems; +} + +u8 GetUnk12(s16 index) +{ + return gMonsterParameters[index].unk12; +} + +s16 GetPokemonEvolveFrom(s16 index) +{ + return gMonsterParameters[index].preEvolution.evolveFrom; +} + +s32 GetBaseOffensiveStat(s32 index, u32 r1) +{ + s16 index_s16 = index; + return gMonsterParameters[index_s16].baseAtkSpAtk[r1]; +} + +s32 GetBaseDefensiveStat(s32 index, u32 r1) +{ + s16 index_s16 = index; + return gMonsterParameters[index_s16].baseDefSpDef[r1]; +} + +u8 GetPokemonType(s32 index, u32 typeIndex) +{ + s16 newIndex = index; + return gMonsterParameters[newIndex].types[typeIndex]; +} + +u8 GetPokemonAbility(s16 index, u32 abilityIndex) +{ + return gMonsterParameters[index].abilities[abilityIndex]; +} + +s16 GetDexInternalNo(s32 index, u32 r1) +{ + s16 index_s16 = index; + return gMonsterParameters[index_s16].dexInternal[r1]; +} + +s16 GetRecruitRate(s16 index) +{ + return gMonsterParameters[index].recruitRate; +} + +s16 GetAlphabetParentNo(s16 index, s32 r1) +{ + return gMonsterParameters[index].alphabetParent[r1]; +} + + +s16 GetInternalNo(s16 index) +{ + return gMonsterParameters[index].dexInternal[1]; +} + +s32 CalculateEXPGain(s16 index, s32 level) +{ + s32 expYield = gMonsterParameters[index].expYield; + return expYield + (expYield * (level - 1)) / 10; +} + +s16 GetPokemonEvolveConditions(s16 index, unkEvolve *r1) +{ + PreEvolution temp2; + EvolutionRequirements temp1; + temp1 = gMonsterParameters[index].evolutionRequirements; + temp2 = gMonsterParameters[index].preEvolution; + r1->preEvolution = temp2; + r1->evolutionRequirements = temp1; + // The return value is not used anywhere, but necessary for the function to match. + return index; +} + +u8 GetPokemonOverworldPalette(s16 index, u32 r1) +{ + s32 id = SpeciesId(index); + if (r1 != 0) + { + return 10; + } + else + { + return gMonsterParameters[id].overworldPalette; + } +} + +OpenedFile *OpenPokemonDialogueSpriteFile(s16 index) +{ + // Looks like this loads the dialogue sprite for the pokemon + + char buffer[0xC]; + if(gMonsterParameters[index].dialogueSprites == 0) + { + return NULL; + } + sprintf(buffer, gUnknown_8107684, index); // "kao%03d" + return OpenFile(buffer, &gMonsterFileArchive); +} + +OpenedFile *GetDialogueSpriteDataPtr(s32 index) +{ + // Looks like this loads the dialogue sprite for the pokemon + char buffer[0xC]; + s16 id = SpeciesId(index); + + if(gMonsterParameters[id].dialogueSprites == 0) + { + return NULL; + } + sprintf(buffer, gUnknown_8107684, id); // "kao%03d" + return OpenFileAndGetFileDataPtr(buffer, &gMonsterFileArchive); +} + +bool8 IsPokemonDialogueSpriteAvail(s16 index, s32 spriteId) +{ + // checking to see if dialogue sprite is available?? + return (gMonsterParameters[index].dialogueSprites >> spriteId) & 1; +} + +void xxx_pokemonstruct_index_to_pokemon2_808DE30(void* r0, u32 r1) +{ + xxx_pokemonstruct_to_pokemon2_808DE50(r0, &gRecruitedPokemonRef->pokemon[r1], r1); +} + +void xxx_pokemonstruct_to_pokemon2_808DE50(PokemonStruct2 * a1, PokemonStruct1 *pokemon, s32 a3) +{ + s32 i; + BulkItem* held; + Item* slot; + + a1->unk0 = pokemon->unk0; + a1->level = pokemon->level; + a1->IQ = pokemon->IQ; + a1->IQSkills = pokemon->IQSkills; + GenerateHiddenPower(&a1->hiddenPower); + a1->dungeonLocation = pokemon->dungeonLocation; + a1->isTeamLeader = pokemon->isTeamLeader; + a1->unkA = a3; + a1->speciesNum = pokemon->speciesNum; + a1->tacticIndex = pokemon->tacticIndex; + a1->unk12 = pokemon->pokeHP; + a1->unk10 = pokemon->pokeHP; + + for (i = 0; i < 2; i++) { + a1->offense.att[i] = pokemon->offense.att[i]; + a1->offense.def[i] = pokemon->offense.def[i]; + } + + a1->currExp = pokemon->currExp; + CopyAndResetMoves(&a1->moves, pokemon->moves); + + for (i = 0; i < POKEMON_NAME_LENGTH; i++) { + a1->name[i] = pokemon->name[i]; + } + + held = &pokemon->heldItem; + slot = &a1->itemSlot; + + if ((u32)(-held->id | held->id) >> 31) { + HeldItemToSlot(slot, held); + } + else { + slot->id = ITEM_NOTHING; + slot->quantity = 0; + slot->flags = 0; + } + + a1->belly = IntToFixedPoint(100); + a1->maxBelly = IntToFixedPoint(100); +} + +void xxx_pokemon2_to_pokemonstruct_index_808DF2C(s32 a1, PokemonStruct2* a2) +{ + xxx_pokemon2_to_pokemonstruct_808DF44(&a1[gRecruitedPokemonRef->pokemon], a2); +} + + +void xxx_pokemon2_to_pokemonstruct_808DF44(PokemonStruct1* pokemon, PokemonStruct2* a2) +{ + s32 i; + + pokemon->unk0 = a2->unk0; + pokemon->level = a2->level; + pokemon->IQ = a2->IQ; + pokemon->IQSkills = a2->IQSkills; + pokemon->dungeonLocation = a2->dungeonLocation; + pokemon->isTeamLeader = a2->isTeamLeader; + pokemon->speciesNum = a2->speciesNum; + pokemon->tacticIndex = a2->tacticIndex; + pokemon->pokeHP = a2->unk12; + + for (i = 0; i < 2; i++) { + pokemon->offense.att[i] = a2->offense.att[i]; + pokemon->offense.def[i] = a2->offense.def[i]; + } + + pokemon->currExp = a2->currExp; + CopyBareMoveData(pokemon->moves, a2->moves.moves); + + for (i = 0; i < POKEMON_NAME_LENGTH; i++) { + pokemon->name[i] = a2->name[i]; + } + + if (a2->itemSlot.flags & ITEM_FLAG_EXISTS) { + SlotToHeldItem(&pokemon->heldItem, &a2->itemSlot); + } + else { + pokemon->heldItem.id = ITEM_NOTHING; + } +} + +void sub_808DFDC(s32 a1, PokemonStruct2* a2) +{ + // transfer item from unk to pokemon at index + PokemonStruct1* pokemon = &gRecruitedPokemonRef->pokemon[a1]; + if (a2->itemSlot.flags & ITEM_FLAG_EXISTS) { + SlotToHeldItem(&pokemon->heldItem, &a2->itemSlot); + } + else { + pokemon->heldItem.id = ITEM_NOTHING; + } +} + +void GetPokemonLevelData(LevelData* a1, s32 _id, s32 level) +{ + u8 buffer[12]; + s32 id = SpeciesId(_id); + + if ((s16)gLevelCurrentPokeId != id) + { + OpenedFile *file; + + gLevelCurrentPokeId = id; + // lvmp%03d\0 + sprintf(buffer, gUnknown_810768C, id); + file = OpenFileAndGetFileDataPtr(buffer, &gSystemFileArchive); + DecompressATFile((char*)gLevelCurrentData, 0, file); + CloseFile(file); + } + level -= 1; + if ( level < 0 ) + level = 0; + + *a1 = gLevelCurrentData[level]; +} + +const u8* DecompressMoveID(const u8* src, u16* moveID) +{ + u32 byte0; + u32 byte1 = *src++; + // If move >= 127 which means it uses 2 bytes and not one + if (byte1 & 0x80) { + byte0 = *src++; + } + else { + byte0 = byte1; + byte1 = 0; + } + + *moveID = (byte0 & 0x7F) | ((byte1 & 0x7F) << 7); + return src; +} + +s32 GetMovesLearnedAtLevel(u16* dst, s16 species, s32 level, s32 IQPoints) +{ + const u8* stream; + u16 moveID; // moveID + s32 count; + s32 _species; + + _species = SpeciesId(species); + count = 0; + + if (species == MONSTER_DECOY) return 0; + if (species == MONSTER_NONE) return 0; + if (species == MONSTER_MUNCHLAX) return 0; + // get stream + stream = GetLevelUpMoves(_species); + + while (*stream) + { + u8 v12; + + // read from stream + stream = DecompressMoveID(stream, &moveID); + v12 = *stream++; + + if (v12 > level) + break; + if (v12 == level) { + bool8 cond = TRUE; + + // NOTE: these moves require IQ to be > 333 + if ((moveID == MOVE_FRENZY_PLANT) && (IQPoints < gFrenzyPlantIQReq)) cond = FALSE; + if ((moveID == MOVE_HYDRO_CANNON) && (IQPoints < gHydroCannonIQReq)) cond = FALSE; + if ((moveID == MOVE_BLAST_BURN) && (IQPoints < gBlastBurnIQReq)) cond = FALSE; + if ((moveID == MOVE_VOLT_TACKLE) && (IQPoints < gVoltTackleIQReq)) cond = FALSE; + + if (cond) { + if (count < 16) { + *dst++ = moveID; + ++count; + } + } + } + } + return count; +} + +bool8 CanMonLearnMove(u16 moveID, s16 _species) +{ + u16 levelUpMoveID; + u16 HMTMMoveID; + s32 species = _species; // r4 + const u8* learnsetPtr; + + if (species == MONSTER_DECOY) return 0; + if (species == MONSTER_NONE) return 0; + if (species == MONSTER_MUNCHLAX) return 0; + if (moveID == MOVE_STRUGGLE) return 0; + + learnsetPtr = GetLevelUpMoves(_species); + while (*learnsetPtr) { + learnsetPtr = DecompressMoveID(learnsetPtr, &levelUpMoveID); + learnsetPtr++; + if (moveID == levelUpMoveID) { + return TRUE; + } + } + + learnsetPtr = GetHMTMMoves(species); + while (*learnsetPtr) { + learnsetPtr = DecompressMoveID(learnsetPtr, &HMTMMoveID); + if (HMTMMoveID == moveID) { + return TRUE; + } + } + return FALSE; +} + + +s32 sub_808E218(unkStruct_808E218_arg* a1, PokemonStruct1* pokemon) +{ + s32 i; + s32 count; + struct EvolveStage evolve_sequence[3]; + s32 sequence_length; + + count = 0; + a1->count = 0; + if (pokemon->speciesNum == MONSTER_DECOY) return 0; + if (pokemon->speciesNum == MONSTER_NONE) return 0; + if (pokemon->speciesNum == MONSTER_MUNCHLAX) return 0; + + sequence_length = GetEvolutionSequence(pokemon, evolve_sequence); + for (i = 0; i < sequence_length; i++) { + const u8 *ptr; + u16 result; + + ptr = GetLevelUpMoves(evolve_sequence[i].speciesNum); + while (*ptr) { + s32 value; + ptr = DecompressMoveID(ptr, &result); + value = *ptr++; + + if (value > evolve_sequence[i].level) { + break; + } + + if (count < NUM_MONSTERS) { + s32 j; + bool8 cond = 1; + + if ((result == MOVE_FRENZY_PLANT) && (pokemon->IQ < gFrenzyPlantIQReq)) cond = 0; + if ((result == MOVE_HYDRO_CANNON) && (pokemon->IQ < gHydroCannonIQReq)) cond = 0; + if ((result == MOVE_BLAST_BURN) && (pokemon->IQ < gBlastBurnIQReq)) cond = 0; + if ((result == MOVE_VOLT_TACKLE) && (pokemon->IQ < gVoltTackleIQReq)) cond = 0; + + for (j = 0; j < MAX_MON_MOVES; j++) { + if ((pokemon->moves[j].moveFlags & MOVE_FLAG_EXISTS) && pokemon->moves[j].id == result) { + cond = 0; + } + } + + if (cond) { + s32 k; + for (k = 0; k < count && a1->unk0[k] != result; k++) {} + + if (k == count) { + a1->unk0[count++] = result; + } + } + } + } + } + + a1->count = count; + return count; +} + + +s32 GetEvolutionSequence(PokemonStruct1* pokemon, struct EvolveStage* a2) +{ +#ifdef NONMATCHING + s32 count; + s32 species; + s32 i; + + a2[0].speciesNum = pokemon->speciesNum; + a2[0].level = pokemon->level; + + count = 1; + species = pokemon->speciesNum; + i = 0; + + for (; i < 2; i++) { + if (!pokemon->unkC[i].level) { + break; + } + species = GetPokemonEvolveFrom(species); + if (!species) { + break; + } + a2[1 + i].speciesNum = species; + a2[1 + i].level = pokemon->unkC[i].level; + // wrong increment order: + count++; + } + return count; +#else + s32 count; + s32 species; + s32 i; + struct EvolveStage* stage; + struct unkPokeSubStruct_C* has_next_stage; + + a2[0].speciesNum = pokemon->speciesNum; + a2[0].level = pokemon->level; + + count = 1; + species = pokemon->speciesNum; + i = 0; + has_next_stage = pokemon->unkC; + stage = &a2[1]; + + for (; i < 2; i++) { + if (!has_next_stage->level) { + break; + } + species = GetPokemonEvolveFrom(species); + if (!species) { + break; + } + stage->speciesNum = species; + stage->level = has_next_stage->level; + stage++; + count++; + has_next_stage++; + } + return count; +#endif +} + +s32 sub_808E400(s32 _species, s16* _a2, bool32 _bodySizeCheck, bool32 _shedinjaCheck) +{ + // This is horrible + s32 species = SpeciesId(_species); + bool8 bodySizeCheck = _bodySizeCheck; + bool8 shedinjaCheck = _shedinjaCheck; + s32 count = 0; + s32 i = 1; + s16 *a2 = _a2; + + for (i = 1; i < MONSTER_MAX; i++) { + s32 loopSpeciesId = SpeciesId(i); + #ifdef NONMATCHING + s32 loopSpeciesId2 = SpeciesId(i); + #else + register s32 loopSpeciesId2 asm("r8") = SpeciesId(i); + #endif // NONMATCHING + + if (species != GetPokemonEvolveFrom(loopSpeciesId)) { + continue; + } + if (!bodySizeCheck && GetBodySize(species) != GetBodySize(loopSpeciesId)) { + continue; + } + if (!shedinjaCheck && loopSpeciesId == MONSTER_SHEDINJA) { + continue; + } + *a2++ = loopSpeciesId2; + count++; + } + return count; +} + +void sub_808E490(Move* a1, s32 species) +{ + u16 buffer[0x10]; // of moveIDs + s32 i; + s16 index_s32 = species; + + s32 count = GetMovesLearnedAtLevel(buffer, index_s32, 1, 999); + if (count == 0) { + count = 1; + buffer[0] = MOVE_ITEM_TOSS; + } + + i = 0; + if (i < count) { + while (i < count) { + InitZeroedPPPokemonMove(&a1[i], buffer[i]); + i++; + } + i = count; + } + while (i < MAX_MON_MOVES) { + a1[i].moveFlags = 0; + i++; + } +} + +char* sub_808E4FC(s32 a1) +{ + struct subStruct_203B240 *result[4]; + sub_8097DF0(gFormattedStatusNames[a1], result); + return result[0]->pokeName; +} + +char* sub_808E51C(s32 a1) +{ + struct subStruct_203B240 *result[4]; + sub_8097DF0(gFormattedStatusNames[a1], result); + return result[0]->unk4; +} + diff --git a/src/pokemon_mid.c b/src/pokemon_mid.c deleted file mode 100644 index 9aff7e2be..000000000 --- a/src/pokemon_mid.c +++ /dev/null @@ -1,969 +0,0 @@ -#include "global.h" -#include "code_800D090.h" -#include "code_8097DD0.h" -#include "constants/colors.h" -#include "constants/dungeon.h" -#include "constants/move_id.h" -#include "decompress.h" -#include "items.h" -#include "moves.h" -#include "pokemon.h" -#include "pokemon_3.h" -#include "pokemon_mid.h" -#include "text_util.h" - -extern MonsterDataEntry *gMonsterParameters; -extern const char gUnknown_8107600[]; -extern const char gUnknown_8107608[]; -extern const char gUnownLetters[]; -extern const char gUnknown_8107630[]; -extern const char gUnknown_8107638[]; -extern const char gUnknown_810763C[]; -extern const char gUnknown_810768C[]; // lvmp%03d\0 -extern struct FileArchive gSystemFileArchive; -extern s16 gFrenzyPlantIQReq; // 0x14d -extern s16 gHydroCannonIQReq; // 0x14d -extern s16 gBlastBurnIQReq; // 0x14d -extern s16 gVoltTackleIQReq; // 0x14d -extern char* gFormattedStatusNames[]; - -// wram data: -extern u16 gLevelCurrentPokeId; -extern LevelData gLevelCurrentData[]; - - -extern int sprintf(char *, const char *, ...); -extern u32 ReturnIntFromChar(u8 r0); -extern void xxx_pokemon2_to_pokemonstruct_808DF44(PokemonStruct1*, PokemonStruct2*); - -struct unkStruct_8107654 { - s16 unk0; - s16 fill2; - s32 unk4; -}; - -extern u8 gUnknown_8107645[12]; -extern struct unkStruct_8107654 gUnknown_8107654[6]; -extern MonsterDataEntry *gMonsterParameters; -extern struct FileArchive gMonsterFileArchive; -extern const char gUnknown_8107684[]; - -s32 sub_808D654(s32 *ptr) -{ - s32 i; - PokemonStruct1 *mon = &gRecruitedPokemonRef->pokemon[0]; - s32 count = 0; - s32 *ptr2; - - for (i = 0, ptr2 = ptr; i < NUM_MONSTERS; i++, mon++) { - if (PokemonFlag2(mon) && !IsMonTeamLeader(mon) && !IsMonPartner(mon)) { - if (ptr != NULL) { - *ptr2 = i; - } - ptr2++; - count++; - } - } - - return count; -} - -// The same as sub_808D654 except it doesn't exclude partner. -s32 sub_808D6A4(s32 *ptr) -{ - s32 i; - PokemonStruct1 *mon = &gRecruitedPokemonRef->pokemon[0]; - s32 count = 0; - s32 *ptr2; - - for (i = 0, ptr2 = ptr; i < NUM_MONSTERS; i++, mon++) { - if (PokemonFlag2(mon) && !IsMonTeamLeader(mon)) { - if (ptr != NULL) { - *ptr2 = i; - } - ptr2++; - count++; - } - } - - return count; -} - -bool8 sub_808D6E8() -{ - s32 i; - s32 count = 0; - s32 size_count = 0; - for (i = 0; i < NUM_MONSTERS; i++) { - PokemonStruct1* pokemon = &gRecruitedPokemonRef->pokemon[i]; - if (PokemonFlag1(pokemon) && PokemonFlag2(pokemon)) { - size_count += GetBodySize(pokemon->speciesNum); - count++; - } - } - if ((size_count < 6) && (count < 4)) { - return 1; - } - return 0; -} - -// this one is surprisingly frustrating -NAKED -bool8 sub_808D750(s16 index_) { - asm_unified( -"\tpush {r4-r7,lr}\n" -"\tmov r7, r9\n" -"\tmov r6, r8\n" -"\tpush {r6,r7}\n" -"\tlsls r0, 16\n" -"\tasrs r0, 16\n" -"\tmov r8, r0\n" -"\tmovs r6, 0\n" -"\tmovs r5, 0\n" -"\tmovs r4, 0\n" -"\tldr r0, _0808D7C8\n" -"\tmov r9, r0\n" -"\tmovs r7, 0x1\n" -"_0808D76A:\n" -"\tmovs r0, 0x58\n" -"\tadds r1, r4, 0\n" -"\tmuls r1, r0\n" -"\tmov r2, r9\n" -"\tldr r0, [r2]\n" -"\tadds r1, r0, r1\n" -"\tldrh r2, [r1]\n" -"\tadds r0, r7, 0\n" -"\tands r0, r2\n" -"\tcmp r0, 0\n" -"\tbeq _0808D798\n" -"\tlsrs r0, r2, 1\n" -"\tands r0, r7\n" -"\tcmp r0, 0\n" -"\tbeq _0808D798\n" -"\tmovs r2, 0x8\n" -"\tldrsh r0, [r1, r2]\n" -"\tbl GetBodySize\n" -"\tlsls r0, 24\n" -"\tlsrs r0, 24\n" -"\tadds r5, r0\n" -"\tadds r6, 0x1\n" -"_0808D798:\n" -"\tadds r4, 0x1\n" -"\tmovs r0, 0xCE\n" -"\tlsls r0, 1\n" -"\tcmp r4, r0\n" -"\tble _0808D76A\n" -"\tcmp r6, 0x3\n" -"\tbgt _0808D7CC\n" -"\tldr r2, _0808D7C8\n" -"\tmovs r0, 0x58\n" -"\tmov r1, r8\n" -"\tmuls r1, r0\n" -"\tldr r0, [r2]\n" -"\tadds r1, r0, r1\n" -"\tmovs r2, 0x8\n" -"\tldrsh r0, [r1, r2]\n" -"\tbl GetBodySize\n" -"\tlsls r0, 24\n" -"\tlsrs r0, 24\n" -"\tadds r5, r0\n" -"\tcmp r5, 0x6\n" -"\tbgt _0808D7CC\n" -"\tmovs r0, 0x1\n" -"\tb _0808D7CE\n" -"\t.align 2, 0\n" -"_0808D7C8: .4byte gRecruitedPokemonRef\n" -"_0808D7CC:\n" -"\tmovs r0, 0\n" -"_0808D7CE:\n" -"\tpop {r3,r4}\n" -"\tmov r8, r3\n" -"\tmov r9, r4\n" -"\tpop {r4-r7}\n" -"\tpop {r1}\n" -"\tbx r1\n" - ); -} - -// bool8 sub_808D750(s16 index_) { -// s32 i; -// register s32 index asm("r8") = index_; -// s32 count = 0; -// s32 size_count = 0; - -// for (i = 0; i < 413; i++) { -// register PokemonStruct1* pokemon = &i[gRecruitedPokemonRef->pokemon]; -// register u16 unk0 = pokemon->unk0; -// if ((unk0 & 1) && ((pokemon->unk0 >> 1) & 1)) { -// size_count += GetBodySize(pokemon->speciesNum); -// count++; -// } -// } - -// if (count < 4) { -// PokemonStruct1* pokemon; - -// pokemon = &gRecruitedPokemonRef->pokemon[index]; - -// size_count += GetBodySize(pokemon->speciesNum); -// if (size_count < 7) { -// return TRUE; -// } -// } -// return FALSE; -// } - - -void PeekPokemonItem(s16 index_, BulkItem* item) { - s32 index = index_; - PokemonStruct1* pokemon = &gRecruitedPokemonRef->pokemon[index]; - item->id = pokemon->heldItem.id; - item->quantity = pokemon->heldItem.quantity; -} - -void GivePokemonItem(s16 index_, BulkItem* item) { - s32 index = index_; - PokemonStruct1* pokemon = &gRecruitedPokemonRef->pokemon[index]; - pokemon->heldItem.id = item->id; - pokemon->heldItem.quantity = item->quantity; -} - -bool8 IsPokemonRenamed(PokemonStruct1* pokemon) { - char species_name[20]; - char* species = GetMonSpecies(pokemon->speciesNum); - s32 i; - CopyStringtoBuffer(species_name, species); - for (i = 0; i < POKEMON_NAME_LENGTH; i++) { - if (pokemon->name[i] != species_name[i]) { - return FALSE; - } - if (!pokemon->name[i]) { - return TRUE; - } - } - return TRUE; -} - -bool8 ComparePokemonNames(s16 a1, s16 a2) -{ - s32 index1 = a1; - s32 index2 = a2; - u8* name1 = gRecruitedPokemonRef->pokemon[index1].name; - u8* name2 = gRecruitedPokemonRef->pokemon[index2].name; - - s32 i; - for (i = 0; i < POKEMON_NAME_LENGTH; i++) { - s32 c1 = ReturnIntFromChar(*name1); - s32 c2 = ReturnIntFromChar(*name2); - if (c1 > c2) { - return TRUE; - } - if (c1 < c2) { - return FALSE; - } - name1++; - name2++; - } - return FALSE; -} - -void CopyMonsterNameToBuffer(u8 * buffer, s32 index) -{ - s16 index_s16 = index; - strncpy(buffer, gMonsterParameters[index_s16].species, 0x14); -} - -void CopyYellowMonsterNametoBuffer(u8 *buffer, s16 index) -{ - s32 new_index = index; - sprintfStatic(buffer, gUnknown_8107600, gMonsterParameters[new_index].species); // {color YELLOW}%s{reset} -} - -void CopyCyanMonsterNametoBuffer(u8 *buffer, s16 index) -{ - s32 new_index = index; - sprintfStatic(buffer, gUnknown_8107608, gMonsterParameters[new_index].species); // {color CYAN}%s{reset} -} - -void sub_808D930(u8 *buffer, s32 index) -{ - char *unownString; - s32 unownIndex; - const char *preload; - s16 index_s16 = index; - - if (GetBaseSpecies(index_s16) == MONSTER_UNOWN) { - preload = gUnknown_8107630; // %s%c - unownString = GetMonSpecies(MONSTER_UNOWN); - unownIndex = GetUnownIndex(index_s16); - sprintfStatic(buffer,preload,unownString,gUnownLetters[unownIndex]); // ABCDEFGHIJKLMNOPQRSTUVWXYZ!? - } - else { - sprintfStatic(buffer,gUnknown_8107638, gMonsterParameters[index_s16].species); // %s - } -} - -char * GetMonSpecies(s16 index) -{ - return gMonsterParameters[index].species; -} - -void PrintColoredPokeNameToBuffer(u8 *buffer, PokemonStruct1 *pokemon, s32 colorNum) -{ - u8 nameBuffer [20]; - - sub_80922B4(nameBuffer, pokemon->name, POKEMON_NAME_LENGTH); - if (colorNum == COLOR_WHITE) { - colorNum = COLOR_CYAN; - } - sprintfStatic(buffer,gUnknown_810763C,colorNum,nameBuffer); // {color}%c%s{reset} -} - -void sub_808D9DC(u8 *buffer, PokemonStruct2 *param_2, s32 colorNum) -{ - u8 nameBuffer [20]; - - sub_80922B4(nameBuffer, param_2->name, POKEMON_NAME_LENGTH); - if (colorNum == COLOR_WHITE) { - colorNum = COLOR_YELLOW; - } - sprintfStatic(buffer,gUnknown_810763C,colorNum,nameBuffer); // {color}%c%s{reset} -} - -void sub_808DA0C(u8 *buffer, PokemonStruct2 *param_2) -{ - u8 nameBuffer [20]; - - sub_80922B4(nameBuffer, param_2->name, POKEMON_NAME_LENGTH); - sprintfStatic(buffer,gUnknown_8107638,nameBuffer); // %s -} - -void PrintPokeNameToBuffer(u8 *buffer, PokemonStruct1 *pokemon) -{ - sub_80922B4(buffer, pokemon->name, POKEMON_NAME_LENGTH); -} - -bool8 sub_808DA44(s32 a1_, u32 a2_) -{ - // this is the dumbest thing ever, but just making a1 a s16 and - // a2 a u8 did weird stuff with shifting... - s32 a1 = (s16)a1_; - u32 a2 = (u8)a2_; - if (a2 > 0xc) { - s32 i; - struct unkStruct_8107654 data[6]; - memcpy(data, gUnknown_8107654, 6 * sizeof(struct unkStruct_8107654)); - - for (i = 0; i < 10 && data[i].unk0; i++) { - if (data[i].unk0 == a1 && data[i].unk4 == a2) { - return 1; - } - } - return 0; - } - else { - return gUnknown_8107645[a2]; - } -} - -u8 *GetCategoryString(s16 index) -{ - return gMonsterParameters[index].category; -} - -u8 GetBodySize(s32 index) -{ - s16 index_s16 = index; - return gMonsterParameters[index_s16].bodySize; -} - -u8 GetShadowSize(s16 index) -{ - return gMonsterParameters[index].shadowSize; -} - -s32 GetMovementSpeed(s16 index) -{ - return gMonsterParameters[index].movementSpeed; -} - -u8 GetMovementType(s16 index) -{ - return gMonsterParameters[index].movementType; -} - -u8 GetRegenSpeed(s16 index) -{ - return ((u8)(gMonsterParameters[index].regenSpeed) << 25) >> 24; -} - -bool8 GetCanMoveFlag(s16 index) -{ - return gMonsterParameters[index].canMove; -} - -u8 GetChanceAsleep(s16 index) -{ - return gMonsterParameters[index].chanceAsleep; -} - -u32 GetWeight(s16 index) -{ - return gMonsterParameters[index].weight; -} - -u32 GetSize(s16 index) -{ - return gMonsterParameters[index].size; -} - -u8 GetFriendArea(s32 index) -{ - s16 index_s32 = index; - return gMonsterParameters[index_s32].friendArea; -} - -s32 GetBaseHP(s32 index) -{ - s16 index_s32 = index; - return gMonsterParameters[index_s32].baseHP; -} - -bool8 MonsterIDCanThrowItems(s16 index) -{ - return gMonsterParameters[index].canThrowItems; -} - -u8 GetUnk12(s16 index) -{ - return gMonsterParameters[index].unk12; -} - -s16 GetPokemonEvolveFrom(s16 index) -{ - return gMonsterParameters[index].preEvolution.evolveFrom; -} - -s32 GetBaseOffensiveStat(s32 index, u32 r1) -{ - s16 index_s16 = index; - return gMonsterParameters[index_s16].baseAtkSpAtk[r1]; -} - -s32 GetBaseDefensiveStat(s32 index, u32 r1) -{ - s16 index_s16 = index; - return gMonsterParameters[index_s16].baseDefSpDef[r1]; -} - -u8 GetPokemonType(s32 index, u32 typeIndex) -{ - s16 newIndex = index; - return gMonsterParameters[newIndex].types[typeIndex]; -} - -u8 GetPokemonAbility(s16 index, u32 abilityIndex) -{ - return gMonsterParameters[index].abilities[abilityIndex]; -} - -s16 GetDexInternalNo(s32 index, u32 r1) -{ - s16 index_s16 = index; - return gMonsterParameters[index_s16].dexInternal[r1]; -} - -s16 GetRecruitRate(s16 index) -{ - return gMonsterParameters[index].recruitRate; -} - -s16 GetAlphabetParentNo(s16 index, s32 r1) -{ - return gMonsterParameters[index].alphabetParent[r1]; -} - - -s16 GetInternalNo(s16 index) -{ - return gMonsterParameters[index].dexInternal[1]; -} - -s32 CalculateEXPGain(s16 index, s32 level) -{ - s32 expYield = gMonsterParameters[index].expYield; - return expYield + (expYield * (level - 1)) / 10; -} - -s16 GetPokemonEvolveConditions(s16 index, unkEvolve *r1) -{ - PreEvolution temp2; - EvolutionRequirements temp1; - temp1 = gMonsterParameters[index].evolutionRequirements; - temp2 = gMonsterParameters[index].preEvolution; - r1->preEvolution = temp2; - r1->evolutionRequirements = temp1; - // The return value is not used anywhere, but necessary for the function to match. - return index; -} - -u8 GetPokemonOverworldPalette(s16 index, u32 r1) -{ - s32 id = SpeciesId(index); - if (r1 != 0) - { - return 10; - } - else - { - return gMonsterParameters[id].overworldPalette; - } -} - -OpenedFile *OpenPokemonDialogueSpriteFile(s16 index) -{ - // Looks like this loads the dialogue sprite for the pokemon - - char buffer[0xC]; - if(gMonsterParameters[index].dialogueSprites == 0) - { - return NULL; - } - sprintf(buffer, gUnknown_8107684, index); // "kao%03d" - return OpenFile(buffer, &gMonsterFileArchive); -} - -OpenedFile *GetDialogueSpriteDataPtr(s32 index) -{ - // Looks like this loads the dialogue sprite for the pokemon - char buffer[0xC]; - s16 id = SpeciesId(index); - - if(gMonsterParameters[id].dialogueSprites == 0) - { - return NULL; - } - sprintf(buffer, gUnknown_8107684, id); // "kao%03d" - return OpenFileAndGetFileDataPtr(buffer, &gMonsterFileArchive); -} - -bool8 IsPokemonDialogueSpriteAvail(s16 index, s32 spriteId) -{ - // checking to see if dialogue sprite is available?? - return (gMonsterParameters[index].dialogueSprites >> spriteId) & 1; -} - -void xxx_pokemonstruct_index_to_pokemon2_808DE30(void* r0, u32 r1) -{ - xxx_pokemonstruct_to_pokemon2_808DE50(r0, &gRecruitedPokemonRef->pokemon[r1], r1); -} - -void xxx_pokemonstruct_to_pokemon2_808DE50(PokemonStruct2 * a1, PokemonStruct1 *pokemon, s32 a3) -{ - s32 i; - BulkItem* held; - Item* slot; - - a1->unk0 = pokemon->unk0; - a1->level = pokemon->level; - a1->IQ = pokemon->IQ; - a1->IQSkills = pokemon->IQSkills; - GenerateHiddenPower(&a1->hiddenPower); - a1->dungeonLocation = pokemon->dungeonLocation; - a1->isTeamLeader = pokemon->isTeamLeader; - a1->unkA = a3; - a1->speciesNum = pokemon->speciesNum; - a1->tacticIndex = pokemon->tacticIndex; - a1->unk12 = pokemon->pokeHP; - a1->unk10 = pokemon->pokeHP; - - for (i = 0; i < 2; i++) { - a1->offense.att[i] = pokemon->offense.att[i]; - a1->offense.def[i] = pokemon->offense.def[i]; - } - - a1->currExp = pokemon->currExp; - CopyAndResetMoves(&a1->moves, pokemon->moves); - - for (i = 0; i < POKEMON_NAME_LENGTH; i++) { - a1->name[i] = pokemon->name[i]; - } - - held = &pokemon->heldItem; - slot = &a1->itemSlot; - - if ((u32)(-held->id | held->id) >> 31) { - HeldItemToSlot(slot, held); - } - else { - slot->id = ITEM_NOTHING; - slot->quantity = 0; - slot->flags = 0; - } - - a1->belly = IntToFixedPoint(100); - a1->maxBelly = IntToFixedPoint(100); -} - -void xxx_pokemon2_to_pokemonstruct_index_808DF2C(s32 a1, PokemonStruct2* a2) -{ - xxx_pokemon2_to_pokemonstruct_808DF44(&a1[gRecruitedPokemonRef->pokemon], a2); -} - - -void xxx_pokemon2_to_pokemonstruct_808DF44(PokemonStruct1* pokemon, PokemonStruct2* a2) -{ - s32 i; - - pokemon->unk0 = a2->unk0; - pokemon->level = a2->level; - pokemon->IQ = a2->IQ; - pokemon->IQSkills = a2->IQSkills; - pokemon->dungeonLocation = a2->dungeonLocation; - pokemon->isTeamLeader = a2->isTeamLeader; - pokemon->speciesNum = a2->speciesNum; - pokemon->tacticIndex = a2->tacticIndex; - pokemon->pokeHP = a2->unk12; - - for (i = 0; i < 2; i++) { - pokemon->offense.att[i] = a2->offense.att[i]; - pokemon->offense.def[i] = a2->offense.def[i]; - } - - pokemon->currExp = a2->currExp; - CopyBareMoveData(pokemon->moves, a2->moves.moves); - - for (i = 0; i < POKEMON_NAME_LENGTH; i++) { - pokemon->name[i] = a2->name[i]; - } - - if (a2->itemSlot.flags & ITEM_FLAG_EXISTS) { - SlotToHeldItem(&pokemon->heldItem, &a2->itemSlot); - } - else { - pokemon->heldItem.id = ITEM_NOTHING; - } -} - -void sub_808DFDC(s32 a1, PokemonStruct2* a2) -{ - // transfer item from unk to pokemon at index - PokemonStruct1* pokemon = &gRecruitedPokemonRef->pokemon[a1]; - if (a2->itemSlot.flags & ITEM_FLAG_EXISTS) { - SlotToHeldItem(&pokemon->heldItem, &a2->itemSlot); - } - else { - pokemon->heldItem.id = ITEM_NOTHING; - } -} - -void GetPokemonLevelData(LevelData* a1, s32 _id, s32 level) -{ - u8 buffer[12]; - s32 id = SpeciesId(_id); - - if ((s16)gLevelCurrentPokeId != id) - { - OpenedFile *file; - - gLevelCurrentPokeId = id; - // lvmp%03d\0 - sprintf(buffer, gUnknown_810768C, id); - file = OpenFileAndGetFileDataPtr(buffer, &gSystemFileArchive); - DecompressATFile((char*)gLevelCurrentData, 0, file); - CloseFile(file); - } - level -= 1; - if ( level < 0 ) - level = 0; - - *a1 = gLevelCurrentData[level]; -} - -const u8* DecompressMoveID(const u8* src, u16* moveID) -{ - u32 byte0; - u32 byte1 = *src++; - // If move >= 127 which means it uses 2 bytes and not one - if (byte1 & 0x80) { - byte0 = *src++; - } - else { - byte0 = byte1; - byte1 = 0; - } - - *moveID = (byte0 & 0x7F) | ((byte1 & 0x7F) << 7); - return src; -} - -s32 GetMovesLearnedAtLevel(u16* dst, s16 species, s32 level, s32 IQPoints) -{ - const u8* stream; - u16 moveID; // moveID - s32 count; - s32 _species; - - _species = SpeciesId(species); - count = 0; - - if (species == MONSTER_DECOY) return 0; - if (species == MONSTER_NONE) return 0; - if (species == MONSTER_MUNCHLAX) return 0; - // get stream - stream = GetLevelUpMoves(_species); - - while (*stream) - { - u8 v12; - - // read from stream - stream = DecompressMoveID(stream, &moveID); - v12 = *stream++; - - if (v12 > level) - break; - if (v12 == level) { - bool8 cond = TRUE; - - // NOTE: these moves require IQ to be > 333 - if ((moveID == MOVE_FRENZY_PLANT) && (IQPoints < gFrenzyPlantIQReq)) cond = FALSE; - if ((moveID == MOVE_HYDRO_CANNON) && (IQPoints < gHydroCannonIQReq)) cond = FALSE; - if ((moveID == MOVE_BLAST_BURN) && (IQPoints < gBlastBurnIQReq)) cond = FALSE; - if ((moveID == MOVE_VOLT_TACKLE) && (IQPoints < gVoltTackleIQReq)) cond = FALSE; - - if (cond) { - if (count < 16) { - *dst++ = moveID; - ++count; - } - } - } - } - return count; -} - -bool8 CanMonLearnMove(u16 moveID, s16 _species) -{ - u16 levelUpMoveID; - u16 HMTMMoveID; - s32 species = _species; // r4 - const u8* learnsetPtr; - - if (species == MONSTER_DECOY) return 0; - if (species == MONSTER_NONE) return 0; - if (species == MONSTER_MUNCHLAX) return 0; - if (moveID == MOVE_STRUGGLE) return 0; - - learnsetPtr = GetLevelUpMoves(_species); - while (*learnsetPtr) { - learnsetPtr = DecompressMoveID(learnsetPtr, &levelUpMoveID); - learnsetPtr++; - if (moveID == levelUpMoveID) { - return TRUE; - } - } - - learnsetPtr = GetHMTMMoves(species); - while (*learnsetPtr) { - learnsetPtr = DecompressMoveID(learnsetPtr, &HMTMMoveID); - if (HMTMMoveID == moveID) { - return TRUE; - } - } - return FALSE; -} - - -s32 sub_808E218(unkStruct_808E218_arg* a1, PokemonStruct1* pokemon) -{ - s32 i; - s32 count; - struct EvolveStage evolve_sequence[3]; - s32 sequence_length; - - count = 0; - a1->count = 0; - if (pokemon->speciesNum == MONSTER_DECOY) return 0; - if (pokemon->speciesNum == MONSTER_NONE) return 0; - if (pokemon->speciesNum == MONSTER_MUNCHLAX) return 0; - - sequence_length = GetEvolutionSequence(pokemon, evolve_sequence); - for (i = 0; i < sequence_length; i++) { - const u8 *ptr; - u16 result; - - ptr = GetLevelUpMoves(evolve_sequence[i].speciesNum); - while (*ptr) { - s32 value; - ptr = DecompressMoveID(ptr, &result); - value = *ptr++; - - if (value > evolve_sequence[i].level) { - break; - } - - if (count < NUM_MONSTERS) { - s32 j; - bool8 cond = 1; - - if ((result == MOVE_FRENZY_PLANT) && (pokemon->IQ < gFrenzyPlantIQReq)) cond = 0; - if ((result == MOVE_HYDRO_CANNON) && (pokemon->IQ < gHydroCannonIQReq)) cond = 0; - if ((result == MOVE_BLAST_BURN) && (pokemon->IQ < gBlastBurnIQReq)) cond = 0; - if ((result == MOVE_VOLT_TACKLE) && (pokemon->IQ < gVoltTackleIQReq)) cond = 0; - - for (j = 0; j < MAX_MON_MOVES; j++) { - if ((pokemon->moves[j].moveFlags & MOVE_FLAG_EXISTS) && pokemon->moves[j].id == result) { - cond = 0; - } - } - - if (cond) { - s32 k; - for (k = 0; k < count && a1->unk0[k] != result; k++) {} - - if (k == count) { - a1->unk0[count++] = result; - } - } - } - } - } - - a1->count = count; - return count; -} - - -s32 GetEvolutionSequence(PokemonStruct1* pokemon, struct EvolveStage* a2) -{ -#ifdef NONMATCHING - s32 count; - s32 species; - s32 i; - - a2[0].speciesNum = pokemon->speciesNum; - a2[0].level = pokemon->level; - - count = 1; - species = pokemon->speciesNum; - i = 0; - - for (; i < 2; i++) { - if (!pokemon->unkC[i].level) { - break; - } - species = GetPokemonEvolveFrom(species); - if (!species) { - break; - } - a2[1 + i].speciesNum = species; - a2[1 + i].level = pokemon->unkC[i].level; - // wrong increment order: - count++; - } - return count; -#else - s32 count; - s32 species; - s32 i; - struct EvolveStage* stage; - struct unkPokeSubStruct_C* has_next_stage; - - a2[0].speciesNum = pokemon->speciesNum; - a2[0].level = pokemon->level; - - count = 1; - species = pokemon->speciesNum; - i = 0; - has_next_stage = pokemon->unkC; - stage = &a2[1]; - - for (; i < 2; i++) { - if (!has_next_stage->level) { - break; - } - species = GetPokemonEvolveFrom(species); - if (!species) { - break; - } - stage->speciesNum = species; - stage->level = has_next_stage->level; - stage++; - count++; - has_next_stage++; - } - return count; -#endif -} - -s32 sub_808E400(s32 _species, s16* _a2, bool32 _bodySizeCheck, bool32 _shedinjaCheck) -{ - // This is horrible - s32 species = SpeciesId(_species); - bool8 bodySizeCheck = _bodySizeCheck; - bool8 shedinjaCheck = _shedinjaCheck; - s32 count = 0; - s32 i = 1; - s16 *a2 = _a2; - - for (i = 1; i < MONSTER_MAX; i++) { - s32 loopSpeciesId = SpeciesId(i); - #ifdef NONMATCHING - s32 loopSpeciesId2 = SpeciesId(i); - #else - register s32 loopSpeciesId2 asm("r8") = SpeciesId(i); - #endif // NONMATCHING - - if (species != GetPokemonEvolveFrom(loopSpeciesId)) { - continue; - } - if (!bodySizeCheck && GetBodySize(species) != GetBodySize(loopSpeciesId)) { - continue; - } - if (!shedinjaCheck && loopSpeciesId == MONSTER_SHEDINJA) { - continue; - } - *a2++ = loopSpeciesId2; - count++; - } - return count; -} - -void sub_808E490(Move* a1, s16 species) -{ - u16 buffer[0x10]; // of moveIDs - s32 i; - s32 count = GetMovesLearnedAtLevel(buffer, species, 1, 999); - if (count == 0) { - count = 1; - buffer[0] = MOVE_ITEM_TOSS; - } - - i = 0; - if (i < count) { - while (i < count) { - InitZeroedPPPokemonMove(&a1[i], buffer[i]); - i++; - } - i = count; - } - while (i < MAX_MON_MOVES) { - a1[i].moveFlags = 0; - i++; - } -} - -char* sub_808E4FC(s32 a1) -{ - struct subStruct_203B240 *result[4]; - sub_8097DF0(gFormattedStatusNames[a1], result); - return result[0]->pokeName; -} - -char* sub_808E51C(s32 a1) -{ - struct subStruct_203B240 *result[4]; - sub_8097DF0(gFormattedStatusNames[a1], result); - return result[0]->unk4; -} From fd1e3ad9816a31fe68afe33722f65ed59a024fab Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Fri, 6 Dec 2024 16:03:33 -0800 Subject: [PATCH 03/11] clean up include and add ewram for pokemon.c --- include/pokemon.h | 13 +++++++++---- include/pokemon_mid.h | 8 ++------ src/code_801AFA4.c | 2 +- src/code_8023868.c | 3 +-- src/code_8042B34.c | 2 +- src/code_8069D4C.c | 2 +- src/code_8069E0C.c | 1 - src/code_806CD90.c | 1 - src/code_80718D8.c | 2 -- src/code_8072B78.c | 1 - src/code_8094F88.c | 4 ++-- src/gulpin_shop_801FB50.c | 2 +- src/mission_reward.c | 1 - src/pokemon.c | 14 +++++++------- src/pokemon_news2.c | 2 +- src/pokemon_news3.c | 2 +- sym_ewram.txt | 13 +------------ 17 files changed, 28 insertions(+), 45 deletions(-) diff --git a/include/pokemon.h b/include/pokemon.h index a9013ba96..d2265bc69 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -81,6 +81,8 @@ OpenedFile *GetDialogueSpriteDataPtr(s32 index); s32 GetUnownIndex(s16 index); void GenerateHiddenPower(HiddenPower *); s32 GetEvolutionSequence(PokemonStruct1 *pokemon, EvolveStage *); +s32 sub_808E400(s32 _species, s16* _a2, bool32 _bodySizeCheck, bool32 _shedinjaCheck); +void sub_808E490(Move* a1, s32 species); void xxx_pokemonstruct_to_pokemon2_808DE50(PokemonStruct2 *, PokemonStruct1 *, s32); void WritePoke1Bits(DataSerializer *, PokemonStruct1 *pokemon); void ReadPoke1Bits(DataSerializer *, PokemonStruct1 *); @@ -96,10 +98,13 @@ PokemonStruct1 * sub_808D434(s16 species, s32 param_2); s32 GetFriendSum_808D480(void); bool8 sub_808D4B0(void); bool8 sub_808D500(void); - -// pokemon.s -extern s32 GetUnitSum_808D544(s32 *); -extern s32 sub_808D580(s32 *); +s32 GetUnitSum_808D544(s32 *); +s32 sub_808D580(s32 *); +bool8 ComparePokemonNames(s16, s16); +void PrintPokeNameToBuffer(u8 *buffer, PokemonStruct1 *pokemon); +void GetPokemonLevelData(LevelData* a1, s32 _id, s32 level); +const u8* DecompressMoveID(const u8* a1, u16* moveID); +bool8 sub_808DA44(s32, u32); static inline bool8 PokemonFlag1(PokemonStruct1 *mon) { diff --git a/include/pokemon_mid.h b/include/pokemon_mid.h index 7bb43c764..46e2dee28 100644 --- a/include/pokemon_mid.h +++ b/include/pokemon_mid.h @@ -3,12 +3,8 @@ #include "pokemon.h" -bool8 ComparePokemonNames(s16, s16); +// NOTE: this is kept separate since TransferOrbAction needs index to be s32 +// and I haven't had the time to fix matching void CopyCyanMonsterNametoBuffer(u8 *buffer, s16 index); -void PrintPokeNameToBuffer(u8 *buffer, PokemonStruct1 *pokemon); -void GetPokemonLevelData(LevelData* a1, s32 _id, s32 level); -const u8* DecompressMoveID(const u8* a1, u16* moveID); - -bool8 sub_808DA44(s32, u32); #endif // GUARD_POKEMON_MID_H diff --git a/src/code_801AFA4.c b/src/code_801AFA4.c index be210b9d1..b4081660e 100644 --- a/src/code_801AFA4.c +++ b/src/code_801AFA4.c @@ -7,7 +7,7 @@ #include "gulpin_shop.h" #include "memory.h" #include "moves.h" -#include "pokemon_mid.h" +#include "pokemon.h" static EWRAM_DATA_2 unkStruct_203B22C *sUnknown_203B22C = {0}; diff --git a/src/code_8023868.c b/src/code_8023868.c index 4e8a88d17..fa10220d9 100644 --- a/src/code_8023868.c +++ b/src/code_8023868.c @@ -3,7 +3,6 @@ #include "code_800D090.h" #include "code_8023868.h" #include "pokemon.h" -#include "pokemon_mid.h" #include "structs/str_text.h" #include "text_util.h" @@ -172,4 +171,4 @@ UNUSED static PokemonStruct1 *sub_80243E8(void) sub_80922B4(nameBuffer, pokeStruct->name, POKEMON_NAME_LENGTH); sprintfStatic(buffer, sUnknown_80DC9A4, nameBuffer); return pokeStruct; -} \ No newline at end of file +} diff --git a/src/code_8042B34.c b/src/code_8042B34.c index ce3fa2e29..ee6f28b6f 100644 --- a/src/code_8042B34.c +++ b/src/code_8042B34.c @@ -26,7 +26,7 @@ #include "code_803E668.h" #include "dungeon_engine.h" #include "dungeon_map_access.h" -#include "pokemon_mid.h" +#include "pokemon.h" #include "weather.h" #include "moves.h" #include "code_8094F88.h" diff --git a/src/code_8069D4C.c b/src/code_8069D4C.c index 48c5e9210..f93a9c07d 100644 --- a/src/code_8069D4C.c +++ b/src/code_8069D4C.c @@ -1,5 +1,5 @@ #include "global.h" -#include "pokemon_mid.h" +#include "pokemon.h" #include "dungeon_util.h" #include "code_8069D4C.h" diff --git a/src/code_8069E0C.c b/src/code_8069E0C.c index 1ca70b73c..67fd08d70 100644 --- a/src/code_8069E0C.c +++ b/src/code_8069E0C.c @@ -21,7 +21,6 @@ #include "move_effects_target.h" #include "moves.h" #include "pokemon.h" -#include "pokemon_mid.h" #include "structs/dungeon_entity.h" #include "structs/str_dungeon.h" #include "text_util.h" diff --git a/src/code_806CD90.c b/src/code_806CD90.c index 90d51630c..16aefe58a 100644 --- a/src/code_806CD90.c +++ b/src/code_806CD90.c @@ -18,7 +18,6 @@ #include "game_options.h" #include "dungeon_items.h" #include "status.h" -#include "pokemon_mid.h" #include "pokemon.h" #include "random.h" #include "targeting.h" diff --git a/src/code_80718D8.c b/src/code_80718D8.c index 76fb35877..4a6076a0f 100644 --- a/src/code_80718D8.c +++ b/src/code_80718D8.c @@ -54,8 +54,6 @@ extern bool8 sub_806AA0C(s32, u32); extern bool8 sub_8083660(DungeonPos *param_1); extern bool8 sub_803D930(u32); extern void sub_8072B78(Entity *pokemon, Entity *target, s16 id); -extern s32 sub_808E400(s32 _species, s16* _a2, bool32 bodySizeCheck, bool32 shedinjaCheck); -void GetPokemonLevelData(LevelData* a1, s32 _id, s32 level); // TODO: change to s32 void sub_8071B48(void) { diff --git a/src/code_8072B78.c b/src/code_8072B78.c index 831ca2b8f..b0227f48d 100644 --- a/src/code_8072B78.c +++ b/src/code_8072B78.c @@ -8,7 +8,6 @@ #include "dungeon_util.h" #include "moves.h" #include "pokemon_mid.h" -#include "pokemon_mid.h" #include "status_checks_1.h" #include "structs/dungeon_entity.h" #include "structs/map.h" diff --git a/src/code_8094F88.c b/src/code_8094F88.c index 2da05ce3c..9d9c5e29f 100644 --- a/src/code_8094F88.c +++ b/src/code_8094F88.c @@ -5,7 +5,7 @@ #include "dungeon.h" #include "memory.h" #include "moves.h" -#include "pokemon_mid.h" +#include "pokemon.h" #include "random.h" #include "save.h" #include "text_util.h" @@ -468,4 +468,4 @@ void sub_8095824(DataSerializer * a, unkStruct_203B480 *b) void sub_80958E4(u32 *a, u32 b) { *a = b; -} \ No newline at end of file +} diff --git a/src/gulpin_shop_801FB50.c b/src/gulpin_shop_801FB50.c index 7759c94b0..757e15352 100644 --- a/src/gulpin_shop_801FB50.c +++ b/src/gulpin_shop_801FB50.c @@ -16,7 +16,7 @@ #include "menu_input.h" #include "moves.h" #include "pokemon_3.h" -#include "pokemon_mid.h" +#include "pokemon.h" #include "text.h" EWRAM_DATA_2 unkStruct_203B27C *gUnknown_203B27C = {0}; diff --git a/src/mission_reward.c b/src/mission_reward.c index 15c0f98f4..10fec39eb 100644 --- a/src/mission_reward.c +++ b/src/mission_reward.c @@ -2,7 +2,6 @@ #include "globaldata.h" #include "code_802F204.h" #include "pokemon.h" -#include "pokemon_mid.h" #include "rescue_team_info.h" #include "friend_area.h" #include "input.h" diff --git a/src/pokemon.c b/src/pokemon.c index 0e7dea0a3..5d930a24f 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -15,15 +15,15 @@ extern struct FileArchive gSystemFileArchive; extern struct FileArchive gMonsterFileArchive; -EWRAM_DATA MonsterDataEntry *gMonsterParameters; -EWRAM_DATA OpenedFile *gMonsterParametersFile; -EWRAM_DATA SpriteOAM gShadowSprites[3]; // Shadow sprites of some kind -EWRAM_DATA unkStruct_203B45C gRecruitedPokemon; -EWRAM_DATA u16 gLevelCurrentPokeId; -EWRAM_DATA LevelData gLevelCurrentData[0x64]; +static EWRAM_DATA MonsterDataEntry *gMonsterParameters = {0}; +static EWRAM_DATA OpenedFile *gMonsterParametersFile = {0}; +EWRAM_DATA SpriteOAM gShadowSprites[3] = {0}; // TODO: make static once pokemon_2.s is ded +static EWRAM_DATA unkStruct_203B45C gRecruitedPokemon = {0}; +static EWRAM_DATA u16 gLevelCurrentPokeId = {0}; +UNUSED static EWRAM_DATA u16 unused_data[3] = {0}; +static EWRAM_DATA LevelData gLevelCurrentData[0x64] = {0}; EWRAM_DATA_2 unkStruct_203B45C *gRecruitedPokemonRef = {0}; -extern void sub_808E490(Move* a1, s32 species); struct unkStruct_8107654 { s16 unk0; diff --git a/src/pokemon_news2.c b/src/pokemon_news2.c index 12b7abc12..85f91ceb0 100644 --- a/src/pokemon_news2.c +++ b/src/pokemon_news2.c @@ -5,7 +5,7 @@ #include "game_options.h" #include "input.h" #include "pokemon_mail.h" -#include "pokemon_mid.h" +#include "pokemon.h" #include "pokemon_news2.h" #include "memory.h" #include "menu_input.h" diff --git a/src/pokemon_news3.c b/src/pokemon_news3.c index 432f4d75f..b9aafea33 100644 --- a/src/pokemon_news3.c +++ b/src/pokemon_news3.c @@ -11,7 +11,7 @@ #include "memory.h" #include "menu_input.h" #include "pokemon_mail.h" -#include "pokemon_mid.h" +#include "pokemon.h" #include "pokemon_news3.h" #include "structs/str_802C39C.h" #include "text.h" diff --git a/sym_ewram.txt b/sym_ewram.txt index 242181b17..0069640b5 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -276,19 +276,8 @@ gUnknown_202F3D0: /* 202F3D0 (sub_80867F4 - sub_8086854) */ gUnknown_202F3D8: /* 202F3D8 (sub_8085B4C - sub_8085B80) */ .space 0x8 -gMonsterParameters: /* 202F3E0 (LoadMonsterParameters - IsPokemonDialogueSpriteAvail) */ - .space 0x4 -gMonsterParametersFile: /* 202F3E4 (LoadMonsterParameters) */ - .space 0x4 -gShadowSprites: /* 202F3E8 (InitShadowSprites - AddShadowSprite) */ - .space 0x18 -gRecruitedPokemon: /* 202F400 [used everywhere tbh] */ - .space 0x90E8 -gLevelCurrentPokeId: /* 20384E8 (LoadMonsterParameters - GetPokemonLevelData) */ - .space 0x8 -gLevelCurrentData: /* 20384F0 (GetPokemonLevelData) */ - .space 0x4B0 + .include "src/pokemon.o" .include "src/items.o" .include "src/rescue_team_info.o" .space 0x4 From c7248641eefc282154facc9979090cba92ca1408 Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Sat, 7 Dec 2024 19:20:44 -0800 Subject: [PATCH 04/11] decomp sub_808F798 --- asm/pokemon_3.s | 92 --------------------------------------------- include/pokemon_3.h | 4 +- src/code_8069E0C.c | 3 +- src/pokemon_3.c | 60 +++++++++++++++++++++++++---- 4 files changed, 57 insertions(+), 102 deletions(-) diff --git a/asm/pokemon_3.s b/asm/pokemon_3.s index 5a3b14ddf..8a2481a24 100644 --- a/asm/pokemon_3.s +++ b/asm/pokemon_3.s @@ -5,98 +5,6 @@ .text - thumb_func_start sub_808F798 -sub_808F798: - push {r4-r6,lr} - sub sp, 0xA4 - adds r4, r0, 0 - lsls r1, 16 - asrs r5, r1, 16 - mov r0, sp - adds r1, r4, 0 - movs r2, 0x58 - bl memcpy - mov r0, sp - movs r1, 0x8 - ldrsh r6, [r0, r1] - add r0, sp, 0x58 - mov r1, sp - ldrb r2, [r1, 0x3] - adds r1, r5, 0 - bl GetPokemonLevelData - ldr r0, [sp, 0x58] - str r0, [sp, 0x1C] - movs r0, 0 - strh r0, [r4] - mov r0, sp - strh r5, [r0, 0x8] - ldrb r0, [r0, 0xC] - cmp r0, 0 - bne _0808F7DA - mov r0, sp - mov r1, sp - ldrb r1, [r1, 0x3] - strb r1, [r0, 0xC] - b _0808F7EA -_0808F7DA: - mov r0, sp - ldrb r0, [r0, 0x10] - cmp r0, 0 - bne _0808F7EA - mov r0, sp - mov r1, sp - ldrb r1, [r1, 0x3] - strb r1, [r0, 0x10] -_0808F7EA: - add r4, sp, 0x64 - adds r0, r6, 0 - bl GetMonSpecies - adds r1, r0, 0 - adds r0, r4, 0 - bl CopyStringtoBuffer - movs r2, 0 - b _0808F800 -_0808F7FE: - adds r2, 0x1 -_0808F800: - cmp r2, 0x9 - bgt _0808F816 - adds r1, r4, r2 - add r0, sp, 0x4C - adds r0, r2 - ldrb r1, [r1] - ldrb r0, [r0] - cmp r1, r0 - bne _0808F82E - cmp r1, 0 - bne _0808F7FE -_0808F816: - movs r0, 0x1 - cmp r0, 0 - beq _0808F82E - add r4, sp, 0x4C - adds r0, r5, 0 - bl GetMonSpecies - adds r1, r0, 0 - adds r0, r4, 0 - movs r2, 0xA - bl BoundedCopyStringtoBuffer -_0808F82E: - mov r0, sp - bl sub_808D1DC - add sp, 0xA4 - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_808F798 - - thumb_func_start sub_808F83C -sub_808F83C: - movs r0, 0 - strb r0, [r2] - bx lr - thumb_func_end sub_808F83C - thumb_func_start CreatePokemonInfoTabScreen CreatePokemonInfoTabScreen: push {r4-r7,lr} diff --git a/include/pokemon_3.h b/include/pokemon_3.h index 8e5fc1766..dbda724fe 100644 --- a/include/pokemon_3.h +++ b/include/pokemon_3.h @@ -30,10 +30,12 @@ void SetIQSkill(IqSkillFlags *iq, u32 skillIndex); bool8 IsIQSkillSet(IqSkillFlags *iq, u32 IQSkillBit); void SetDefaultIQSkills(IqSkillFlags *iq, bool8 enableSelfCurer); void sub_808F468(PokemonStruct1 *param_1, EvolveStatus *evolveStatus, u8 param_3); -u32 sub_808F734(PokemonStruct1 *pokemon, s16 _species); +s32 sub_808F700(PokemonStruct1 *pokemon); +PokemonStruct1 *sub_808F734(PokemonStruct1 *pokemon, s16 _species); s16 ExtractSpeciesIndex(UnkDungeonGlobal_unk1CD98 *r0); void SetSpeciesLevelToExtract(UnkDungeonGlobal_unk1CD98 *r0, s32 level, s32 species); s32 ExtractLevel(UnkDungeonGlobal_unk1CD98 *r0); +PokemonStruct1 *sub_808F798(PokemonStruct1 *pokemon, short _species); // pokemon_3.s extern void CreatePokemonInfoTabScreen(u32, s16, u32 *, u32 *, u32); diff --git a/src/code_8069E0C.c b/src/code_8069E0C.c index 67fd08d70..cf559ce08 100644 --- a/src/code_8069E0C.c +++ b/src/code_8069E0C.c @@ -10,6 +10,7 @@ #include "constants/status.h" #include "constants/type.h" #include "constants/weather.h" +#include "dungeon_engine.h" #include "dungeon_leader.h" #include "dungeon_map_access.h" #include "dungeon_movement.h" @@ -65,7 +66,6 @@ extern void sub_803F4A0(Entity *a0); extern bool8 sub_80860A8(u8 id); extern u8 gUnknown_202F32C; extern u8 sub_803D73C(s32 a0); -extern bool8 IsBossFight(void); extern void DeletePokemonDungeonSprite(s32 id); extern void sub_80429E8(Entity *r0); extern s32 sub_803DA20(s32 param_1); @@ -84,7 +84,6 @@ extern void sub_803F580(s32); extern void sub_8040A84(void); extern void sub_806B678(void); extern void EntityUpdateStatusSprites(Entity *); -extern s32 sub_808F700(PokemonStruct1 *pokemon); extern Entity *sub_80696A8(Entity *a0); extern int sprintf(char *, const char *, ...); extern const u8 gUnknown_8106EA8[]; // talkp%d diff --git a/src/pokemon_3.c b/src/pokemon_3.c index 0f1a14a9c..9dc2b1145 100644 --- a/src/pokemon_3.c +++ b/src/pokemon_3.c @@ -8,6 +8,7 @@ #include "constants/iq_skill.h" #include "constants/tactic.h" #include "constants/type.h" +#include "structs/str_pokemon.h" #include "sprite.h" #include "text_util.h" #include "friend_area.h" @@ -57,8 +58,6 @@ extern void ReadBellyBits(DataSerializer*, FixedPoint *dst); extern void ReadHiddenPowerBits(DataSerializer*, HiddenPower*); s16 GetPokemonEvolveConditions(s16 index, unkEvolve *r1); -u32 sub_808F798(PokemonStruct1 *, s16); - bool8 AddShadowSprite(s16 species, s16* a2, s16* a3) { if (species != MONSTER_DIGLETT && species != MONSTER_DUGTRIO) { @@ -1093,14 +1092,14 @@ s32 sub_808F700(PokemonStruct1 *pokemon) } } -u32 sub_808F734(PokemonStruct1 *pokemon, s16 _species) +PokemonStruct1 *sub_808F734(PokemonStruct1 *pokemon, s16 _species) { - u32 uVar1; - int iVar3; + PokemonStruct1 *uVar1; + PokemonStruct1 *iVar3; PokemonStruct1 pokeStruct; s32 species = _species; - iVar3 = 0; + iVar3 = NULL; pokeStruct = *pokemon; uVar1 = sub_808F798(pokemon, species); if (species == MONSTER_NINJASK) { @@ -1109,8 +1108,55 @@ u32 sub_808F734(PokemonStruct1 *pokemon, s16 _species) BoundedCopyStringtoBuffer(pokeStruct.name, GetMonSpecies(MONSTER_SHEDINJA),POKEMON_NAME_LENGTH); iVar3 = sub_808F798(&pokeStruct,MONSTER_SHEDINJA); } - if (iVar3 != 0) { + if (iVar3 != NULL) { IncrementAdventureNumJoined(); } return uVar1; } + +PokemonStruct1 *sub_808F798(PokemonStruct1 *pokemon, short _species) +{ + s32 r6; + s32 index; + PokemonStruct1 pokeStruct; + LevelData levelData; + u8 buffer [64]; + s32 species = _species; + bool32 flag = TRUE; + + pokeStruct = *pokemon; + r6 = pokeStruct.speciesNum; + GetPokemonLevelData(&levelData,species,pokeStruct.level); + pokeStruct.currExp = levelData.expRequired; + pokemon->unk0 = 0; + pokeStruct.speciesNum = species; + if (pokeStruct.unkC[0].level == 0) { + pokeStruct.unkC[0].level = pokeStruct.level; + } + else if (pokeStruct.unkC[1].level == 0) { + pokeStruct.unkC[1].level = pokeStruct.level; + } + + CopyStringtoBuffer(buffer, GetMonSpecies(r6)); + + index = 0; + goto _start; + do + { + index++; +_start: + if(index >= POKEMON_NAME_LENGTH) break; + if(buffer[index] != pokeStruct.name[index]) goto _end; + if(buffer[index] == 0) break; + + } while(TRUE); + if(flag) + BoundedCopyStringtoBuffer(pokeStruct.name, GetMonSpecies(species), POKEMON_NAME_LENGTH); +_end: + return sub_808D1DC(&pokeStruct); +} + +UNUSED void sub_808F83C(PokemonStruct1 *pokemon, s16 species, u8 *r2) +{ + *r2 = 0; +} From ad0ec301b9bef5992ca87db846b137da11692dfe Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Sun, 8 Dec 2024 17:22:41 -0800 Subject: [PATCH 05/11] move more data to src --- data/data_8109964.s | 23 ----------------------- ld_script.txt | 5 ++++- src/code_8094D28.c | 1 + src/code_8094F88.c | 1 + src/code_80958E8.c | 5 +++-- src/code_80972F4.c | 1 + src/play_time.c | 1 + 7 files changed, 11 insertions(+), 26 deletions(-) delete mode 100644 data/data_8109964.s diff --git a/data/data_8109964.s b/data/data_8109964.s deleted file mode 100644 index bc25b2149..000000000 --- a/data/data_8109964.s +++ /dev/null @@ -1,23 +0,0 @@ -.section .rodata - -@ ??? -.string "pksdir0\0" -.align 2,0 -@ ??? -.string "pksdir0\0" -.align 2,0 -@ ??? -.string "pksdir0\0" -.align 2,0 -@ ??? -.string "pksdir0\0" -.align 2,0 - -.global gUnknown_8109984 -gUnknown_8109984: @ 8109984 -.byte 0x00, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x00 - -@ ??? -.string "pksdir0\0" -.align 2,0 - diff --git a/ld_script.txt b/ld_script.txt index 768e36b08..930594965 100755 --- a/ld_script.txt +++ b/ld_script.txt @@ -550,7 +550,10 @@ SECTIONS { src/pokemon.o(.rodata); data/data_81076E4.o(.rodata); src/game_options.o(.rodata); - data/data_8109964.o(.rodata); + src/code_8094D28.o(.rodata); + src/play_time.o(.rodata); + src/code_8094F88.o(.rodata); + src/code_80958E8.o(.rodata); src/code_80972F4.o(.rodata); src/code_8097504.o(.rodata); data/data_8109D10.o(.rodata); diff --git a/src/code_8094D28.c b/src/code_8094D28.c index f8d9453b3..97b4ff2a2 100644 --- a/src/code_8094D28.c +++ b/src/code_8094D28.c @@ -1,4 +1,5 @@ #include "global.h" +#include "globaldata.h" IWRAM_DATA u32 gUnknown_3001198[0x270] = {0}; EWRAM_DATA_2 s32 gUnknown_203B470 = {0}; diff --git a/src/code_8094F88.c b/src/code_8094F88.c index 9d9c5e29f..69791ca01 100644 --- a/src/code_8094F88.c +++ b/src/code_8094F88.c @@ -1,4 +1,5 @@ #include "global.h" +#include "globaldata.h" #include "code_8094D28.h" #include "code_8094F88.h" #include "constants/wonder_mail.h" diff --git a/src/code_80958E8.c b/src/code_80958E8.c index 25847f048..337a80fdb 100644 --- a/src/code_80958E8.c +++ b/src/code_80958E8.c @@ -1,4 +1,5 @@ #include "global.h" +#include "globaldata.h" #include "code_803C1D0.h" #include "code_80958E8.h" #include "code_80A26CC.h" @@ -38,7 +39,7 @@ extern void sub_803C45C(WonderMail *); extern void sub_803C610(WonderMail *); extern void sub_803C580(WonderMail *); -extern u8 gUnknown_8109984[]; +static const u8 sPossibleMissionTypes[] = {MISSION_TYPE_FRIEND_RESCUE, MISSION_TYPE_FIND_ITEM, MISSION_TYPE_DELIVER_ITEM, MISSION_TYPE_RESCUE_CLIENT, MISSION_TYPE_RESCUE_TARGET, MISSION_TYPE_DELIVER_ITEM, MISSION_TYPE_FIND_ITEM, MISSION_TYPE_FRIEND_RESCUE}; static EWRAM_DATA unkStruct_203B490 sUnknown_2039448 = {0}; @@ -187,7 +188,7 @@ bool8 GenerateMailJobInfo(struct WonderMail *mail) } mail->mailType = MAIL_TYPE_SUSPENDED_JOB; rand = RandInt(8); - missionType = gUnknown_8109984[rand]; + missionType = sPossibleMissionTypes[rand]; mail->missionType = missionType; if (missionType == MISSION_TYPE_DELIVER_ITEM && GetRescueTeamRank() == 0) { mail->missionType = MISSION_TYPE_FRIEND_RESCUE; diff --git a/src/code_80972F4.c b/src/code_80972F4.c index 7765d413b..7868e734c 100644 --- a/src/code_80972F4.c +++ b/src/code_80972F4.c @@ -1,4 +1,5 @@ #include "global.h" +#include "globaldata.h" #include "dungeon.h" #include "exclusive_pokemon.h" #include "event_flag.h" diff --git a/src/play_time.c b/src/play_time.c index 893a53892..7b668d352 100644 --- a/src/play_time.c +++ b/src/play_time.c @@ -1,4 +1,5 @@ #include "global.h" +#include "globaldata.h" #include "play_time.h" #include "code_8092334.h" From fb98bb9ec179ca92aaed8989be3d073f2f55dc81 Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Sat, 14 Dec 2024 09:01:36 -0800 Subject: [PATCH 06/11] decompile more of code_2 and move some data --- asm/code_2.s | 554 +------------------------- data/data_80D47B8.s | 54 +-- include/structs/str_dungeon_8042F6C.h | 36 ++ include/structs/str_wonder_mail.h | 2 +- src/code.c | 266 ++++++++++++- src/code_8042B34.c | 34 +- src/string_format.c | 48 ++- 7 files changed, 342 insertions(+), 652 deletions(-) create mode 100644 include/structs/str_dungeon_8042F6C.h diff --git a/asm/code_2.s b/asm/code_2.s index 96cb0c1b1..03f93b406 100644 --- a/asm/code_2.s +++ b/asm/code_2.s @@ -1059,556 +1059,4 @@ _08000EC6: bx r1 thumb_func_end sub_80009D0 - thumb_func_start SaveLoadRelated_8000EDC -SaveLoadRelated_8000EDC: - push {r4-r7,lr} - sub sp, 0x8 - adds r4, r0, 0 - movs r5, 0x1 - ldr r0, _08000F24 - str r5, [r0] - movs r0, 0x3 - bl sub_800A8F8 - bl sub_8014144 - add r1, sp, 0x4 - mov r0, sp - bl sub_8043D50 - ldr r0, [sp] - movs r1, 0x7 - bl MemoryAlloc - str r0, [r4, 0x74] - ldr r0, [sp, 0x4] - movs r1, 0x7 - bl MemoryAlloc - str r0, [r4, 0x78] - ldrb r0, [r4, 0x8] - cmp r0, 0 - beq _08000F68 - ldr r0, [r4, 0x74] - ldr r1, [sp] - bl PrepareQuickSaveRead - adds r7, r4, 0 - adds r7, 0x7C - b _08000F2E - .align 2, 0 -_08000F24: .4byte gUnknown_203B03C -_08000F28: - movs r0, 0 - bl xxx_update_stuff -_08000F2E: - bl ReadQuickSave - lsls r0, 24 - cmp r0, 0 - bne _08000F28 - bl IsQuickSaveValid - lsls r0, 24 - lsrs r5, r0, 24 - bl FinishQuickSaveRead - bl sub_8011830 - cmp r5, 0 - beq _08000F58 - ldr r0, _08000F54 - bl sub_80121E0 - b _08000F5E - .align 2, 0 -_08000F54: .4byte 0x000f1208 -_08000F58: - ldr r0, _08000F64 - bl sub_80121E0 -_08000F5E: - bl xxx_call_start_bg_music - b _08000F78 - .align 2, 0 -_08000F64: .4byte 0x000f1209 -_08000F68: - bl GeneratePelipperJobs - bl sub_80961B4 - bl sub_808ED00 - adds r7, r4, 0 - adds r7, 0x7C -_08000F78: - cmp r5, 0 - beq _08000F92 - adds r0, r4, 0 - bl xxx_dungeon_8001340 - bl sub_8099648 - bl SetWindowBGColor - movs r0, 0 - bl sub_8099690 - b _08000F96 -_08000F92: - movs r0, 0x5 - strh r0, [r7] -_08000F96: - adds r5, r7, 0 - movs r1, 0 - ldrsh r0, [r5, r1] - movs r6, 0x2 - negs r6, r6 - cmp r0, r6 - bne _08000FAC - adds r0, r4, 0 - adds r0, 0x84 - bl sub_809542C -_08000FAC: - movs r1, 0 - ldrsh r0, [r5, r1] - cmp r0, 0x3 - beq _08000FB8 - cmp r0, r6 - bne _0800100C -_08000FB8: - adds r0, r4, 0 - adds r0, 0x80 - bl SetDungeonLocationInfo - bl xxx_call_stop_bgm - movs r1, 0 - ldrsh r0, [r7, r1] - cmp r0, r6 - bne _08000FD8 - ldr r0, [r4, 0x74] - ldr r1, [sp] - movs r2, 0x1 - bl PrepareQuickSaveWrite - b _08000FFA -_08000FD8: - ldr r0, [r4, 0x74] - ldr r1, [sp] - movs r2, 0 - bl PrepareQuickSaveWrite - b _08000FFA -_08000FE4: - cmp r0, 0x1 - bne _08000FF4 - ldr r0, [r4, 0x78] - bl MemoryFree - ldr r0, [r4, 0x74] - bl MemoryFree -_08000FF4: - movs r0, 0 - bl xxx_update_stuff -_08000FFA: - bl WriteQuickSave - cmp r0, 0x2 - beq _08001006 - cmp r0, 0x3 - bne _08000FE4 -_08001006: - bl FinishQuickSaveWrite - b _0800101C -_0800100C: - bl sub_808ED00 - ldr r0, [r4, 0x78] - bl MemoryFree - ldr r0, [r4, 0x74] - bl MemoryFree -_0800101C: - add sp, 0x8 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end SaveLoadRelated_8000EDC - - thumb_func_start sub_8001024 -sub_8001024: - push {r4,lr} - ldr r1, _08001040 - ldm r1!, {r2-r4} - stm r0!, {r2-r4} - ldm r1!, {r2-r4} - stm r0!, {r2-r4} - ldm r1!, {r2-r4} - stm r0!, {r2-r4} - ldm r1!, {r2-r4} - stm r0!, {r2-r4} - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_08001040: .4byte gPersonalityRelated_203B040 - thumb_func_end sub_8001024 - - thumb_func_start sub_8001044 -sub_8001044: - push {r4,lr} - ldr r1, _08001060 - ldm r0!, {r2-r4} - stm r1!, {r2-r4} - ldm r0!, {r2-r4} - stm r1!, {r2-r4} - ldm r0!, {r2-r4} - stm r1!, {r2-r4} - ldm r0!, {r2-r4} - stm r1!, {r2-r4} - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_08001060: .4byte gPersonalityRelated_203B040 - thumb_func_end sub_8001044 - - thumb_func_start sub_8001064 -sub_8001064: - push {r4,r5,lr} - sub sp, 0x28 - bl GetPlayerPokemonStruct - cmp r0, 0 - bne _080010AE - ldr r5, _0800109C - ldrb r0, [r5, 0x8] - cmp r0, 0 - bne _080010A0 - add r4, sp, 0x14 - movs r0, 0x4 - ldrsh r1, [r5, r0] - adds r0, r4, 0 - bl CopyMonsterNameToBuffer - mov r0, sp - adds r1, r4, 0 - bl CopyStringtoBuffer - movs r1, 0x4 - ldrsh r0, [r5, r1] - movs r1, 0x1 - mov r2, sp - bl sub_808CE74 - b _080010AE - .align 2, 0 -_0800109C: .4byte gPersonalityRelated_203B040 -_080010A0: - movs r4, 0x4 - ldrsh r0, [r5, r4] - adds r2, r5, 0 - adds r2, 0x8 - movs r1, 0x1 - bl sub_808CE74 -_080010AE: - bl sub_808D378 - cmp r0, 0 - bne _080010F2 - ldr r5, _080010E0 - ldrb r0, [r5, 0x1C] - cmp r0, 0 - bne _080010E4 - add r4, sp, 0x14 - movs r0, 0x6 - ldrsh r1, [r5, r0] - adds r0, r4, 0 - bl CopyMonsterNameToBuffer - mov r0, sp - adds r1, r4, 0 - bl CopyStringtoBuffer - movs r1, 0x6 - ldrsh r0, [r5, r1] - movs r1, 0 - mov r2, sp - bl sub_808CE74 - b _080010F2 - .align 2, 0 -_080010E0: .4byte gPersonalityRelated_203B040 -_080010E4: - movs r4, 0x6 - ldrsh r0, [r5, r4] - adds r2, r5, 0 - adds r2, 0x1C - movs r1, 0 - bl sub_808CE74 -_080010F2: - ldr r3, _08001164 - movs r0, 0x4 - ldrsh r1, [r3, r0] - cmp r1, 0 - beq _08001126 - ldr r2, _08001168 - movs r4, 0x4 - ldrsh r0, [r2, r4] - cmp r0, 0 - beq _0800111C - cmp r1, r0 - beq _0800111C -_0800110A: - adds r2, 0x8 - movs r0, 0x4 - ldrsh r1, [r2, r0] - cmp r1, 0 - beq _0800111C - movs r4, 0x4 - ldrsh r0, [r3, r4] - cmp r0, r1 - bne _0800110A -_0800111C: - ldr r2, [r2] - movs r0, 0 - movs r1, 0x27 - bl SetScriptVarValue -_08001126: - ldr r3, _08001164 - movs r0, 0x6 - ldrsh r1, [r3, r0] - cmp r1, 0 - beq _0800115A - ldr r2, _0800116C - movs r4, 0x4 - ldrsh r0, [r2, r4] - cmp r0, 0 - beq _08001150 - cmp r1, r0 - beq _08001150 -_0800113E: - adds r2, 0x8 - movs r0, 0x4 - ldrsh r1, [r2, r0] - cmp r1, 0 - beq _08001150 - movs r4, 0x6 - ldrsh r0, [r3, r4] - cmp r0, r1 - bne _0800113E -_08001150: - ldr r2, [r2] - movs r0, 0 - movs r1, 0x26 - bl SetScriptVarValue -_0800115A: - add sp, 0x28 - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_08001164: .4byte gPersonalityRelated_203B040 -_08001168: .4byte gBaseKindTable -_0800116C: .4byte gTalkKindTable - thumb_func_end sub_8001064 - - thumb_func_start sub_8001170 -sub_8001170: - push {r4,lr} - sub sp, 0x8 - add r4, sp, 0x4 - movs r0, 0x63 - strb r0, [r4] - mov r1, sp - adds r1, 0x2 - mov r0, sp - bl sub_80992E0 - lsls r0, 24 - cmp r0, 0 - beq _08001196 - mov r0, sp - movs r1, 0 - ldrsh r0, [r0, r1] - bl sub_80A2740 - b _080011BE -_08001196: - adds r0, r4, 0 - bl sub_8099328 - lsls r0, 24 - cmp r0, 0 - bne _080011C0 - adds r0, r4, 0 - bl sub_8099360 - lsls r0, 24 - cmp r0, 0 - bne _080011C0 - mov r0, sp - adds r0, 0x5 - bl sub_8099394 - lsls r0, 24 - cmp r0, 0 - beq _080011C0 - movs r0, 0x3F -_080011BE: - strb r0, [r4] -_080011C0: - ldrb r0, [r4] - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8001170 - - thumb_func_start sub_80011CC -sub_80011CC: - push {r4,r5,lr} - adds r4, r0, 0 - movs r5, 0 - strb r1, [r4] - strb r5, [r4, 0x1] - bl sub_80011E8 - strb r5, [r4, 0xB] - strb r5, [r4, 0x4] - strb r5, [r4, 0xC] - strb r5, [r4, 0xD] - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_80011CC - - thumb_func_start sub_80011E8 -sub_80011E8: - push {r4,lr} - adds r4, r0, 0 - movs r0, 0x8 - bl sub_80023E4 - strb r0, [r4, 0x5] - movs r0, 0x3 - bl sub_80023E4 - strb r0, [r4, 0x6] - movs r0, 0x7 - bl sub_80023E4 - strb r0, [r4, 0x8] - movs r0, 0 - bl sub_80023E4 - strb r0, [r4, 0x9] - movs r0, 0x5 - bl sub_80023E4 - strb r0, [r4, 0xA] - movs r0, 0x18 - bl sub_80023E4 - lsls r0, 24 - cmp r0, 0 - beq _0800123C - movs r0, 0x19 - bl sub_80023E4 - lsls r0, 24 - cmp r0, 0 - beq _0800123C - movs r0, 0x1A - bl sub_80023E4 - lsls r0, 24 - cmp r0, 0 - beq _0800123C - movs r0, 0x1 - b _0800123E -_0800123C: - movs r0, 0 -_0800123E: - strb r0, [r4, 0x7] - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_80011E8 - - thumb_func_start sub_8001248 -sub_8001248: - push {r4,r5,lr} - movs r4, 0 - movs r5, 0 -_0800124E: - movs r0, 0x64 - bl RandInt - cmp r0, 0x31 - bgt _08001266 - lsls r0, r4, 2 - ldr r1, _080012B8 - ldr r1, [r1] - adds r0, r1 - strb r5, [r0, 0x2] - strb r5, [r0, 0x1] - strb r5, [r0] -_08001266: - adds r4, 0x1 - cmp r4, 0x13 - ble _0800124E - bl FillInventoryGaps - movs r4, 0 - ldr r5, _080012BC - movs r3, 0x1 -_08001276: - movs r0, 0x58 - adds r1, r4, 0 - muls r1, r0 - ldr r0, [r5] - adds r1, r0, r1 - ldrh r2, [r1] - adds r0, r3, 0 - ands r0, r2 - cmp r0, 0 - beq _08001298 - lsrs r0, r2, 1 - ands r0, r3 - cmp r0, 0 - beq _08001298 - adds r1, 0x28 - movs r0, 0 - strb r0, [r1] -_08001298: - adds r4, 0x1 - movs r0, 0xCE - lsls r0, 1 - cmp r4, r0 - ble _08001276 - ldr r0, _080012B8 - ldr r0, [r0] - movs r1, 0x98 - lsls r1, 2 - adds r0, r1 - movs r1, 0 - str r1, [r0] - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_080012B8: .4byte gTeamInventoryRef -_080012BC: .4byte gRecruitedPokemonRef - thumb_func_end sub_8001248 - - thumb_func_start sub_80012C0 -sub_80012C0: - push {r4,r5,lr} - movs r3, 0 - ldr r4, _08001324 - movs r2, 0 -_080012C8: - lsls r1, r3, 2 - ldr r0, [r4] - adds r1, r0 - strb r2, [r1, 0x2] - strb r2, [r1, 0x1] - strb r2, [r1] - adds r3, 0x1 - cmp r3, 0x13 - ble _080012C8 - bl FillInventoryGaps - movs r3, 0 - ldr r5, _08001328 - movs r4, 0x1 -_080012E4: - movs r0, 0x58 - adds r1, r3, 0 - muls r1, r0 - ldr r0, [r5] - adds r1, r0, r1 - ldrh r2, [r1] - adds r0, r4, 0 - ands r0, r2 - cmp r0, 0 - beq _08001306 - lsrs r0, r2, 1 - ands r0, r4 - cmp r0, 0 - beq _08001306 - adds r1, 0x28 - movs r0, 0 - strb r0, [r1] -_08001306: - adds r3, 0x1 - movs r0, 0xCE - lsls r0, 1 - cmp r3, r0 - ble _080012E4 - ldr r0, _08001324 - ldr r0, [r0] - movs r1, 0x98 - lsls r1, 2 - adds r0, r1 - movs r1, 0 - str r1, [r0] - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_08001324: .4byte gTeamInventoryRef -_08001328: .4byte gRecruitedPokemonRef - thumb_func_end sub_80012C0 - - .align 2,0 + .align 2,0 diff --git a/data/data_80D47B8.s b/data/data_80D47B8.s index 3cc9971d1..6f1003350 100644 --- a/data/data_80D47B8.s +++ b/data/data_80D47B8.s @@ -3,61 +3,9 @@ @ START code_80130A8 - .global gUnknown_80D48A0 -gUnknown_80D48A0: @ 80D48A0 - .byte 0x07, 0x00, 0x00, 0x00 - .byte 0x02, 0x00, 0x00, 0x00 - .byte 0x02, 0x00, 0x00, 0x00 - - .global gUnknown_80D48AC -gUnknown_80D48AC: @ 80D48AC - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x03, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - - .global gUnknown_80D48C4 -gUnknown_80D48C4: @ 80D48C4 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x02, 0x00, 0x0f, 0x00 - .byte 0x1a, 0x00, 0x05, 0x00 - .byte 0x07, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - - .global gUnknown_80D48DC -gUnknown_80D48DC: @ 80D48DC - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x02, 0x00, 0x00, 0x00 - .byte 0x02, 0x00, 0x08, 0x00 - .byte 0x1a, 0x00, 0x05, 0x00 - .byte 0x07, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - - .global gSpeakerNameSeparator -gSpeakerNameSeparator: @ 80D48F4 - .byte 0x3A, 0x20, 0x00, 0x00 @ maybe just a colon and space - - .global gUnknown_80D48F8 -gUnknown_80D48F8: @ 80D48F8 - .string "????\0" - .align 2,0 - - .global gUnknown_80D4900 -gUnknown_80D4900: @ 80D4900 - .string "%d\0" - .align 2,0 - - .global gUnknown_80D4904 -gUnknown_80D4904: @ 80D4904 - .string "%*d\0" - .align 2,0 - .global gUnknown_80D4908 gUnknown_80D4908: @ 80D4908 - .string "%0*d\0" + .asciz "%0*d" .align 2,0 .global gUnknown_80D4910 diff --git a/include/structs/str_dungeon_8042F6C.h b/include/structs/str_dungeon_8042F6C.h new file mode 100644 index 000000000..536d093e4 --- /dev/null +++ b/include/structs/str_dungeon_8042F6C.h @@ -0,0 +1,36 @@ +#ifndef GUARD_STR_DUNGEON_8042F6C_H +#define GUARD_STR_DUNGEON_8042F6C_H + +#include "structs/str_dungeon.h" +#include "structs/str_dungeon_location.h" +#include "structs/str_pokemon.h" +#include "structs/str_wonder_mail.h" + +struct UnkStruct_xxx_dungeon_8042F6C +{ + u8 unk0; + DungeonLocation unk4; + u8 unk8; + u8 unk9; + u8 unkA; + u8 unkB; + u8 unkC; + u8 unkD; + u8 unkE; + u8 unkF; + u8 unk10; + u8 unk11; + unkStruct_Dungeon64C unk14; + PokemonStruct1 unk1C; + u8 *unk74; + Dungeon *unk78; + s16 unk7C; + u8 unk7E; + DungeonLocation unk80; + WonderMailSub unk84; +}; + +void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8); + +#endif // GUARD_STR_DUNGEON_8042F6C_H + diff --git a/include/structs/str_wonder_mail.h b/include/structs/str_wonder_mail.h index 101e96928..04f2bbd61 100644 --- a/include/structs/str_wonder_mail.h +++ b/include/structs/str_wonder_mail.h @@ -79,4 +79,4 @@ typedef struct WonderMailStruct_203B2C0_sub /* 0x30 */ PokemonStruct1 pokemon; } WonderMailStruct_203B2C0_sub; -#endif // GUARD_STR_WONDER_MAIL_H \ No newline at end of file +#endif // GUARD_STR_WONDER_MAIL_H diff --git a/src/code.c b/src/code.c index 2bff18715..fcb41a7a5 100644 --- a/src/code.c +++ b/src/code.c @@ -1,16 +1,276 @@ #include "global.h" +#include "structs/str_dungeon_8042F6C.h" +#include "structs/str_wonder_mail.h" +#include "code_80118A4.h" +#include "code_80A26CC.h" +#include "code_8099360.h" #include "event_flag.h" +#include "items.h" +#include "memory.h" +#include "pokemon.h" +#include "quick_save_read.h" +#include "quick_save_write.h" +#include "random.h" +#include "save.h" +#include "string_format.h" +#include "text_util.h" -extern void xxx_dungeon_8042F6C(u32 r0); extern void NDS_LoadOverlay_GroundMain(); extern u32 xxx_script_related_8098468(u32); +extern u8 sub_80992E0(s16 *, s16 *); +extern bool8 sub_8099328(u8 *dungeonId); +extern bool8 sub_8099360(u8 *); +extern u8 sub_8099394(u8 *); +extern void GeneratePelipperJobs(); +extern void sub_8043D50(s32 *a0, s32 *a1); +extern void xxx_update_stuff(u32); +extern void sub_80961B4(); +extern void sub_808ED00(); +extern void SetDungeonLocationInfo(DungeonLocation *dl); +extern void sub_808CE74(s16, bool32, u8*); + +void xxx_dungeon_8001340(struct UnkStruct_xxx_dungeon_8042F6C *r0); +void sub_80011E8(u8 *param_1); +void sub_809542C(WonderMailSub *param_1); + +struct unkTalkTable +{ + u32 unk0; + s16 species; +}; + +extern struct unkTalkTable gTalkKindTable[]; +extern struct unkTalkTable gBaseKindTable[]; + +// size: 0x30 +struct PersonalityRelated +{ + u8 fill0[4]; + s16 speciesID1; + s16 speciesID2; + u8 speciesName1[0x14]; + u8 speciesName2[0x14]; +}; +struct PersonalityRelated gPersonalityRelated_203B040; +extern u32 gUnknown_203B03C; + +void SaveLoadRelated_8000EDC(struct UnkStruct_xxx_dungeon_8042F6C *param_1) +{ + u8 quickSaveValid; + s32 quickSaveStatus; + s32 local_1c; // 0x4800 + s32 local_18; // sizeof(Dungeon) + + quickSaveValid = TRUE; + gUnknown_203B03C = 1; + sub_800A8F8(3); + sub_8014144(); + sub_8043D50(&local_1c,&local_18); + param_1->unk74 = MemoryAlloc(local_1c,7); // size: 0x4800 + param_1->unk78 = MemoryAlloc(local_18,7); // size: sizeof(Dungeon) + if (param_1->unk8) { + PrepareQuickSaveRead(param_1->unk74,local_1c); + while( TRUE ) { + if (!ReadQuickSave()) break; + xxx_update_stuff(0); + } + quickSaveValid = IsQuickSaveValid(); + FinishQuickSaveRead(); + sub_8011830(); + if (quickSaveValid) { + sub_80121E0(0xf1208); + } + else { + sub_80121E0(0xf1209); + } + xxx_call_start_bg_music(); + } + else { + GeneratePelipperJobs(); + sub_80961B4(); + sub_808ED00(); + } + if (quickSaveValid) { + xxx_dungeon_8001340(param_1); + sub_8099648(); + SetWindowBGColor(); + sub_8099690(0); + } + else { + param_1->unk7C = 5; + } + if (param_1->unk7C == -2) { + sub_809542C(¶m_1->unk84); + } + if ((param_1->unk7C == 3) || (param_1->unk7C == -2)) { + SetDungeonLocationInfo(¶m_1->unk80); + xxx_call_stop_bgm(); + if (param_1->unk7C == -2) { + PrepareQuickSaveWrite(param_1->unk74,local_1c,1); + } + else { + PrepareQuickSaveWrite(param_1->unk74,local_1c,0); + } + while ((quickSaveStatus = WriteQuickSave(), (quickSaveStatus != 2))) { + if (quickSaveStatus == 3) break; + if (quickSaveStatus == 1) { + MemoryFree(param_1->unk78); + MemoryFree(param_1->unk74); + } + xxx_update_stuff(0); + } + FinishQuickSaveWrite(); + } + else { + sub_808ED00(); + MemoryFree(param_1->unk78); + MemoryFree(param_1->unk74); + } +} + +void sub_8001024(struct PersonalityRelated *r0) +{ + *r0 = gPersonalityRelated_203B040; +} + +void sub_8001044(struct PersonalityRelated *r0) +{ + gPersonalityRelated_203B040 = *r0; +} + +void sub_8001064(void) +{ + struct unkTalkTable *psVar2; + u8 buffer2 [20]; + u8 buffer1 [20]; + + if (GetPlayerPokemonStruct() == NULL) { + if (gPersonalityRelated_203B040.speciesName1[0] == '\0') { + CopyMonsterNameToBuffer(buffer1,gPersonalityRelated_203B040.speciesID1); + CopyStringtoBuffer(buffer2,buffer1); + sub_808CE74(gPersonalityRelated_203B040.speciesID1,TRUE,buffer2); + } + else { + sub_808CE74(gPersonalityRelated_203B040.speciesID1,TRUE,gPersonalityRelated_203B040.speciesName1); + } + } + if (sub_808D378() == NULL) { + if (gPersonalityRelated_203B040.speciesName2[0] == '\0') { + CopyMonsterNameToBuffer(buffer1,gPersonalityRelated_203B040.speciesID2); + CopyStringtoBuffer(buffer2,buffer1); + sub_808CE74(gPersonalityRelated_203B040.speciesID2,FALSE,buffer2); + } + else { + sub_808CE74(gPersonalityRelated_203B040.speciesID2,FALSE,gPersonalityRelated_203B040.speciesName2); + } + } + if (gPersonalityRelated_203B040.speciesID1 != MONSTER_NONE) { + psVar2 = &gBaseKindTable[0]; + while ((psVar2->species != MONSTER_NONE && (gPersonalityRelated_203B040.speciesID1 != psVar2->species))) { + psVar2++; + } + SetScriptVarValue(NULL,BASE_KIND,psVar2->unk0); + } + if (gPersonalityRelated_203B040.speciesID2 != MONSTER_NONE) { + psVar2 = &gTalkKindTable[0]; + while ((psVar2->species != MONSTER_NONE && (gPersonalityRelated_203B040.speciesID2 != psVar2->species))) { + psVar2++; + } + SetScriptVarValue(NULL,PARTNER_TALK_KIND,psVar2->unk0); + } +} + +u8 sub_8001170(void) +{ + s16 local_10; + s16 auStack_e; + u8 dungeonID; + u8 auStack_b; + + dungeonID = 0x63; + if (sub_80992E0(&local_10,&auStack_e) != 0) { + dungeonID = sub_80A2740(local_10); + } + else { + if (!sub_8099328(&dungeonID) && (!sub_8099360(&dungeonID) && sub_8099394(&auStack_b) != 0)) { + dungeonID = 0x3F; + } + } + return dungeonID; +} + +void sub_80011CC(u8 *param_1,u8 param_2) +{ + u32 zero = 0; + param_1[0] = param_2; + param_1[1] = zero; + sub_80011E8(param_1); + param_1[0xb] = 0; + param_1[4] = 0; + param_1[0xc] = 0; + param_1[0xd] = 0; +} + +void sub_80011E8(u8 *param_1) +{ + param_1[5] = sub_80023E4(8); + param_1[6] = sub_80023E4(3); + param_1[8] = sub_80023E4(7); + param_1[9] = sub_80023E4(0); + param_1[10] = sub_80023E4(5); + if (sub_80023E4(0x18) && sub_80023E4(0x19) && sub_80023E4(0x1a)) { + param_1[7] = 1; + } + else { + param_1[7] = 0; + } +} + +void sub_8001248(void) +{ + s32 index; + s32 counter; + + for(index = 0; index < INVENTORY_SIZE; index++) + { + counter = RandInt(100); + if(counter < 50) + ZeroOutItem(&gTeamInventoryRef->teamItems[index]); + } + FillInventoryGaps(); + for(index = 0; index < NUM_MONSTERS; index++) + { + PokemonStruct1 *mon = &gRecruitedPokemonRef->pokemon[index]; + if(PokemonFlag1(mon) && PokemonFlag2(mon)) + mon->heldItem.id = ITEM_NOTHING; + } + gTeamInventoryRef->teamMoney = 0; +} + +void sub_80012C0(void) +{ + s32 index; + + for(index = 0; index < INVENTORY_SIZE; index++) + { + ZeroOutItem(&gTeamInventoryRef->teamItems[index]); + } + FillInventoryGaps(); + for(index = 0; index < NUM_MONSTERS; index++) + { + PokemonStruct1 *mon = &gRecruitedPokemonRef->pokemon[index]; + if(PokemonFlag1(mon) && PokemonFlag2(mon)) + mon->heldItem.id = ITEM_NOTHING; + } + gTeamInventoryRef->teamMoney = 0; +} void NDS_LoadOverlay_GroundMain() { } -void nullsub_2(u32 r0) +void nullsub_2(struct UnkStruct_xxx_dungeon_8042F6C *r0) { } @@ -20,7 +280,7 @@ u32 xxx_script_related_8001334(u32 r0) return xxx_script_related_8098468(r0); } -void xxx_dungeon_8001340(u32 r0) +void xxx_dungeon_8001340(struct UnkStruct_xxx_dungeon_8042F6C *r0) { nullsub_2(r0); xxx_dungeon_8042F6C(r0); diff --git a/src/code_8042B34.c b/src/code_8042B34.c index ee6f28b6f..a4ffb82b3 100644 --- a/src/code_8042B34.c +++ b/src/code_8042B34.c @@ -2,6 +2,7 @@ #include "dungeon_util_1.h" #include "memory.h" #include "structs/rgb.h" +#include "structs/str_dungeon_8042F6C.h" #include "code_803E46C.h" #include "code_800E9E4.h" #include "code_800DAC0.h" @@ -250,35 +251,6 @@ extern u8 gUnknown_203B40C; extern DungeonPos gUnknown_203B410; extern u8 *gSerializedData_203B41C; -struct Substruct_xxx_dungeon_8042F6C -{ - DungeonLocation a0; - u32 a4; -}; - -struct UnkStruct_xxx_dungeon_8042F6C -{ - u8 unk0; - DungeonLocation unk4; - u8 unk8; - u8 unk9; - u8 unkA; - u8 unkB; - u8 unkC; - u8 unkD; - u8 unkE; - u8 unkF; - u8 unk10; - u8 unk11; - unkStruct_Dungeon64C unk14; - PokemonStruct1 unk1C; - u8 *unk74; - Dungeon *unk78; - s16 unk7C; - u8 unk7E; - DungeonLocation unk80; - struct Substruct_xxx_dungeon_8042F6C unk84; -}; extern void sub_8040094(u8 r0); extern void sub_8068BDC(u8 r0); @@ -915,8 +887,8 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) r8->unk7C = -2; memset(&r8->unk84, 0, sizeof(r8->unk84)); r8->unk80 = gDungeon->unk644.dungeonLocation; - r8->unk84.a0 = gDungeon->unk644.dungeonLocation; - r8->unk84.a4 = gDungeon->unk644.unk38; + r8->unk84.dungeon = gDungeon->unk644.dungeonLocation; + r8->unk84.seed = gDungeon->unk644.unk38; } else { diff --git a/src/string_format.c b/src/string_format.c index fcd6b0938..4e4f5dd82 100644 --- a/src/string_format.c +++ b/src/string_format.c @@ -83,7 +83,7 @@ struct SubStruct_203B198 u16 unkC; // x3C u16 unkE; // x3E u16 unk10; // x40 - u8 fill12[0x48-0x42]; // x42 + u8 fill12[6]; // x42 }; struct UnkStruct_203B198 @@ -104,16 +104,42 @@ extern struct UnkStruct_203B198 gUnknown_203B198; extern UnkTextStruct1 gUnknown_2027370[4]; extern void (*gUnknown_203B088)(s32 a0); -extern const struct SubStruct_203B198 gUnknown_80D48AC; -extern const struct UnkTextStruct2 gUnknown_80D48DC; -extern const struct UnkTextStruct2 gUnknown_80D48C4; -extern const u32 gUnknown_80D48A0[]; -extern const u8 gUnknown_80D48F8[]; -extern const u8 gUnknown_80D4900[]; -extern const u8 gUnknown_80D4904[]; +static const u32 gUnknown_80D48A0[] = {0x7, 0x2, 0x2}; +static const struct SubStruct_203B198 gUnknown_80D48AC = { + 0x00, + 0x03, + 0x00, 0x00, + 0x00, 0x00, + 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00 + +}; + +static const UnkTextStruct2 gUnknown_80D48C4 = { + 0x00, 0x00, 0x00, 0x00, + 0x00, + 0x02, 0x0F, + 0x1A, 0x05, + 0x07, 0x00, + NULL +}; + +static const UnkTextStruct2 gUnknown_80D48DC = { + 0x00, 0x00, 0x00, 0x00, + 0x02, + 0x02, 0x08, + 0x1A, 0x05, + 0x07, 0x00, + NULL +}; + + +ALIGNED(4) static const u8 sSpeakerNameSeparator[] = ": "; +ALIGNED(4) static const u8 sUnknownTeamName[] = "????"; +ALIGNED(4) static const u8 gUnknown_80D4900[] = "%d"; +ALIGNED(4) static const u8 gUnknown_80D4904[] = "%*d" ; extern const u8 gUnknown_80D4908[]; extern const u8 gUnknown_80D4910[]; -extern const u8 gSpeakerNameSeparator[]; extern void SetCharacterMask(int a0); extern void DisplayMonPortraitSprite(s32 a0, const u8 *compressedData, s32 a2); @@ -705,7 +731,7 @@ const u8 *FormatString(const u8 *str, u8 *dst, u8 *dstMax, u16 flags) r9 = FALSE; if (flags & 8) { AppendString(gSpeakerNameBuffer, &dst, dstMax, flags); - AppendString(gSpeakerNameSeparator, &dst, dstMax, flags); + AppendString(sSpeakerNameSeparator, &dst, dstMax, flags); } } else if (r9) { @@ -759,7 +785,7 @@ const u8 *FormatString(const u8 *str, u8 *dst, u8 *dstMax, u16 flags) sub_80920D8(sFormatBuffer_TeamName); } else { - strcpy(sFormatBuffer_TeamName, gUnknown_80D48F8); // ???? + strcpy(sFormatBuffer_TeamName, sUnknownTeamName); // ???? } txtPtr = sFormatBuffer_TeamName; break; From 073a207c0e045c94e895981a17cab075deb4d179 Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Sat, 14 Dec 2024 09:08:41 -0800 Subject: [PATCH 07/11] remove extra variable --- src/code.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/code.c b/src/code.c index fcb41a7a5..207672504 100644 --- a/src/code.c +++ b/src/code.c @@ -229,12 +229,10 @@ void sub_80011E8(u8 *param_1) void sub_8001248(void) { s32 index; - s32 counter; for(index = 0; index < INVENTORY_SIZE; index++) { - counter = RandInt(100); - if(counter < 50) + if(RandInt(100) < 50) ZeroOutItem(&gTeamInventoryRef->teamItems[index]); } FillInventoryGaps(); From cd2c46d027e31a2126ebe89c305a68b0d92b53f9 Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Sun, 15 Dec 2024 10:08:16 -0800 Subject: [PATCH 08/11] finish off pokemon_3.s thanks to @DizzyEggg --- asm/pokemon_3.s | 1001 ---------------------------------------- include/code_8024458.h | 4 +- include/pokemon_3.h | 40 +- ld_script.txt | 1 - src/code_8024458.c | 4 +- src/pokemon_3.c | 910 ++++++++++++++++++++++++++++++++++++ 6 files changed, 950 insertions(+), 1010 deletions(-) delete mode 100644 asm/pokemon_3.s diff --git a/asm/pokemon_3.s b/asm/pokemon_3.s deleted file mode 100644 index 8a2481a24..000000000 --- a/asm/pokemon_3.s +++ /dev/null @@ -1,1001 +0,0 @@ - #include "asm/constants/gba_constants.inc" - #include "asm/macros.inc" - - .syntax unified - - .text - - thumb_func_start CreatePokemonInfoTabScreen -CreatePokemonInfoTabScreen: - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x30 - adds r5, r0, 0 - adds r4, r1, 0 - mov r10, r2 - str r3, [sp, 0x2C] - ldr r0, [sp, 0x50] - bl sub_80073B8 - ldr r0, _0808F880 - mov r1, r10 - adds r1, 0x2 - movs r2, 0x14 - bl strncpy - movs r0, 0x20 - mov r9, r0 - cmp r5, 0x5 - bls _0808F874 - b _0808FED6 -_0808F874: - lsls r0, r5, 2 - ldr r1, _0808F884 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .align 2, 0 -_0808F880: .4byte gFormatBuffer_Monsters -_0808F884: .4byte _0808F888 - .align 2, 0 -_0808F888: - .4byte _0808FED6 - .4byte _0808FBF4 - .4byte _0808F8A0 - .4byte _0808FB44 - .4byte _0808FCB0 - .4byte _0808FDB0 -_0808F8A0: - lsls r0, r4, 3 - adds r0, 0x10 - ldr r2, _0808F998 - movs r5, 0 - str r5, [sp] - movs r1, 0 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow - ldr r4, _0808F99C - mov r1, r10 - ldr r0, [r1, 0x2C] - str r0, [r4] - ldr r0, [r1, 0x30] - str r0, [r4, 0x4] - ldr r0, _0808F9A0 - ldr r2, [r0] - str r5, [sp] - movs r0, 0x4 - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow - movs r2, 0xA - add r9, r2 - ldr r0, _0808F9A4 - ldr r2, [r0] - str r5, [sp] - movs r0, 0x4 - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow - movs r3, 0xA - add r9, r3 - mov r0, r10 - ldr r2, [r0, 0x2C] - cmp r2, 0x63 - bgt _0808F914 - movs r3, 0 - ldrsh r1, [r0, r3] - adds r2, 0x1 - add r0, sp, 0x8 - bl GetPokemonLevelData - ldr r0, [sp, 0x8] - mov r2, r10 - ldr r1, [r2, 0x30] - subs r0, r1 - str r0, [r4] - ldr r0, _0808F9A8 - ldr r2, [r0] - str r5, [sp] - movs r0, 0x4 - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow -_0808F914: - movs r3, 0xC - add r9, r3 - mov r1, r10 - ldr r0, [r1, 0x24] - str r0, [r4] - ldr r0, [r1, 0x28] - str r0, [r4, 0x4] - ldr r0, _0808F9AC - ldr r2, [r0] - str r5, [sp] - movs r0, 0x4 - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow - movs r2, 0xA - add r9, r2 - ldr r0, _0808F9B0 - ldr r2, [r0] - str r5, [sp] - movs r0, 0x4 - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow - ldr r0, _0808F9B4 - ldr r2, [r0] - mov r0, r10 - adds r0, 0x34 - ldrb r3, [r0] - str r3, [r4] - mov r1, r10 - adds r1, 0x39 - ldrb r0, [r1] - cmp r0, 0 - beq _0808F964 - adds r0, r3, r0 - str r0, [r4] - ldr r0, _0808F9B8 - ldr r2, [r0] -_0808F964: - str r5, [sp] - movs r0, 0x4 - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow - mov r1, r10 - adds r1, 0x3B - ldrb r3, [r1] - cmp r3, 0 - beq _0808F9C0 - mov r0, r10 - adds r0, 0x36 - ldrb r0, [r0] - adds r1, r3, 0 - adds r0, r1 - str r0, [r4] - ldr r0, _0808F9BC - ldr r2, [r0] - str r5, [sp] - movs r0, 0x4 - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow - b _0808F9D8 - .align 2, 0 -_0808F998: .4byte gUnknown_8107754 -_0808F99C: .4byte gFormatArgs -_0808F9A0: .4byte gLevel810DD6C_Ptr -_0808F9A4: .4byte gExpPts810DD9C_Ptr -_0808F9A8: .4byte gUnknown_810DDB8 -_0808F9AC: .4byte gUnknown_810DDD0 -_0808F9B0: .4byte gUnknown_810DDE4 -_0808F9B4: .4byte gUnknown_810DE0C -_0808F9B8: .4byte gUnknown_810DE20 -_0808F9BC: .4byte gUnknown_810DE4C -_0808F9C0: - mov r0, r10 - adds r0, 0x36 - ldrb r0, [r0] - str r0, [r4] - ldr r0, _0808FA44 - ldr r2, [r0] - str r3, [sp] - movs r0, 0x4 - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow -_0808F9D8: - movs r3, 0xA - add r9, r3 - ldr r0, _0808FA48 - ldr r2, [r0] - movs r5, 0 - str r5, [sp] - movs r0, 0x4 - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow - ldr r0, _0808FA4C - ldr r2, [r0] - ldr r4, _0808FA50 - mov r0, r10 - adds r0, 0x35 - ldrb r3, [r0] - str r3, [r4] - mov r1, r10 - adds r1, 0x3A - ldrb r0, [r1] - cmp r0, 0 - beq _0808FA0E - adds r0, r3, r0 - str r0, [r4] - ldr r0, _0808FA54 - ldr r2, [r0] -_0808FA0E: - str r5, [sp] - movs r0, 0x4 - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow - mov r1, r10 - adds r1, 0x3C - ldrb r3, [r1] - cmp r3, 0 - beq _0808FA5C - mov r0, r10 - adds r0, 0x37 - ldrb r0, [r0] - adds r1, r3, 0 - adds r0, r1 - str r0, [r4] - ldr r0, _0808FA58 - ldr r2, [r0] - str r5, [sp] - movs r0, 0x4 - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow - b _0808FA74 - .align 2, 0 -_0808FA44: .4byte gUnknown_810DE38 -_0808FA48: .4byte gUnknown_810DDFC -_0808FA4C: .4byte gUnknown_810DE24 -_0808FA50: .4byte gFormatArgs -_0808FA54: .4byte gUnknown_810DE28 -_0808FA58: .4byte gUnknown_810DE54 -_0808FA5C: - mov r0, r10 - adds r0, 0x37 - ldrb r0, [r0] - str r0, [r4] - ldr r0, _0808FA94 - ldr r2, [r0] - str r3, [sp] - movs r0, 0x4 - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow -_0808FA74: - movs r0, 0xA - add r9, r0 - mov r2, r10 - adds r2, 0x20 - ldrb r1, [r2] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _0808FA9C - ldr r0, _0808FA98 - adds r1, r2, 0 - movs r2, 0 - bl sub_8090E14 - b _0808FAA6 - .align 2, 0 -_0808FA94: .4byte gUnknown_810DE50 -_0808FA98: .4byte gFormatBuffer_Items -_0808FA9C: - ldr r0, _0808FB24 - ldr r1, _0808FB28 - ldr r1, [r1] - bl strcpy -_0808FAA6: - ldr r0, _0808FB2C - ldr r2, [r0] - movs r4, 0 - str r4, [sp] - movs r0, 0x4 - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow - movs r1, 0xC - add r9, r1 - ldr r1, _0808FB30 - mov r2, r10 - movs r3, 0x3E - ldrsh r0, [r2, r3] - str r0, [r1] - movs r1, 0x3E - ldrsh r0, [r2, r1] - movs r1, 0xA - bl __divsi3 - lsls r0, 16 - asrs r0, 16 - cmp r0, 0 - bge _0808FADA - movs r0, 0 -_0808FADA: - cmp r0, 0x62 - ble _0808FAE0 - movs r0, 0x63 -_0808FAE0: - ldr r1, _0808FB34 - lsls r0, 2 - adds r0, r1 - ldr r5, _0808FB38 - ldr r1, [r0] - adds r0, r5, 0 - bl strcpy - ldr r0, _0808FB3C - ldr r2, [r0] - str r4, [sp] - movs r0, 0x4 - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow - movs r2, 0xA - add r9, r2 - mov r0, r10 - adds r0, 0x38 - ldrb r4, [r0] - cmp r4, 0 - beq _0808FB10 - b _0808FED6 -_0808FB10: - adds r0, 0x1C - ldrb r1, [r0] - adds r0, r5, 0 - bl CopyTacticsNameToBuffer - ldr r0, _0808FB40 - ldr r2, [r0] - str r4, [sp] - b _0808FECC - .align 2, 0 -_0808FB24: .4byte gFormatBuffer_Items -_0808FB28: .4byte gUnknown_810DE58 -_0808FB2C: .4byte gUnknown_810DE6C -_0808FB30: .4byte gFormatArgs -_0808FB34: .4byte gUnknown_8115718 -_0808FB38: .4byte gFormatBuffer_Monsters -_0808FB3C: .4byte gUnknown_810DE80 -_0808FB40: .4byte gUnknown_810DE98 -_0808FB44: - lsls r0, r4, 3 - adds r0, 0x10 - ldr r2, _0808FBE8 - movs r4, 0 - str r4, [sp] - movs r1, 0 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow - ldr r2, _0808FBEC - str r4, [sp] - movs r0, 0x4 - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow - mov r3, r10 - ldrb r0, [r3, 0x16] - bl GetFormattedTypeString - adds r2, r0, 0 - str r4, [sp] - movs r0, 0x38 - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow - mov r1, r10 - ldrb r0, [r1, 0x17] - cmp r0, 0 - beq _0808FB94 - bl GetFormattedTypeString - adds r2, r0, 0 - str r4, [sp] - movs r0, 0x60 - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow -_0808FB94: - movs r2, 0xC - add r9, r2 - ldr r2, _0808FBF0 - str r4, [sp] - movs r0, 0x4 - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow - movs r3, 0xC - add r9, r3 - mov r1, r10 - ldrb r0, [r1, 0x18] - bl GetAbilityDescription - adds r2, r0, 0 - str r4, [sp] - movs r5, 0xB - str r5, [sp, 0x4] - movs r0, 0x4 - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow2 - movs r2, 0x21 - add r9, r2 - mov r3, r10 - ldrb r0, [r3, 0x19] - cmp r0, 0 - bne _0808FBD2 - b _0808FED6 -_0808FBD2: - bl GetAbilityDescription - adds r2, r0, 0 - str r4, [sp] - str r5, [sp, 0x4] - movs r0, 0x4 - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow2 - b _0808FED6 - .align 2, 0 -_0808FBE8: .4byte gUnknown_810775C -_0808FBEC: .4byte gUnknown_8107768 -_0808FBF0: .4byte gUnknown_8107770 -_0808FBF4: - lsls r0, r4, 3 - adds r0, 0x10 - ldr r1, _0808FC34 - ldr r2, [r1] - movs r1, 0 - str r1, [sp] - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow - mov r0, r10 - adds r0, 0x56 - movs r1, 0 - ldrsh r0, [r0, r1] - subs r5, r0, 0x1 - movs r2, 0xC - negs r2, r2 - add r9, r2 - movs r7, 0 - ldr r6, [sp, 0x2C] - adds r6, 0xC - adds r1, r6, 0 - movs r2, 0 - ldr r0, [sp, 0x2C] - adds r0, 0x2C -_0808FC24: - str r2, [r0] - subs r0, 0x4 - cmp r0, r1 - bge _0808FC24 - movs r3, 0 - mov r8, r3 - b _0808FC88 - .align 2, 0 -_0808FC34: .4byte gUnknown_810DD58 -_0808FC38: - mov r0, r10 - adds r0, 0x58 - adds r4, r0, r5 - ldrb r0, [r4] - cmp r0, 0 - beq _0808FC78 - movs r7, 0x1 - ldr r0, _0808FCA0 - ldrb r1, [r4] - lsls r1, 2 - adds r1, r0 - ldr r0, _0808FCA4 - ldr r1, [r1] - movs r2, 0x50 - bl strncpy - ldr r2, _0808FCA8 - movs r0, 0 - str r0, [sp] - movs r0, 0xC - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow - mov r0, r8 - cmp r0, 0 - ble _0808FC78 - subs r0, 0x1 - lsls r0, 2 - adds r0, r6, r0 - ldrb r1, [r4] - str r1, [r0] -_0808FC78: - movs r1, 0x1 - add r8, r1 - adds r5, 0x1 - movs r2, 0xC - add r9, r2 - mov r3, r8 - cmp r3, 0x9 - bgt _0808FC90 -_0808FC88: - cmp r5, 0 - blt _0808FC78 - cmp r5, 0xB - ble _0808FC38 -_0808FC90: - cmp r7, 0 - beq _0808FC96 - b _0808FED6 -_0808FC96: - ldr r0, _0808FCAC - ldr r2, [r0] - str r7, [sp] - b _0808FD98 - .align 2, 0 -_0808FCA0: .4byte gStatusNames -_0808FCA4: .4byte gFormatBuffer_Items + 0x50 -_0808FCA8: .4byte gUnknown_8107784 -_0808FCAC: .4byte gUnknown_810DF78 -_0808FCB0: - lsls r0, r4, 3 - adds r0, 0x10 - ldr r1, _0808FCF8 - ldr r2, [r1] - movs r1, 0 - str r1, [sp] - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow - add r4, sp, 0x14 - mov r0, r10 - movs r2, 0x3E - ldrsh r1, [r0, r2] - adds r0, r4, 0 - bl GetNumAvailableIQSkills - mov r0, r10 - adds r0, 0x40 - movs r3, 0 - ldrsh r0, [r0, r3] - subs r7, r0, 0x1 - mov r1, r9 - subs r1, 0xC - movs r2, 0 - ldr r0, [sp, 0x2C] - adds r0, 0x8 -_0808FCE4: - strb r2, [r0] - subs r0, 0x1 - ldr r3, [sp, 0x2C] - cmp r0, r3 - bge _0808FCE4 - mov r9, r1 - movs r4, 0 - mov r8, r4 - b _0808FD84 - .align 2, 0 -_0808FCF8: .4byte gIQSkill810DD68_Ptr -_0808FCFC: - mov r5, sp - adds r5, r7 - adds r5, 0x14 - ldrb r0, [r5] - cmp r0, 0 - beq _0808FD74 - movs r4, 0x1 - bl GetIQSkillName - adds r1, r0, 0 - ldr r6, _0808FD3C - adds r0, r6, 0 - movs r2, 0x50 - bl strncpy - mov r0, r10 - adds r0, 0x50 - adds r1, r4, 0 - ldrb r5, [r5] - lsls r1, r5 - bl IsIQSkillSet - lsls r0, 24 - cmp r0, 0 - beq _0808FD44 - adds r0, r6, 0 - subs r0, 0x50 - ldr r1, _0808FD40 - bl strcpy - b _0808FD4E - .align 2, 0 -_0808FD3C: .4byte gFormatBuffer_Items + 0x50 -_0808FD40: .4byte gUnknown_8107788 -_0808FD44: - adds r0, r6, 0 - subs r0, 0x50 - ldr r1, _0808FDA4 - bl strcpy -_0808FD4E: - mov r0, r8 - cmp r0, 0 - ble _0808FD64 - subs r0, 0x1 - ldr r1, [sp, 0x2C] - adds r0, r1, r0 - mov r1, sp - adds r1, r7 - adds r1, 0x14 - ldrb r1, [r1] - strb r1, [r0] -_0808FD64: - ldr r2, _0808FDA8 - movs r0, 0 - str r0, [sp] - movs r0, 0xC - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow -_0808FD74: - movs r2, 0x1 - add r8, r2 - adds r7, 0x1 - movs r3, 0xC - add r9, r3 - mov r0, r8 - cmp r0, 0x9 - bgt _0808FD8C -_0808FD84: - cmp r7, 0 - blt _0808FD74 - cmp r7, 0x17 - ble _0808FCFC -_0808FD8C: - cmp r4, 0 - beq _0808FD92 - b _0808FED6 -_0808FD92: - ldr r0, _0808FDAC - ldr r2, [r0] - str r4, [sp] -_0808FD98: - movs r0, 0xC - movs r1, 0x20 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow - b _0808FED6 - .align 2, 0 -_0808FDA4: .4byte gUnknown_810778C -_0808FDA8: .4byte gUnknown_8107790 -_0808FDAC: .4byte gUnknown_810DF84 -_0808FDB0: - lsls r0, r4, 3 - adds r0, 0x10 - ldr r2, _0808FEEC - movs r5, 0 - str r5, [sp] - movs r1, 0 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow - ldr r6, _0808FEF0 - mov r2, r10 - movs r3, 0 - ldrsh r1, [r2, r3] - adds r0, r6, 0 - bl CopyMonsterNameToBuffer - ldr r1, _0808FEF4 - mov r2, r10 - movs r3, 0 - ldrsh r0, [r2, r3] - str r0, [r1] - ldr r0, _0808FEF8 - ldr r2, [r0] - str r5, [sp] - movs r0, 0x4 - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow - movs r0, 0xA - add r9, r0 - mov r1, r10 - movs r2, 0 - ldrsh r0, [r1, r2] - bl GetFriendArea - lsls r0, 24 - lsrs r0, 24 - bl GetFriendAreaName - adds r1, r0, 0 - ldr r4, _0808FEFC - adds r0, r4, 0 - movs r2, 0x50 - bl strncpy - ldr r0, _0808FF00 - ldr r2, [r0] - str r5, [sp] - movs r0, 0x4 - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow - movs r3, 0xA - add r9, r3 - ldr r0, _0808FF04 - ldr r2, [r0] - str r5, [sp] - movs r0, 0x4 - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow - movs r0, 0xD - add r9, r0 - ldr r0, _0808FF08 - ldr r2, [r0] - str r5, [sp] - movs r0, 0x4 - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow - movs r1, 0xA - add r9, r1 - mov r1, r10 - adds r1, 0x1C - adds r0, r4, 0 - bl PrintYellowDungeonNametoBuffer - ldr r0, _0808FF0C - ldr r2, [r0] - str r5, [sp] - movs r0, 0x4 - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow - movs r2, 0xD - add r9, r2 - mov r3, r10 - movs r1, 0 - ldrsh r0, [r3, r1] - bl GetCategoryString - adds r1, r0, 0 - adds r0, r6, 0 - movs r2, 0x14 - bl strncpy - ldr r0, _0808FF10 - ldr r2, [r0] - str r5, [sp] - movs r0, 0x4 - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow - movs r2, 0xD - add r9, r2 - ldr r4, _0808FF14 - mov r3, r10 - movs r1, 0 - ldrsh r0, [r3, r1] - bl GetBodySize - lsls r0, 24 - lsrs r0, 22 - adds r0, r4 - ldr r1, [r0] - adds r0, r6, 0 - bl strcpy - ldr r0, _0808FF18 - ldr r2, [r0] - str r5, [sp] - movs r0, 0x4 - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow - movs r2, 0xD - add r9, r2 - ldr r1, _0808FF1C - mov r0, r10 - adds r0, 0x4C - ldrb r0, [r0] - lsls r0, 2 - adds r0, r1 - ldr r2, [r0] - str r5, [sp] -_0808FECC: - movs r0, 0x4 - mov r1, r9 - ldr r3, [sp, 0x50] - bl PrintFormattedStringOnWindow -_0808FED6: - ldr r0, [sp, 0x50] - bl sub_80073E0 - add sp, 0x30 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_0808FEEC: .4byte gUnknown_8107798 -_0808FEF0: .4byte gFormatBuffer_Monsters -_0808FEF4: .4byte gFormatArgs -_0808FEF8: .4byte gUnknown_810DEB4 -_0808FEFC: .4byte gFormatBuffer_Items -_0808FF00: .4byte gUnknown_810DEC8 -_0808FF04: .4byte gUnknown_810DEDC -_0808FF08: .4byte gUnknown_810DFB4 -_0808FF0C: .4byte gUnknown_810DFC8 -_0808FF10: .4byte gUnknown_810DEF4 -_0808FF14: .4byte gUnknown_810E02C -_0808FF18: .4byte gUnknown_810DF98 -_0808FF1C: .4byte gEvolutionStrings - thumb_func_end CreatePokemonInfoTabScreen - - thumb_func_start sub_808FF20 -sub_808FF20: - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - adds r5, r0, 0 - adds r6, r1, 0 - lsls r2, 24 - lsrs r2, 24 - mov r8, r2 - adds r0, r5, 0x2 - movs r2, 0 - bl PrintColoredPokeNameToBuffer - ldrh r0, [r6, 0x8] - strh r0, [r5] - movs r1, 0x16 - ldrsh r0, [r6, r1] - str r0, [r5, 0x24] - str r0, [r5, 0x28] - ldrb r0, [r6, 0x3] - str r0, [r5, 0x2C] - ldr r0, [r6, 0x1C] - str r0, [r5, 0x30] - movs r4, 0 -_0808FF50: - adds r1, r5, 0 - adds r1, 0x34 - adds r1, r4 - adds r0, r6, 0 - adds r0, 0x18 - adds r0, r4 - ldrb r0, [r0] - strb r0, [r1] - adds r1, r5, 0 - adds r1, 0x36 - adds r1, r4 - adds r0, r6, 0 - adds r0, 0x1A - adds r0, r4 - ldrb r0, [r0] - strb r0, [r1] - movs r7, 0x8 - ldrsh r0, [r6, r7] - adds r1, r4, 0 - bl GetPokemonType - adds r1, r5, 0 - adds r1, 0x16 - adds r1, r4 - strb r0, [r1] - movs r1, 0x8 - ldrsh r0, [r6, r1] - adds r1, r4, 0 - bl GetPokemonAbility - adds r1, r5, 0 - adds r1, 0x18 - adds r1, r4 - strb r0, [r1] - adds r4, 0x1 - cmp r4, 0x1 - ble _0808FF50 - ldrb r2, [r6, 0x2] - adds r1, r5, 0 - adds r1, 0x38 - movs r0, 0 - strb r2, [r1] - adds r2, r5, 0 - adds r2, 0x39 - strb r0, [r2] - adds r3, r5, 0 - adds r3, 0x3A - strb r0, [r3] - movs r7, 0x3B - adds r7, r5 - mov r12, r7 - strb r0, [r7] - movs r1, 0x3C - adds r1, r5 - mov r9, r1 - strb r0, [r1] - adds r0, r6, 0 - adds r0, 0x28 - ldrb r1, [r0] - adds r4, r0, 0 - cmp r1, 0 - beq _08090026 - cmp r1, 0x13 - bne _0808FFDA - ldr r0, _08090060 - ldrb r0, [r0] - ldrb r7, [r2] - adds r0, r7 - strb r0, [r2] -_0808FFDA: - ldrb r1, [r4] - cmp r1, 0x21 - bne _0808FFEA - ldr r0, _08090064 - ldrb r0, [r0] - ldrb r7, [r3] - adds r0, r7 - strb r0, [r3] -_0808FFEA: - cmp r1, 0x2B - bne _0808FFFE - ldr r0, _08090068 - ldrb r0, [r0] - ldrb r7, [r2] - adds r1, r0, r7 - strb r1, [r2] - ldrb r1, [r3] - adds r0, r1 - strb r0, [r3] -_0808FFFE: - ldrb r0, [r4] - cmp r0, 0x1E - bne _08090012 - ldr r0, _0809006C - ldrb r0, [r0] - mov r2, r12 - ldrb r2, [r2] - adds r0, r2 - mov r7, r12 - strb r0, [r7] -_08090012: - ldrb r0, [r4] - cmp r0, 0x22 - bne _08090026 - ldr r0, _08090070 - ldrb r0, [r0] - mov r1, r9 - ldrb r1, [r1] - adds r0, r1 - mov r2, r9 - strb r0, [r2] -_08090026: - adds r0, r6, 0 - adds r0, 0x24 - ldrb r1, [r0] - adds r0, r5, 0 - adds r0, 0x54 - strb r1, [r0] - subs r0, 0x34 - adds r1, r4, 0 - bl HeldItemToSlot - ldrh r0, [r6, 0x14] - strh r0, [r5, 0x3E] - ldr r0, [r6, 0x4] - str r0, [r5, 0x1C] - ldr r0, [r6, 0xC] - str r0, [r5, 0x44] - ldr r0, [r6, 0x10] - str r0, [r5, 0x48] - ldr r0, [r6, 0x20] - str r0, [r5, 0x50] - mov r7, r8 - cmp r7, 0 - beq _08090074 - adds r0, r6, 0 - bl sub_808F700 - adds r1, r5, 0 - adds r1, 0x4C - b _0809007A - .align 2, 0 -_08090060: .4byte gUnknown_810AC60 -_08090064: .4byte gUnknown_810AC62 -_08090068: .4byte gUnknown_810AC68 -_0809006C: .4byte gUnknown_810AC64 -_08090070: .4byte gUnknown_810AC66 -_08090074: - adds r1, r5, 0 - adds r1, 0x4C - movs r0, 0x3 -_0809007A: - strb r0, [r1] - adds r1, r5, 0 - adds r1, 0x58 - movs r2, 0 - adds r0, r5, 0 - adds r0, 0x63 -_08090086: - strb r2, [r0] - subs r0, 0x1 - cmp r0, r1 - bge _08090086 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_808FF20 - - .align 2,0 diff --git a/include/code_8024458.h b/include/code_8024458.h index 865bc5d5f..f9f50961d 100644 --- a/include/code_8024458.h +++ b/include/code_8024458.h @@ -4,6 +4,7 @@ #include "structs/menu.h" #include "structs/str_text.h" +#include "pokemon_3.h" struct unkStruct_203B2AC { @@ -11,8 +12,7 @@ struct unkStruct_203B2AC u32 unk34[3]; u8 unk40[0x48 - 0x40]; s16 speciesNum; - u32 unk4C; - u8 unk50[0xB0 - 0x50]; + struct unkStruct_808FF20 unk4C; u32 unkB0; u8 fillB4[0xE0 - 0xB4]; u32 unkE0; diff --git a/include/pokemon_3.h b/include/pokemon_3.h index dbda724fe..436a5ad73 100644 --- a/include/pokemon_3.h +++ b/include/pokemon_3.h @@ -15,6 +15,40 @@ typedef struct EvolveStatus /* 0x6 */ s16 targetEvolveSpecies; } EvolveStatus; +struct unkStruct_808FF20 +{ + // size: 0x64 + s16 species; + u8 nameBuffer[0x14]; + u8 types[2]; // 0x16 + u8 abilities[2]; // 0x18 + u8 fill1A[0x1C - 0x1A]; + DungeonLocation dungeonLocation; // 0x1C + Item item; // 0x20 + s32 HP1; + s32 HP2; + s32 level; + u32 exp; + Offense offense; + bool8 isTeamLeader; + u8 atkBoost; + u8 spAtkBoost; + u8 defBoost; + u8 spDefBoost; + u8 fill3D; + s16 IQ; // 0x3E + s16 unk40; + s16 fill42; + struct unkPokeSubStruct_C unk44[2]; + u8 unk4C; + u8 fill4D[3]; + IqSkillFlags IQSkills; // 0x50 + u8 tactic; + u8 fill55[1]; + s16 unk56; + u8 unk58[12]; +}; + bool8 HasRecruitedMon(s16 species); s16 GetBaseSpecies(s16 index); s16 GetBaseSpeciesNoUnown(s16 index); @@ -36,9 +70,7 @@ s16 ExtractSpeciesIndex(UnkDungeonGlobal_unk1CD98 *r0); void SetSpeciesLevelToExtract(UnkDungeonGlobal_unk1CD98 *r0, s32 level, s32 species); s32 ExtractLevel(UnkDungeonGlobal_unk1CD98 *r0); PokemonStruct1 *sub_808F798(PokemonStruct1 *pokemon, short _species); - -// pokemon_3.s -extern void CreatePokemonInfoTabScreen(u32, s16, u32 *, u32 *, u32); -extern void sub_808FF20(u32 *, PokemonStruct1 *, bool8); +void CreatePokemonInfoTabScreen(u32, s32, struct unkStruct_808FF20 *, u8 *, u32); +void sub_808FF20(struct unkStruct_808FF20 *param_1, struct PokemonStruct1 *pokemon, bool8 param_3); #endif // GUARD_POKEMON_3_H diff --git a/ld_script.txt b/ld_script.txt index 930594965..c8719c443 100755 --- a/ld_script.txt +++ b/ld_script.txt @@ -288,7 +288,6 @@ SECTIONS { src/pokemon.o(.text); asm/pokemon_2.o(.text); src/pokemon_3.o(.text); - asm/pokemon_3.o(.text); src/dungeon.o(.text); asm/dungeon_2.o(.text); src/dungeon_2_1.o(.text); diff --git a/src/code_8024458.c b/src/code_8024458.c index a900360a5..c7c4915df 100644 --- a/src/code_8024458.c +++ b/src/code_8024458.c @@ -83,13 +83,13 @@ static void sub_8024588(void) static void sub_80245D0(void) { - CreatePokemonInfoTabScreen(sUnknown_203B2AC->unk34[sUnknown_203B2AC->input.unk1E], sUnknown_203B2AC->input.unk1E, &sUnknown_203B2AC->unk4C, &sUnknown_203B2AC->unkB0, sUnknown_203B2AC->unkE0); + CreatePokemonInfoTabScreen(sUnknown_203B2AC->unk34[sUnknown_203B2AC->input.unk1E], sUnknown_203B2AC->input.unk1E, &sUnknown_203B2AC->unk4C, (u8 *)&sUnknown_203B2AC->unkB0, sUnknown_203B2AC->unkE0); } static void sub_8024604(void) { PokemonStruct1 *pokeStruct; - u32 *iVar3; + struct unkStruct_808FF20 *iVar3; sUnknown_203B2AC->unk34[0] = 2; sUnknown_203B2AC->unk34[1] = 3; diff --git a/src/pokemon_3.c b/src/pokemon_3.c index 9dc2b1145..cf84f4f07 100644 --- a/src/pokemon_3.c +++ b/src/pokemon_3.c @@ -2,6 +2,7 @@ #include "pokemon.h" #include "pokemon_3.h" #include "random.h" +#include "constants/colors.h" #include "constants/dungeon.h" #include "constants/evolve_type.h" #include "constants/evolution_status.h" @@ -41,6 +42,48 @@ extern s16 gUnknown_810AC62; // 0xC extern s16 gUnknown_810AC68; // 0x8 extern s16 gUnknown_810AC64; // 0x8 extern s16 gUnknown_810AC66; // 0x8 +extern u8 *gUnknown_810DD58[]; +extern u8 *gEvolutionStrings[]; +extern u8 *gExpPts810DD9C_Ptr[]; +extern u8 *gIQSkill810DD68_Ptr[]; +extern u8 *gLevel810DD6C_Ptr[]; +extern u8 *gStatusNames[]; +extern u8 gUnknown_8107754[]; +extern u8 gUnknown_810775C[]; +extern u8 gUnknown_8107768[]; +extern u8 gUnknown_8107770[]; +extern u8 gUnknown_8107784[]; +extern u8 gUnknown_8107788[]; +extern u8 gUnknown_810778C[]; +extern u8 gUnknown_8107790[]; +extern u8 gUnknown_8107798[]; +extern u8 *gUnknown_810DDB8[]; +extern u8 *gUnknown_810DDD0[]; +extern u8 *gUnknown_810DDE4[]; +extern u8 *gUnknown_810DDFC[]; +extern u8 *gUnknown_810DE0C[]; +extern u8 *gUnknown_810DE20[]; +extern u8 *gUnknown_810DE24[]; +extern u8 *gUnknown_810DE28[]; +extern u8 *gUnknown_810DE38[]; +extern u8 *gUnknown_810DE4C[]; +extern u8 *gUnknown_810DE50[]; +extern u8 *gUnknown_810DE54[]; +extern u8 *gUnknown_810DE58[]; +extern u8 *gUnknown_810DE6C[]; +extern u8 *gUnknown_810DE80[]; +extern u8 *gUnknown_810DE98[]; +extern u8 *gUnknown_810DEB4[]; +extern u8 *gUnknown_810DEC8[]; +extern u8 *gUnknown_810DEDC[]; +extern u8 *gUnknown_810DEF4[]; +extern u8 *gUnknown_810DF78[]; +extern u8 *gUnknown_810DF84[]; +extern u8 *gUnknown_810DF98[]; +extern u8 *gUnknown_810DFB4[]; +extern u8 *gUnknown_810DFC8[]; +extern u8 *gUnknown_810E02C[]; +extern u8 *gUnknown_8115718[]; // 2, 4, 6, 7, 8, 9, 0xA, 0xD, 0xF, 0x11 extern s32 gUnknown_810AC90[10]; @@ -1160,3 +1203,870 @@ UNUSED void sub_808F83C(PokemonStruct1 *pokemon, s16 species, u8 *r2) { *r2 = 0; } + + +// https://decomp.me/scratch/qONOW - 91.59% matched (Seth) +NAKED +void CreatePokemonInfoTabScreen(u32 param_1, s32 param_2, struct unkStruct_808FF20 *param_3, u8 *param_4, u32 param_5) +{ + 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, 0x30\n" +" adds r5, r0, 0\n" +" adds r4, r1, 0\n" +" mov r10, r2\n" +" str r3, [sp, 0x2C]\n" +" ldr r0, [sp, 0x50]\n" +" bl sub_80073B8\n" +" ldr r0, _0808F880\n" +" mov r1, r10\n" +" adds r1, 0x2\n" +" movs r2, 0x14\n" +" bl strncpy\n" +" movs r0, 0x20\n" +" mov r9, r0\n" +" cmp r5, 0x5\n" +" bls _0808F874\n" +" b _0808FED6\n" +"_0808F874:\n" +" lsls r0, r5, 2\n" +" ldr r1, _0808F884\n" +" adds r0, r1\n" +" ldr r0, [r0]\n" +" mov pc, r0\n" +" .align 2, 0\n" +"_0808F880: .4byte gFormatBuffer_Monsters\n" +"_0808F884: .4byte _0808F888\n" +" .align 2, 0\n" +"_0808F888:\n" +" .4byte _0808FED6\n" +" .4byte _0808FBF4\n" +" .4byte _0808F8A0\n" +" .4byte _0808FB44\n" +" .4byte _0808FCB0\n" +" .4byte _0808FDB0\n" +"_0808F8A0:\n" +" lsls r0, r4, 3\n" +" adds r0, 0x10\n" +" ldr r2, _0808F998\n" +" movs r5, 0\n" +" str r5, [sp]\n" +" movs r1, 0\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +" ldr r4, _0808F99C\n" +" mov r1, r10\n" +" ldr r0, [r1, 0x2C]\n" +" str r0, [r4]\n" +" ldr r0, [r1, 0x30]\n" +" str r0, [r4, 0x4]\n" +" ldr r0, _0808F9A0\n" +" ldr r2, [r0]\n" +" str r5, [sp]\n" +" movs r0, 0x4\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +" movs r2, 0xA\n" +" add r9, r2\n" +" ldr r0, _0808F9A4\n" +" ldr r2, [r0]\n" +" str r5, [sp]\n" +" movs r0, 0x4\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +" movs r3, 0xA\n" +" add r9, r3\n" +" mov r0, r10\n" +" ldr r2, [r0, 0x2C]\n" +" cmp r2, 0x63\n" +" bgt _0808F914\n" +" movs r3, 0\n" +" ldrsh r1, [r0, r3]\n" +" adds r2, 0x1\n" +" add r0, sp, 0x8\n" +" bl GetPokemonLevelData\n" +" ldr r0, [sp, 0x8]\n" +" mov r2, r10\n" +" ldr r1, [r2, 0x30]\n" +" subs r0, r1\n" +" str r0, [r4]\n" +" ldr r0, _0808F9A8\n" +" ldr r2, [r0]\n" +" str r5, [sp]\n" +" movs r0, 0x4\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +"_0808F914:\n" +" movs r3, 0xC\n" +" add r9, r3\n" +" mov r1, r10\n" +" ldr r0, [r1, 0x24]\n" +" str r0, [r4]\n" +" ldr r0, [r1, 0x28]\n" +" str r0, [r4, 0x4]\n" +" ldr r0, _0808F9AC\n" +" ldr r2, [r0]\n" +" str r5, [sp]\n" +" movs r0, 0x4\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +" movs r2, 0xA\n" +" add r9, r2\n" +" ldr r0, _0808F9B0\n" +" ldr r2, [r0]\n" +" str r5, [sp]\n" +" movs r0, 0x4\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +" ldr r0, _0808F9B4\n" +" ldr r2, [r0]\n" +" mov r0, r10\n" +" adds r0, 0x34\n" +" ldrb r3, [r0]\n" +" str r3, [r4]\n" +" mov r1, r10\n" +" adds r1, 0x39\n" +" ldrb r0, [r1]\n" +" cmp r0, 0\n" +" beq _0808F964\n" +" adds r0, r3, r0\n" +" str r0, [r4]\n" +" ldr r0, _0808F9B8\n" +" ldr r2, [r0]\n" +"_0808F964:\n" +" str r5, [sp]\n" +" movs r0, 0x4\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +" mov r1, r10\n" +" adds r1, 0x3B\n" +" ldrb r3, [r1]\n" +" cmp r3, 0\n" +" beq _0808F9C0\n" +" mov r0, r10\n" +" adds r0, 0x36\n" +" ldrb r0, [r0]\n" +" adds r1, r3, 0\n" +" adds r0, r1\n" +" str r0, [r4]\n" +" ldr r0, _0808F9BC\n" +" ldr r2, [r0]\n" +" str r5, [sp]\n" +" movs r0, 0x4\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +" b _0808F9D8\n" +" .align 2, 0\n" +"_0808F998: .4byte gUnknown_8107754\n" +"_0808F99C: .4byte gFormatArgs\n" +"_0808F9A0: .4byte gLevel810DD6C_Ptr\n" +"_0808F9A4: .4byte gExpPts810DD9C_Ptr\n" +"_0808F9A8: .4byte gUnknown_810DDB8\n" +"_0808F9AC: .4byte gUnknown_810DDD0\n" +"_0808F9B0: .4byte gUnknown_810DDE4\n" +"_0808F9B4: .4byte gUnknown_810DE0C\n" +"_0808F9B8: .4byte gUnknown_810DE20\n" +"_0808F9BC: .4byte gUnknown_810DE4C\n" +"_0808F9C0:\n" +" mov r0, r10\n" +" adds r0, 0x36\n" +" ldrb r0, [r0]\n" +" str r0, [r4]\n" +" ldr r0, _0808FA44\n" +" ldr r2, [r0]\n" +" str r3, [sp]\n" +" movs r0, 0x4\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +"_0808F9D8:\n" +" movs r3, 0xA\n" +" add r9, r3\n" +" ldr r0, _0808FA48\n" +" ldr r2, [r0]\n" +" movs r5, 0\n" +" str r5, [sp]\n" +" movs r0, 0x4\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +" ldr r0, _0808FA4C\n" +" ldr r2, [r0]\n" +" ldr r4, _0808FA50\n" +" mov r0, r10\n" +" adds r0, 0x35\n" +" ldrb r3, [r0]\n" +" str r3, [r4]\n" +" mov r1, r10\n" +" adds r1, 0x3A\n" +" ldrb r0, [r1]\n" +" cmp r0, 0\n" +" beq _0808FA0E\n" +" adds r0, r3, r0\n" +" str r0, [r4]\n" +" ldr r0, _0808FA54\n" +" ldr r2, [r0]\n" +"_0808FA0E:\n" +" str r5, [sp]\n" +" movs r0, 0x4\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +" mov r1, r10\n" +" adds r1, 0x3C\n" +" ldrb r3, [r1]\n" +" cmp r3, 0\n" +" beq _0808FA5C\n" +" mov r0, r10\n" +" adds r0, 0x37\n" +" ldrb r0, [r0]\n" +" adds r1, r3, 0\n" +" adds r0, r1\n" +" str r0, [r4]\n" +" ldr r0, _0808FA58\n" +" ldr r2, [r0]\n" +" str r5, [sp]\n" +" movs r0, 0x4\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +" b _0808FA74\n" +" .align 2, 0\n" +"_0808FA44: .4byte gUnknown_810DE38\n" +"_0808FA48: .4byte gUnknown_810DDFC\n" +"_0808FA4C: .4byte gUnknown_810DE24\n" +"_0808FA50: .4byte gFormatArgs\n" +"_0808FA54: .4byte gUnknown_810DE28\n" +"_0808FA58: .4byte gUnknown_810DE54\n" +"_0808FA5C:\n" +" mov r0, r10\n" +" adds r0, 0x37\n" +" ldrb r0, [r0]\n" +" str r0, [r4]\n" +" ldr r0, _0808FA94\n" +" ldr r2, [r0]\n" +" str r3, [sp]\n" +" movs r0, 0x4\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +"_0808FA74:\n" +" movs r0, 0xA\n" +" add r9, r0\n" +" mov r2, r10\n" +" adds r2, 0x20\n" +" ldrb r1, [r2]\n" +" movs r0, 0x1\n" +" ands r0, r1\n" +" cmp r0, 0\n" +" beq _0808FA9C\n" +" ldr r0, _0808FA98\n" +" adds r1, r2, 0\n" +" movs r2, 0\n" +" bl sub_8090E14\n" +" b _0808FAA6\n" +" .align 2, 0\n" +"_0808FA94: .4byte gUnknown_810DE50\n" +"_0808FA98: .4byte gFormatBuffer_Items\n" +"_0808FA9C:\n" +" ldr r0, _0808FB24\n" +" ldr r1, _0808FB28\n" +" ldr r1, [r1]\n" +" bl strcpy\n" +"_0808FAA6:\n" +" ldr r0, _0808FB2C\n" +" ldr r2, [r0]\n" +" movs r4, 0\n" +" str r4, [sp]\n" +" movs r0, 0x4\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +" movs r1, 0xC\n" +" add r9, r1\n" +" ldr r1, _0808FB30\n" +" mov r2, r10\n" +" movs r3, 0x3E\n" +" ldrsh r0, [r2, r3]\n" +" str r0, [r1]\n" +" movs r1, 0x3E\n" +" ldrsh r0, [r2, r1]\n" +" movs r1, 0xA\n" +" bl __divsi3\n" +" lsls r0, 16\n" +" asrs r0, 16\n" +" cmp r0, 0\n" +" bge _0808FADA\n" +" movs r0, 0\n" +"_0808FADA:\n" +" cmp r0, 0x62\n" +" ble _0808FAE0\n" +" movs r0, 0x63\n" +"_0808FAE0:\n" +" ldr r1, _0808FB34\n" +" lsls r0, 2\n" +" adds r0, r1\n" +" ldr r5, _0808FB38\n" +" ldr r1, [r0]\n" +" adds r0, r5, 0\n" +" bl strcpy\n" +" ldr r0, _0808FB3C\n" +" ldr r2, [r0]\n" +" str r4, [sp]\n" +" movs r0, 0x4\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +" movs r2, 0xA\n" +" add r9, r2\n" +" mov r0, r10\n" +" adds r0, 0x38\n" +" ldrb r4, [r0]\n" +" cmp r4, 0\n" +" beq _0808FB10\n" +" b _0808FED6\n" +"_0808FB10:\n" +" adds r0, 0x1C\n" +" ldrb r1, [r0]\n" +" adds r0, r5, 0\n" +" bl CopyTacticsNameToBuffer\n" +" ldr r0, _0808FB40\n" +" ldr r2, [r0]\n" +" str r4, [sp]\n" +" b _0808FECC\n" +" .align 2, 0\n" +"_0808FB24: .4byte gFormatBuffer_Items\n" +"_0808FB28: .4byte gUnknown_810DE58\n" +"_0808FB2C: .4byte gUnknown_810DE6C\n" +"_0808FB30: .4byte gFormatArgs\n" +"_0808FB34: .4byte gUnknown_8115718\n" +"_0808FB38: .4byte gFormatBuffer_Monsters\n" +"_0808FB3C: .4byte gUnknown_810DE80\n" +"_0808FB40: .4byte gUnknown_810DE98\n" +"_0808FB44:\n" +" lsls r0, r4, 3\n" +" adds r0, 0x10\n" +" ldr r2, _0808FBE8\n" +" movs r4, 0\n" +" str r4, [sp]\n" +" movs r1, 0\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +" ldr r2, _0808FBEC\n" +" str r4, [sp]\n" +" movs r0, 0x4\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +" mov r3, r10\n" +" ldrb r0, [r3, 0x16]\n" +" bl GetFormattedTypeString\n" +" adds r2, r0, 0\n" +" str r4, [sp]\n" +" movs r0, 0x38\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +" mov r1, r10\n" +" ldrb r0, [r1, 0x17]\n" +" cmp r0, 0\n" +" beq _0808FB94\n" +" bl GetFormattedTypeString\n" +" adds r2, r0, 0\n" +" str r4, [sp]\n" +" movs r0, 0x60\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +"_0808FB94:\n" +" movs r2, 0xC\n" +" add r9, r2\n" +" ldr r2, _0808FBF0\n" +" str r4, [sp]\n" +" movs r0, 0x4\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +" movs r3, 0xC\n" +" add r9, r3\n" +" mov r1, r10\n" +" ldrb r0, [r1, 0x18]\n" +" bl GetAbilityDescription\n" +" adds r2, r0, 0\n" +" str r4, [sp]\n" +" movs r5, 0xB\n" +" str r5, [sp, 0x4]\n" +" movs r0, 0x4\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow2\n" +" movs r2, 0x21\n" +" add r9, r2\n" +" mov r3, r10\n" +" ldrb r0, [r3, 0x19]\n" +" cmp r0, 0\n" +" bne _0808FBD2\n" +" b _0808FED6\n" +"_0808FBD2:\n" +" bl GetAbilityDescription\n" +" adds r2, r0, 0\n" +" str r4, [sp]\n" +" str r5, [sp, 0x4]\n" +" movs r0, 0x4\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow2\n" +" b _0808FED6\n" +" .align 2, 0\n" +"_0808FBE8: .4byte gUnknown_810775C\n" +"_0808FBEC: .4byte gUnknown_8107768\n" +"_0808FBF0: .4byte gUnknown_8107770\n" +"_0808FBF4:\n" +" lsls r0, r4, 3\n" +" adds r0, 0x10\n" +" ldr r1, _0808FC34\n" +" ldr r2, [r1]\n" +" movs r1, 0\n" +" str r1, [sp]\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +" mov r0, r10\n" +" adds r0, 0x56\n" +" movs r1, 0\n" +" ldrsh r0, [r0, r1]\n" +" subs r5, r0, 0x1\n" +" movs r2, 0xC\n" +" negs r2, r2\n" +" add r9, r2\n" +" movs r7, 0\n" +" ldr r6, [sp, 0x2C]\n" +" adds r6, 0xC\n" +" adds r1, r6, 0\n" +" movs r2, 0\n" +" ldr r0, [sp, 0x2C]\n" +" adds r0, 0x2C\n" +"_0808FC24:\n" +" str r2, [r0]\n" +" subs r0, 0x4\n" +" cmp r0, r1\n" +" bge _0808FC24\n" +" movs r3, 0\n" +" mov r8, r3\n" +" b _0808FC88\n" +" .align 2, 0\n" +"_0808FC34: .4byte gUnknown_810DD58\n" +"_0808FC38:\n" +" mov r0, r10\n" +" adds r0, 0x58\n" +" adds r4, r0, r5\n" +" ldrb r0, [r4]\n" +" cmp r0, 0\n" +" beq _0808FC78\n" +" movs r7, 0x1\n" +" ldr r0, _0808FCA0\n" +" ldrb r1, [r4]\n" +" lsls r1, 2\n" +" adds r1, r0\n" +" ldr r0, _0808FCA4\n" +" ldr r1, [r1]\n" +" movs r2, 0x50\n" +" bl strncpy\n" +" ldr r2, _0808FCA8\n" +" movs r0, 0\n" +" str r0, [sp]\n" +" movs r0, 0xC\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +" mov r0, r8\n" +" cmp r0, 0\n" +" ble _0808FC78\n" +" subs r0, 0x1\n" +" lsls r0, 2\n" +" adds r0, r6, r0\n" +" ldrb r1, [r4]\n" +" str r1, [r0]\n" +"_0808FC78:\n" +" movs r1, 0x1\n" +" add r8, r1\n" +" adds r5, 0x1\n" +" movs r2, 0xC\n" +" add r9, r2\n" +" mov r3, r8\n" +" cmp r3, 0x9\n" +" bgt _0808FC90\n" +"_0808FC88:\n" +" cmp r5, 0\n" +" blt _0808FC78\n" +" cmp r5, 0xB\n" +" ble _0808FC38\n" +"_0808FC90:\n" +" cmp r7, 0\n" +" beq _0808FC96\n" +" b _0808FED6\n" +"_0808FC96:\n" +" ldr r0, _0808FCAC\n" +" ldr r2, [r0]\n" +" str r7, [sp]\n" +" b _0808FD98\n" +" .align 2, 0\n" +"_0808FCA0: .4byte gStatusNames\n" +"_0808FCA4: .4byte gFormatBuffer_Items + 0x50\n" +"_0808FCA8: .4byte gUnknown_8107784\n" +"_0808FCAC: .4byte gUnknown_810DF78\n" +"_0808FCB0:\n" +" lsls r0, r4, 3\n" +" adds r0, 0x10\n" +" ldr r1, _0808FCF8\n" +" ldr r2, [r1]\n" +" movs r1, 0\n" +" str r1, [sp]\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +" add r4, sp, 0x14\n" +" mov r0, r10\n" +" movs r2, 0x3E\n" +" ldrsh r1, [r0, r2]\n" +" adds r0, r4, 0\n" +" bl GetNumAvailableIQSkills\n" +" mov r0, r10\n" +" adds r0, 0x40\n" +" movs r3, 0\n" +" ldrsh r0, [r0, r3]\n" +" subs r7, r0, 0x1\n" +" mov r1, r9\n" +" subs r1, 0xC\n" +" movs r2, 0\n" +" ldr r0, [sp, 0x2C]\n" +" adds r0, 0x8\n" +"_0808FCE4:\n" +" strb r2, [r0]\n" +" subs r0, 0x1\n" +" ldr r3, [sp, 0x2C]\n" +" cmp r0, r3\n" +" bge _0808FCE4\n" +" mov r9, r1\n" +" movs r4, 0\n" +" mov r8, r4\n" +" b _0808FD84\n" +" .align 2, 0\n" +"_0808FCF8: .4byte gIQSkill810DD68_Ptr\n" +"_0808FCFC:\n" +" mov r5, sp\n" +" adds r5, r7\n" +" adds r5, 0x14\n" +" ldrb r0, [r5]\n" +" cmp r0, 0\n" +" beq _0808FD74\n" +" movs r4, 0x1\n" +" bl GetIQSkillName\n" +" adds r1, r0, 0\n" +" ldr r6, _0808FD3C\n" +" adds r0, r6, 0\n" +" movs r2, 0x50\n" +" bl strncpy\n" +" mov r0, r10\n" +" adds r0, 0x50\n" +" adds r1, r4, 0\n" +" ldrb r5, [r5]\n" +" lsls r1, r5\n" +" bl IsIQSkillSet\n" +" lsls r0, 24\n" +" cmp r0, 0\n" +" beq _0808FD44\n" +" adds r0, r6, 0\n" +" subs r0, 0x50\n" +" ldr r1, _0808FD40\n" +" bl strcpy\n" +" b _0808FD4E\n" +" .align 2, 0\n" +"_0808FD3C: .4byte gFormatBuffer_Items + 0x50\n" +"_0808FD40: .4byte gUnknown_8107788\n" +"_0808FD44:\n" +" adds r0, r6, 0\n" +" subs r0, 0x50\n" +" ldr r1, _0808FDA4\n" +" bl strcpy\n" +"_0808FD4E:\n" +" mov r0, r8\n" +" cmp r0, 0\n" +" ble _0808FD64\n" +" subs r0, 0x1\n" +" ldr r1, [sp, 0x2C]\n" +" adds r0, r1, r0\n" +" mov r1, sp\n" +" adds r1, r7\n" +" adds r1, 0x14\n" +" ldrb r1, [r1]\n" +" strb r1, [r0]\n" +"_0808FD64:\n" +" ldr r2, _0808FDA8\n" +" movs r0, 0\n" +" str r0, [sp]\n" +" movs r0, 0xC\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +"_0808FD74:\n" +" movs r2, 0x1\n" +" add r8, r2\n" +" adds r7, 0x1\n" +" movs r3, 0xC\n" +" add r9, r3\n" +" mov r0, r8\n" +" cmp r0, 0x9\n" +" bgt _0808FD8C\n" +"_0808FD84:\n" +" cmp r7, 0\n" +" blt _0808FD74\n" +" cmp r7, 0x17\n" +" ble _0808FCFC\n" +"_0808FD8C:\n" +" cmp r4, 0\n" +" beq _0808FD92\n" +" b _0808FED6\n" +"_0808FD92:\n" +" ldr r0, _0808FDAC\n" +" ldr r2, [r0]\n" +" str r4, [sp]\n" +"_0808FD98:\n" +" movs r0, 0xC\n" +" movs r1, 0x20\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +" b _0808FED6\n" +" .align 2, 0\n" +"_0808FDA4: .4byte gUnknown_810778C\n" +"_0808FDA8: .4byte gUnknown_8107790\n" +"_0808FDAC: .4byte gUnknown_810DF84\n" +"_0808FDB0:\n" +" lsls r0, r4, 3\n" +" adds r0, 0x10\n" +" ldr r2, _0808FEEC\n" +" movs r5, 0\n" +" str r5, [sp]\n" +" movs r1, 0\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +" ldr r6, _0808FEF0\n" +" mov r2, r10\n" +" movs r3, 0\n" +" ldrsh r1, [r2, r3]\n" +" adds r0, r6, 0\n" +" bl CopyMonsterNameToBuffer\n" +" ldr r1, _0808FEF4\n" +" mov r2, r10\n" +" movs r3, 0\n" +" ldrsh r0, [r2, r3]\n" +" str r0, [r1]\n" +" ldr r0, _0808FEF8\n" +" ldr r2, [r0]\n" +" str r5, [sp]\n" +" movs r0, 0x4\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +" movs r0, 0xA\n" +" add r9, r0\n" +" mov r1, r10\n" +" movs r2, 0\n" +" ldrsh r0, [r1, r2]\n" +" bl GetFriendArea\n" +" lsls r0, 24\n" +" lsrs r0, 24\n" +" bl GetFriendAreaName\n" +" adds r1, r0, 0\n" +" ldr r4, _0808FEFC\n" +" adds r0, r4, 0\n" +" movs r2, 0x50\n" +" bl strncpy\n" +" ldr r0, _0808FF00\n" +" ldr r2, [r0]\n" +" str r5, [sp]\n" +" movs r0, 0x4\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +" movs r3, 0xA\n" +" add r9, r3\n" +" ldr r0, _0808FF04\n" +" ldr r2, [r0]\n" +" str r5, [sp]\n" +" movs r0, 0x4\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +" movs r0, 0xD\n" +" add r9, r0\n" +" ldr r0, _0808FF08\n" +" ldr r2, [r0]\n" +" str r5, [sp]\n" +" movs r0, 0x4\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +" movs r1, 0xA\n" +" add r9, r1\n" +" mov r1, r10\n" +" adds r1, 0x1C\n" +" adds r0, r4, 0\n" +" bl PrintYellowDungeonNametoBuffer\n" +" ldr r0, _0808FF0C\n" +" ldr r2, [r0]\n" +" str r5, [sp]\n" +" movs r0, 0x4\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +" movs r2, 0xD\n" +" add r9, r2\n" +" mov r3, r10\n" +" movs r1, 0\n" +" ldrsh r0, [r3, r1]\n" +" bl GetCategoryString\n" +" adds r1, r0, 0\n" +" adds r0, r6, 0\n" +" movs r2, 0x14\n" +" bl strncpy\n" +" ldr r0, _0808FF10\n" +" ldr r2, [r0]\n" +" str r5, [sp]\n" +" movs r0, 0x4\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +" movs r2, 0xD\n" +" add r9, r2\n" +" ldr r4, _0808FF14\n" +" mov r3, r10\n" +" movs r1, 0\n" +" ldrsh r0, [r3, r1]\n" +" bl GetBodySize\n" +" lsls r0, 24\n" +" lsrs r0, 22\n" +" adds r0, r4\n" +" ldr r1, [r0]\n" +" adds r0, r6, 0\n" +" bl strcpy\n" +" ldr r0, _0808FF18\n" +" ldr r2, [r0]\n" +" str r5, [sp]\n" +" movs r0, 0x4\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +" movs r2, 0xD\n" +" add r9, r2\n" +" ldr r1, _0808FF1C\n" +" mov r0, r10\n" +" adds r0, 0x4C\n" +" ldrb r0, [r0]\n" +" lsls r0, 2\n" +" adds r0, r1\n" +" ldr r2, [r0]\n" +" str r5, [sp]\n" +"_0808FECC:\n" +" movs r0, 0x4\n" +" mov r1, r9\n" +" ldr r3, [sp, 0x50]\n" +" bl PrintFormattedStringOnWindow\n" +"_0808FED6:\n" +" ldr r0, [sp, 0x50]\n" +" bl sub_80073E0\n" +" add sp, 0x30\n" +" pop {r3-r5}\n" +" mov r8, r3\n" +" mov r9, r4\n" +" mov r10, r5\n" +" pop {r4-r7}\n" +" pop {r0}\n" +" bx r0\n" +" .align 2, 0\n" +"_0808FEEC: .4byte gUnknown_8107798\n" +"_0808FEF0: .4byte gFormatBuffer_Monsters\n" +"_0808FEF4: .4byte gFormatArgs\n" +"_0808FEF8: .4byte gUnknown_810DEB4\n" +"_0808FEFC: .4byte gFormatBuffer_Items\n" +"_0808FF00: .4byte gUnknown_810DEC8\n" +"_0808FF04: .4byte gUnknown_810DEDC\n" +"_0808FF08: .4byte gUnknown_810DFB4\n" +"_0808FF0C: .4byte gUnknown_810DFC8\n" +"_0808FF10: .4byte gUnknown_810DEF4\n" +"_0808FF14: .4byte gUnknown_810E02C\n" +"_0808FF18: .4byte gUnknown_810DF98\n" +"_0808FF1C: .4byte gEvolutionStrings"); +} + +void sub_808FF20(struct unkStruct_808FF20 *param_1, struct PokemonStruct1 *pokemon, bool8 param_3) +{ + s32 index; + + PrintColoredPokeNameToBuffer(param_1->nameBuffer, pokemon, COLOR_WHITE); + param_1->species = pokemon->speciesNum; + param_1->HP1 = pokemon->pokeHP; + param_1->HP2 = pokemon->pokeHP; + param_1->level = pokemon->level; + param_1->exp = pokemon->currExp; + for(index = 0; index < 2; index++) + { + param_1->offense.att[index] = pokemon->offense.att[index]; + param_1->offense.def[index] = pokemon->offense.def[index]; + param_1->types[index] = GetPokemonType(pokemon->speciesNum,index); + param_1->abilities[index] = GetPokemonAbility(pokemon->speciesNum,index); + } + param_1->isTeamLeader = pokemon->isTeamLeader; + param_1->atkBoost = 0; + param_1->spAtkBoost = 0; + param_1->defBoost = 0; + param_1->spDefBoost = 0; + + if (pokemon->heldItem.id != 0) { + if (pokemon->heldItem.id == ITEM_POWER_BAND) { + param_1->atkBoost += gUnknown_810AC60; + } + if (pokemon->heldItem.id == ITEM_SPECIAL_BAND) { + param_1->spAtkBoost+= gUnknown_810AC62; + } + if (pokemon->heldItem.id == ITEM_MUNCH_BELT) { + param_1->atkBoost += gUnknown_810AC68; + } + if (pokemon->heldItem.id == ITEM_MUNCH_BELT) { + param_1->spAtkBoost+= gUnknown_810AC68; + } + if (pokemon->heldItem.id == ITEM_DEF_SCARF) { + param_1->defBoost += gUnknown_810AC64; + } + if (pokemon->heldItem.id == ITEM_ZINC_BAND) { + param_1->spDefBoost += gUnknown_810AC66; + } + } + param_1->tactic = pokemon->tacticIndex; + HeldItemToSlot(¶m_1->item,&pokemon->heldItem); + param_1->IQ = pokemon->IQ; + param_1->dungeonLocation = pokemon->dungeonLocation; + param_1->unk44[0] = pokemon->unkC[0]; + param_1->unk44[1] = pokemon->unkC[1]; + param_1->IQSkills = pokemon->IQSkills; + if (param_3) { + param_1->unk4C = sub_808F700(pokemon); + } + else { + param_1->unk4C = 3; + } + + for(index = 0; index < 0xC; index++) + { + param_1->unk58[index] = 0; + } +} From 0776e271cc81e7e337535129d39111b2586b6c80 Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Sun, 15 Dec 2024 10:08:29 -0800 Subject: [PATCH 09/11] more code_2 work --- include/code_2.h | 9 +++++---- include/personality_test1.h | 15 ++++++++++----- src/code.c | 38 +++++++++++++++---------------------- src/personality_test1.c | 14 +++++++------- 4 files changed, 37 insertions(+), 39 deletions(-) diff --git a/include/code_2.h b/include/code_2.h index 658fe3cc0..d5372d251 100644 --- a/include/code_2.h +++ b/include/code_2.h @@ -1,8 +1,9 @@ #ifndef GUARD_CODE_2_H #define GUARD_CODE_2_H -// code_2.s -extern void sub_8001024(u32 *); -extern void sub_8001044(u32 *); +#include "personality_test1.h" -#endif // GUARD_CODE_2_H \ No newline at end of file +void sub_8001024(struct PersonalityRelated *); +void sub_8001044(struct PersonalityRelated *); + +#endif // GUARD_CODE_2_H diff --git a/include/personality_test1.h b/include/personality_test1.h index 6eba0269d..7c1dc7979 100644 --- a/include/personality_test1.h +++ b/include/personality_test1.h @@ -14,14 +14,19 @@ typedef struct PersonalityQuestion /* 0x8 */ const PersonalityEffects *effects; } PersonalityQuestion; +struct PersonalityRelated +{ + u32 unk4; + s16 StarterID; + s16 PartnerID; + u8 StarterName[0x14]; + u8 PartnerNick[0x14]; +}; + struct PersonalityTestTracker { /* 0x0 */ s32 FrameCounter; - u32 unk4; - /* 0x8 */ s16 StarterID; - /* 0xA */ s16 PartnerID; - u8 fillC[0x20 - 0xC]; - /* 0x20 */ u8 PartnerNick[20]; + struct PersonalityRelated unk4; /* 0x34 */ u32 TestState; /* 0x38 */ s32 QuestionCounter; /* 0x3C */ u32 currQuestionIndex; diff --git a/src/code.c b/src/code.c index 207672504..6ffcc36b2 100644 --- a/src/code.c +++ b/src/code.c @@ -7,6 +7,7 @@ #include "event_flag.h" #include "items.h" #include "memory.h" +#include "personality_test1.h" #include "pokemon.h" #include "quick_save_read.h" #include "quick_save_write.h" @@ -42,17 +43,8 @@ struct unkTalkTable extern struct unkTalkTable gTalkKindTable[]; extern struct unkTalkTable gBaseKindTable[]; -// size: 0x30 -struct PersonalityRelated -{ - u8 fill0[4]; - s16 speciesID1; - s16 speciesID2; - u8 speciesName1[0x14]; - u8 speciesName2[0x14]; -}; -struct PersonalityRelated gPersonalityRelated_203B040; -extern u32 gUnknown_203B03C; +EWRAM_DATA_2 u32 gUnknown_203B03C = {0}; +EWRAM_DATA_2 struct PersonalityRelated gPersonalityRelated_203B040 = {0}; void SaveLoadRelated_8000EDC(struct UnkStruct_xxx_dungeon_8042F6C *param_1) { @@ -145,35 +137,35 @@ void sub_8001064(void) u8 buffer1 [20]; if (GetPlayerPokemonStruct() == NULL) { - if (gPersonalityRelated_203B040.speciesName1[0] == '\0') { - CopyMonsterNameToBuffer(buffer1,gPersonalityRelated_203B040.speciesID1); + if (gPersonalityRelated_203B040.StarterName[0] == '\0') { + CopyMonsterNameToBuffer(buffer1,gPersonalityRelated_203B040.StarterID); CopyStringtoBuffer(buffer2,buffer1); - sub_808CE74(gPersonalityRelated_203B040.speciesID1,TRUE,buffer2); + sub_808CE74(gPersonalityRelated_203B040.StarterID,TRUE,buffer2); } else { - sub_808CE74(gPersonalityRelated_203B040.speciesID1,TRUE,gPersonalityRelated_203B040.speciesName1); + sub_808CE74(gPersonalityRelated_203B040.StarterID,TRUE,gPersonalityRelated_203B040.StarterName); } } if (sub_808D378() == NULL) { - if (gPersonalityRelated_203B040.speciesName2[0] == '\0') { - CopyMonsterNameToBuffer(buffer1,gPersonalityRelated_203B040.speciesID2); + if (gPersonalityRelated_203B040.PartnerNick[0] == '\0') { + CopyMonsterNameToBuffer(buffer1,gPersonalityRelated_203B040.PartnerID); CopyStringtoBuffer(buffer2,buffer1); - sub_808CE74(gPersonalityRelated_203B040.speciesID2,FALSE,buffer2); + sub_808CE74(gPersonalityRelated_203B040.PartnerID,FALSE,buffer2); } else { - sub_808CE74(gPersonalityRelated_203B040.speciesID2,FALSE,gPersonalityRelated_203B040.speciesName2); + sub_808CE74(gPersonalityRelated_203B040.PartnerID,FALSE,gPersonalityRelated_203B040.PartnerNick); } } - if (gPersonalityRelated_203B040.speciesID1 != MONSTER_NONE) { + if (gPersonalityRelated_203B040.StarterID != MONSTER_NONE) { psVar2 = &gBaseKindTable[0]; - while ((psVar2->species != MONSTER_NONE && (gPersonalityRelated_203B040.speciesID1 != psVar2->species))) { + while ((psVar2->species != MONSTER_NONE && (gPersonalityRelated_203B040.StarterID != psVar2->species))) { psVar2++; } SetScriptVarValue(NULL,BASE_KIND,psVar2->unk0); } - if (gPersonalityRelated_203B040.speciesID2 != MONSTER_NONE) { + if (gPersonalityRelated_203B040.PartnerID != MONSTER_NONE) { psVar2 = &gTalkKindTable[0]; - while ((psVar2->species != MONSTER_NONE && (gPersonalityRelated_203B040.speciesID2 != psVar2->species))) { + while ((psVar2->species != MONSTER_NONE && (gPersonalityRelated_203B040.PartnerID != psVar2->species))) { psVar2++; } SetScriptVarValue(NULL,PARTNER_TALK_KIND,psVar2->unk0); diff --git a/src/personality_test1.c b/src/personality_test1.c index 63ebb82f5..05f64ca44 100644 --- a/src/personality_test1.c +++ b/src/personality_test1.c @@ -273,7 +273,7 @@ static void RevealPersonality(void) sPersonalityTestTracker->playerNature = currentNature; } - sPersonalityTestTracker->StarterID = gStarters[sPersonalityTestTracker->playerNature][sPersonalityTestTracker->playerGender]; + sPersonalityTestTracker->unk4.StarterID = gStarters[sPersonalityTestTracker->playerNature][sPersonalityTestTracker->playerGender]; PrintPersonalityTypeDescription(); sPersonalityTestTracker->TestState = PERSONALITY_STARTER_REVEAL; } @@ -313,7 +313,7 @@ static void AdvanceToPartnerSelection(void) static void CallCreatePartnerSelectionMenu(void) { - CreatePartnerSelectionMenu(sPersonalityTestTracker->StarterID); + CreatePartnerSelectionMenu(sPersonalityTestTracker->unk4.StarterID); sPersonalityTestTracker->TestState = PERSONALITY_ADVANCE_TO_PARTNER_NICKNAME_1; } @@ -326,7 +326,7 @@ static void PromptForPartnerNickname(void) if (selectedPartner != 0xFFFF) { if (selectedPartner != 0xFFFE) { sub_803CE6C(); - sPersonalityTestTracker->PartnerID = selectedPartner; + sPersonalityTestTracker->unk4.PartnerID = selectedPartner; CreateDialogueBoxAndPortrait(gPartnerNickPrompt, 0, 0, 0x301); sPersonalityTestTracker->TestState = PERSONALITY_ADVANCE_TO_PARTNER_NICKNAME_2; } @@ -343,8 +343,8 @@ static void AdvanceToPartnerNicknameScreen(void) static void NicknamePartner(void) { - CopyStringtoBuffer(sPersonalityTestTracker->PartnerNick, GetMonSpecies(sPersonalityTestTracker->PartnerID)); - CreateConfirmNameMenu(3, sPersonalityTestTracker->PartnerNick); + CopyStringtoBuffer(sPersonalityTestTracker->unk4.PartnerNick, GetMonSpecies(sPersonalityTestTracker->unk4.PartnerID)); + CreateConfirmNameMenu(3, sPersonalityTestTracker->unk4.PartnerNick); sPersonalityTestTracker->TestState = PERSONALITY_END_INTRO; } @@ -375,7 +375,7 @@ static void PromptNewQuestion(void) static void PrintPersonalityTypeDescription(void) { - CopyMonsterNameToBuffer(gFormatBuffer_Monsters[0], sPersonalityTestTracker->StarterID); + CopyMonsterNameToBuffer(gFormatBuffer_Monsters[0], sPersonalityTestTracker->unk4.StarterID); CreateDialogueBoxAndPortrait(sPersonalityTypeDescriptionTable[sPersonalityTestTracker->playerNature], 0, 0, 0x101); } @@ -388,7 +388,7 @@ static void PersonalityTest_DisplayStarterSprite(void) const u8 *gfx; UnkTextStruct2 stackArray[4]; - starterID = sPersonalityTestTracker->StarterID; + starterID = sPersonalityTestTracker->unk4.StarterID; RestoreUnkTextStruct_8006518(stackArray); stackArray[1] = sUnknown_80F4244; ResetUnusedInputStruct(); From 62ca91f7715de5c2ed404e4eabbb37622db2dec3 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Mon, 16 Dec 2024 10:38:11 +0100 Subject: [PATCH 10/11] Match sub_801F280 --- asm/code_801EE10.s | 190 ----------------------------------------- include/code_801EE10.h | 4 +- ld_script.txt | 2 - src/code_801EE10.c | 88 +++++++++++++++++-- src/code_801EE10_mid.c | 21 ----- 5 files changed, 84 insertions(+), 221 deletions(-) delete mode 100644 asm/code_801EE10.s delete mode 100644 src/code_801EE10_mid.c diff --git a/asm/code_801EE10.s b/asm/code_801EE10.s deleted file mode 100644 index d40ea219e..000000000 --- a/asm/code_801EE10.s +++ /dev/null @@ -1,190 +0,0 @@ - #include "asm/constants/gba_constants.inc" - #include "asm/macros.inc" - - .syntax unified - - .text - - thumb_func_start sub_801F280 -sub_801F280: - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x28 - lsls r0, 24 - lsrs r0, 24 - mov r10, r0 - ldr r4, _0801F30C - ldr r0, [r4] - ldr r0, [r0, 0x50] - bl CallPrepareTextbox_8008C54 - ldr r0, [r4] - ldr r0, [r0, 0x50] - bl sub_80073B8 - ldr r0, [r4] - ldr r1, [r0, 0x8] - adds r1, 0x4C - add r0, sp, 0x4 - movs r2, 0xA - bl sub_80922B4 - ldr r0, _0801F310 - add r1, sp, 0x4 - bl strcpy - ldr r2, _0801F314 - ldr r0, [r4] - ldr r3, [r0, 0x50] - movs r0, 0 - str r0, [sp] - movs r0, 0xC - movs r1, 0 - bl PrintFormattedStringOnWindow - movs r7, 0 - ldr r0, [r4] - movs r1, 0x36 - ldrsh r0, [r0, r1] - cmp r7, r0 - bge _0801F394 - add r5, sp, 0x18 - mov r8, r4 - movs r0, 0x1 - mov r9, r0 -_0801F2E0: - adds r0, r5, 0 - movs r1, 0 - movs r2, 0xC - bl memset - movs r0, 0x6A - str r0, [r5, 0x4] - mov r1, r8 - ldr r2, [r1] - lsls r1, r7, 3 - ldr r0, [r2, 0x10] - adds r4, r0, r1 - ldrb r1, [r4] - mov r0, r9 - ands r0, r1 - cmp r0, 0 - beq _0801F386 - ldrb r0, [r2, 0xC] - cmp r0, 0 - beq _0801F318 - movs r0, 0x2 - b _0801F31A - .align 2, 0 -_0801F30C: .4byte gUnknown_203B270 -_0801F310: .4byte gFormatBuffer_Monsters -_0801F314: .4byte gUnknown_80DC28C -_0801F318: - movs r0, 0x4 -_0801F31A: - str r0, [sp, 0x18] - mov r1, r8 - ldr r0, [r1] - ldrb r0, [r0, 0x6] - cmp r0, 0 - beq _0801F328 - mov r0, r9 -_0801F328: - strb r0, [r5, 0x9] - cmp r7, 0x3 - ble _0801F332 - mov r1, r9 - strb r1, [r5, 0x8] -_0801F332: - ldr r0, _0801F3EC - adds r1, r4, 0 - adds r2, r5, 0 - bl sub_80928A0 - ldr r2, _0801F3F0 - ldr r0, [r2] - adds r0, 0x1C - adds r1, r7, 0 - str r2, [sp, 0x24] - bl sub_8013800 - adds r6, r0, 0 - ldrb r1, [r4] - movs r0, 0x2 - ands r0, r1 - movs r4, 0xD - ldr r2, [sp, 0x24] - cmp r0, 0 - bne _0801F372 - movs r4, 0x8 - cmp r7, 0 - beq _0801F372 - ldr r0, [r2] - ldr r0, [r0, 0x50] - subs r2, r6, 0x2 - movs r1, 0x7 - str r1, [sp] - movs r1, 0xC - movs r3, 0x78 - bl sub_800792C -_0801F372: - mov r1, r8 - ldr r0, [r1] - ldr r3, [r0, 0x50] - movs r0, 0 - str r0, [sp] - adds r0, r4, 0 - adds r1, r6, 0 - ldr r2, _0801F3F4 - bl PrintFormattedStringOnWindow -_0801F386: - adds r7, 0x1 - mov r1, r8 - ldr r0, [r1] - movs r1, 0x36 - ldrsh r0, [r0, r1] - cmp r7, r0 - blt _0801F2E0 -_0801F394: - ldr r4, _0801F3F0 - ldr r0, [r4] - ldr r0, [r0, 0x50] - bl sub_80073E0 - ldr r1, [r4] - adds r0, r1, 0 - adds r0, 0xB8 - ldr r0, [r0] - cmp r0, 0 - beq _0801F3DC - mov r0, r10 - cmp r0, 0 - beq _0801F3DC - ldr r0, [r1, 0x54] - bl CallPrepareTextbox_8008C54 - ldr r0, [r4] - ldr r0, [r0, 0x54] - bl sub_80073B8 - ldr r1, [r4] - adds r0, r1, 0 - adds r0, 0xB8 - ldr r2, [r0] - ldr r3, [r1, 0x54] - movs r0, 0 - str r0, [sp] - movs r0, 0x8 - movs r1, 0 - bl PrintFormattedStringOnWindow - ldr r0, [r4] - ldr r0, [r0, 0x54] - bl sub_80073E0 -_0801F3DC: - add sp, 0x28 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_0801F3EC: .4byte gFormatBuffer_Items -_0801F3F0: .4byte gUnknown_203B270 -_0801F3F4: .4byte gUnknown_80DC2A0 - thumb_func_end sub_801F280 - - .align 2,0 diff --git a/include/code_801EE10.h b/include/code_801EE10.h index 94c95baf6..71c95f515 100644 --- a/include/code_801EE10.h +++ b/include/code_801EE10.h @@ -31,8 +31,6 @@ s32 sub_801F194(void); bool8 sub_801F1A4(void); void sub_801F1B0(bool8, bool8); void sub_801F214(void); - -// code_801EE10.s -extern void sub_801F280(u32); // Probably bool +void sub_801F280(bool8); #endif // CODE_801EE10_H diff --git a/ld_script.txt b/ld_script.txt index e576aa391..cad2d9b8d 100755 --- a/ld_script.txt +++ b/ld_script.txt @@ -125,8 +125,6 @@ SECTIONS { src/hints_menu2.o(.text); src/gulpin_shop.o(.text); src/code_801EE10.o(.text); - asm/code_801EE10.o(.text); - src/code_801EE10_mid.o(.text); src/code_801F428.o(.text); src/code_801F808.o(.text); src/gulpin_shop_801FB50.o(.text); diff --git a/src/code_801EE10.c b/src/code_801EE10.c index 64419cd96..fa4278d0d 100644 --- a/src/code_801EE10.c +++ b/src/code_801EE10.c @@ -9,6 +9,7 @@ #include "code_801EE10.h" #include "code_80118A4.h" #include "menu_input.h" +#include "string_format.h" EWRAM_DATA_2 unkStruct_203B270 *gUnknown_203B270 = {0}; @@ -95,7 +96,7 @@ u8 sub_801EE10(u32 param_1, s16 species, Move *moves, u32 param_4, const u8 *tex xxx_call_save_unk_text_struct_800641C(gUnknown_203B270->unk58, TRUE, TRUE); sub_8013818(&gUnknown_203B270->input,iVar5,iVar5,param_6); sub_8013780(&gUnknown_203B270->input,0); - sub_801F280(1); + sub_801F280(TRUE); return 1; } @@ -147,7 +148,7 @@ u32 sub_801EF38(char param_1) else { goto _134; } - sub_801F280(1); + sub_801F280(TRUE); return 1; case INPUT_R_DPAD_UP_BUTTONS: if (gUnknown_203B270->unk5 == 0) break; @@ -160,7 +161,7 @@ u32 sub_801EF38(char param_1) _134: PlayMenuSoundEffect(2); } - sub_801F280(1); + sub_801F280(TRUE); return 1; case INPUT_R_A_BUTTONS: if (gUnknown_203B270->unk6 != 0) { @@ -225,7 +226,7 @@ _134: } if (flag) { _ret: - sub_801F280(1); + sub_801F280(TRUE); return 1; } else @@ -253,7 +254,7 @@ void sub_801F1B0(bool8 param_1, bool8 param_2) gUnknown_203B270->input.unk22 = sub_801F3F8(); sub_8013984(&gUnknown_203B270->input); gUnknown_203B270->input.menuIndex = sub_8092F4C(gUnknown_203B270->moves, gUnknown_203B270->input.menuIndex); - sub_801F280(1); + sub_801F280(TRUE); if(param_1) AddMenuCursorSprite(&gUnknown_203B270->input); } @@ -273,3 +274,80 @@ void sub_801F214(void) gUnknown_203B270 = NULL; } } + +extern void sub_80922B4(u8 *buffer, u8 *string, s32 size); + +void sub_801F280(bool8 param_1) +{ + int i; + u8 buffer[20]; + + CallPrepareTextbox_8008C54(gUnknown_203B270->unk50); + sub_80073B8(gUnknown_203B270->unk50); + sub_80922B4(buffer,gUnknown_203B270->pokeStruct->name,10); + strcpy(gFormatBuffer_Monsters[0],buffer); + PrintFormattedStringOnWindow(0xc,0,gUnknown_80DC28C,gUnknown_203B270->unk50,0); // Move: {COLOR_1 YELLOW}{ARG_POKEMON_0){END_COLOR_TEXT_1} + + for (i = 0; i < gUnknown_203B270->input.unk1A; i++) { + struct Move *move; + bool8 linkChain; + s32 x, y; + struct unkStruct_80928C0 uStack_30 = {0}; + + uStack_30.unk4 = 0x6a; + move = &gUnknown_203B270->moves[i]; + if (MoveFlagExists(move)) { + if (gUnknown_203B270->isTeamLeader) { + uStack_30.unk0 = 2; + } + else { + uStack_30.unk0 = 4; + } + + if (gUnknown_203B270->unk6) { + uStack_30.unk9 = 1; + } + else { + uStack_30.unk9 = 0; + } + + if (i >= MAX_MON_MOVES) { + uStack_30.unk8 = 1; + } + + sub_80928A0(gFormatBuffer_Items[0],move,&uStack_30); + y = sub_8013800(&gUnknown_203B270->input,i); + linkChain = MoveFlagLinkChain(move); + x = !linkChain ? 0x8 : 0xD; + if (!linkChain && i != 0) { + sub_800792C(gUnknown_203B270->unk50,0xc,y - 2,0x78,7); + } + PrintFormattedStringOnWindow(x,y,gUnknown_80DC2A0,gUnknown_203B270->unk50,0); // {ARG_MOVE_ITEM_0} + } + } + + sub_80073E0(gUnknown_203B270->unk50); + if ((gUnknown_203B270->text != NULL) && (param_1)) { + CallPrepareTextbox_8008C54(gUnknown_203B270->unk54); + sub_80073B8(gUnknown_203B270->unk54); + PrintFormattedStringOnWindow(8,0,gUnknown_203B270->text,gUnknown_203B270->unk54,0); + sub_80073E0(gUnknown_203B270->unk54); + } +} + +s32 sub_801F3F8(void) +{ + Move *move; + int index; + s32 counter; + + counter = 0; + for(index = 0; index < 8; index++) + { + move = &gUnknown_203B270->moves[index]; + if ((move->moveFlags & MOVE_FLAG_EXISTS)) { + counter++; + } + } + return counter; +} diff --git a/src/code_801EE10_mid.c b/src/code_801EE10_mid.c deleted file mode 100644 index 50bf825cf..000000000 --- a/src/code_801EE10_mid.c +++ /dev/null @@ -1,21 +0,0 @@ -#include "global.h" -#include "code_801EE10.h" - -extern unkStruct_203B270 *gUnknown_203B270; - -s32 sub_801F3F8(void) -{ - Move *move; - int index; - s32 counter; - - counter = 0; - for(index = 0; index < 8; index++) - { - move = &gUnknown_203B270->moves[index]; - if ((move->moveFlags & MOVE_FLAG_EXISTS)) { - counter++; - } - } - return counter; -} From 6418d9a00f80bfeb1697d070892e1edfa9820c29 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Mon, 16 Dec 2024 17:33:47 +0100 Subject: [PATCH 11/11] Update src/code_801EE10.c Co-authored-by: Seth Barberee --- src/code_801EE10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/code_801EE10.c b/src/code_801EE10.c index fa4278d0d..ff9470fe7 100644 --- a/src/code_801EE10.c +++ b/src/code_801EE10.c @@ -284,7 +284,7 @@ void sub_801F280(bool8 param_1) CallPrepareTextbox_8008C54(gUnknown_203B270->unk50); sub_80073B8(gUnknown_203B270->unk50); - sub_80922B4(buffer,gUnknown_203B270->pokeStruct->name,10); + sub_80922B4(buffer,gUnknown_203B270->pokeStruct->name,POKEMON_NAME_LENGTH); strcpy(gFormatBuffer_Monsters[0],buffer); PrintFormattedStringOnWindow(0xc,0,gUnknown_80DC28C,gUnknown_203B270->unk50,0); // Move: {COLOR_1 YELLOW}{ARG_POKEMON_0){END_COLOR_TEXT_1}